附件:
你需要登錄才可以下載或查看附件。沒(méi)有帳號(hào)? 注冊(cè)前天看到群里的朋友們都在討論如何給框分類增加一個(gè)新聞系統(tǒng),這個(gè)想法前幾天
臨朐信息網(wǎng) 已經(jīng)分析和研究了。說(shuō)明大家的需求也是一樣的,就在我們?cè)谘芯窟@個(gè)問(wèn)題的時(shí)候,偉大的 52linxi.com 林西信息網(wǎng)已經(jīng)給大家分享了 百度新聞的調(diào)用。 大家可以參考林西分享給大家的帖子
http://bbs.kfenlei.com/showtopic-1111.html下面進(jìn)入正題給大家分享一下:首先感謝
臨朐信息網(wǎng)提供的技術(shù)支持
演示站 :
http://www.yyrx.net (沂源熱線)
http://www.yyrx.net/news (沂源新聞網(wǎng))
應(yīng)該可以安裝的程序有很多(比如 z-blog sdcms dedecms 等),下面我用 Z-BLOG 這個(gè)程序來(lái)當(dāng)新聞系統(tǒng)。
1、網(wǎng)站根目錄下新建一個(gè)文件夾 比如
news 在這個(gè)目錄下面安裝 z-blog程序 我使用的2.2最新版本 下載地址
http://bbs.rainbowsoft.org/thread-82282-1-1.html 請(qǐng)選擇
方式二 方式一會(huì)出現(xiàn)亂碼
2、安裝成功后 替換一個(gè)文件 /
news/zb_system/FUNCTION/c_system_base.asp 修改好的已經(jīng)添加到 附件里面下載
3、修改 框分類首頁(yè)index.aspx文件 在首頁(yè)頂部 添加 asp.net的注冊(cè)控件代碼 <%@ Register Src="~/inc/top2.ascx" TagPrefix="qth8" TagName="top2" %>
下面是添加好的:
- <%@ page language="C#" autoeventwireup="true" inherits="index_2, qth8" %><%@ Register Src="~/inc/top.ascx" TagPrefix="qth8" TagName="top" %><%@ Register Src="~/inc/top2.ascx" TagPrefix="qth8" TagName="top2" %><%@ Register Src="~/inc/foot.ascx" TagPrefix="qth8" TagName="foot" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <meta name="Keywords" content="<%=sWebKeywords %>" />
- <meta name="Description" content="<%=sWebDescription %>" />
- <meta name="anquanbao-verification" content="e324aecfb767c8a">
- <title><%=sWebTitle %></title>
- <link rel="stylesheet" href="template/css.css" type="text/css" />
- <link rel="stylesheet" href="template/top.css" type="text/css" />
復(fù)制代碼4、在需要添加新聞的地方那個(gè) 添加代碼 <qth8:top2 ID="top2" runat="server" />
下面是代有CSS文件的代碼 (轉(zhuǎn)自林西信息網(wǎng))
- <style type=text/css>
- .iblist{width:365px;padding-left:5px;}
- .baidu{font-size:14px;line-height:10px;font-family:arial;width:365px;height:185px;padding:10px 0px 0px 0px;}
- .baidu a{background:url('/images/dian.gif') 0px 5px no-repeat;padding-left:10px;font-size:14px;color:#666;font-family:"Microsoft YaHei";overflow: hidden;
- white-space: nowrap;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis;display:block;width:353px;height:15px;}
- .baidu a:hover{color:#197AC5;}
- .baidu span{color:#6f6f6f;font-size:12px;display:none;width:0px;}
- .baidu a.more{color:#008000;}
- .baidu a.blk{color:#000;font-weight:bold;}
- .baidu .more{display:none;}
- </style>
- <div style="text-align:left;word-wrap:break-word;width:100%" class=baidu>
- <qth8:top2 ID="top2" runat="server" />
- </div>
復(fù)制代碼搞定,收尾!
這樣只要在blog里面添加文章 點(diǎn)一下 文件重建 框分類的首頁(yè)就會(huì)自動(dòng)更新了,也就順利的完成的調(diào)用。
最后還得感謝 臨朐信息網(wǎng)(
www.262600.net) 和 林西信息網(wǎng) (
www.52linxi.com)提供的技術(shù)支持。