附件:
你需要登录才可以下载或查看附件。没有帐号? 注册前天看到群里的朋友们都在讨论如何给框分类增加一个新闻系统,这个想法前几天
临朐信息网 已经分析和研究了。说明大家的需求也是一样的,就在我们在研究这个问题的时候,伟大的 52linxi.com 林西信息网已经给大家分享了 百度新闻的调用。 大家可以参考林西分享给大家的帖子
http://bbs.kfenlei.com/showtopic-1111.html下面进入正题给大家分享一下:首先感谢
临朐信息网提供的技术支持
演示站 :
http://www.yyrx.net (沂源热线)
http://www.yyrx.net/news (沂源新闻网)
应该可以安装的程序有很多(比如 z-blog sdcms dedecms 等),下面我用 Z-BLOG 这个程序来当新闻系统。
1、网站根目录下新建一个文件夹 比如
news 在这个目录下面安装 z-blog程序 我使用的2.2最新版本 下载地址
http://bbs.rainbowsoft.org/thread-82282-1-1.html 请选择
方式二 方式一会出现乱码
2、安装成功后 替换一个文件 /
news/zb_system/FUNCTION/c_system_base.asp 修改好的已经添加到 附件里面下载
3、修改 框分类首页index.aspx文件 在首页顶部 添加 asp.net的注册控件代码 <%@ 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" />
复制代码4、在需要添加新闻的地方那个 添加代码 <qth8:top2 ID="top2" runat="server" />
下面是代有CSS文件的代码 (转自林西信息网)
- <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>
复制代码搞定,收尾!
这样只要在blog里面添加文章 点一下 文件重建 框分类的首页就会自动更新了,也就顺利的完成的调用。
最后还得感谢 临朐信息网(
www.262600.net) 和 林西信息网 (
www.52linxi.com)提供的技术支持。