为网站添加IE8网页快讯功能的方法

昨天为DedeCMS添加了网页快讯功能,并且上传到IE8网页快讯加载项资源库,刚才去看时,发现已经成功通过了审核http://www.ieaddons.com/cn/webslices/?lang=cn&index=72呵呵,心里还是挺高兴的。

下面我就把我添加IE8网页快讯功能的方法与大家分享一下,简单地说在网页模板的相应位置添加以下代码即可:

<div id=”1″ class=”hslice”>
<h5 class=”entry-title”>快讯1</h5>
<div class=”entry-content”>
网页快讯内容</div>
</div>

但是如果你原样不动地去添加以上代码,就会发现,虽然实现了网页快讯功能,但是却在网页内容的标题前增加了一个黑色的标题,十分影响网页布局和美观。

其实以上代码是可以灵活添加的,可以融入其他的代码之中的,这样就避免了前面出现的影响美观的问题。

下面我把主页模板index.htm中添加的代码展示一下,大家可举一反三,灵活添加:

一、图文资讯板块代码修改后如下:

<div class=”picnews”>
<dl class=”tbox light hslice” id=”twzx”>
<dt class=’light’><strong class=”entry-title”>图文资讯</strong></dt>
<dd class=’light’>
<ul class=”e1 entry-content”>{dede:arclist row=5 orderby=pubdate type=’image.’ imgwidth=’124′ imgheight=’94’}
<li><a href=”[field:arcurl/]”>[field:image/]<span class=”title”>[field:title/]</span></a></li>{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<!– /picnews –>

二、首页的电脑技巧板块代码修改后如下:

<div class=”listbox”>
{dede:channelartlist}
<dl class=”tbox hslice” id=”{dede:field name=’typeid’/}”>
<dt><strong class=”entry-title”><a href=”{dede:field name=’typeurl’/}”>{dede:field name=’typename’/}</a></strong><span class=”more”><a href=”{dede:field name=’typeurl’/}”>更多…</a></span></dt>
<dd>
<ul class=”c1 ico3 entry-content”>
{dede:arclist titlelen=’60’ row=’6′}
<li><a href=”[field:arcurl /]”>[field:title /]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
{/dede:channelartlist}
</div>
<!– /listbox –>

大家比较一下自己网站主页index.htm的代码,灵活修改一下,就不难成功添加网站主页的网页快讯功能。

同样的方法修改一下频道封面模板index_article.htm的代码,即可实现频道封面页的网页快讯功能。

You may also like...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注