由于discuz社区把论坛程序已经更新到discuz7将近两周了,感觉版本已经更新得比较稳定了,因此把朋友的论坛系统由discuz6.1升级到了discuz7,这个dz7系统确实非常有进步,特别在任务方面,对于活跃论坛社区是有极大益处的。其他改动不多说,以后可能会有专题来说明下,这里仅说明一个比较有代表性的一点模板改动,把dz7的帖子页面的标题广告位移至标题关键词和内容之间的办法。
这个办法其实也不复杂;对比下前台源代码和dz的viewthread_node.htm源代码即可。
剪切:
<!–{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread2'][$post['count']])}–><div class="ad_textlink2" id="ad_thread2_$post[count]">$advlist[thread2][$post[count]]</div><!–{else}–><div id="ad_thread2_$post[count]"></div><!–{/if}–>
移至:<div class="{if !$thread[special]}t_msgfontfix{else}specialmsg{/if}">
前面。


这种技巧类的文章比较有市场的,呵。
DZ论坛总体来讲真的不错。
如果不用后台的,直接在源代码中添加广告的话,就直接加在:
<div class="{if !$thread[special]}t_msgfontfix{else}specialmsg{/if}">
前面即可
想请教一下站长,那个我想把广告放在内容的下面。
我也把评分收藏那三个按扭去掉了,但是还是感觉内容和广告之间的距离太高了。
不知道站长有什么办法可以改么?
搜索:
<!–{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread1'][$post['count']])}–><div class="ad_textlink1" id="ad_thread1_$post[count]">$advlist[thread1][$post[count]]</div><!–{else}–><div id="ad_thread1_$post[count]"></div><!–{/if}–>
剪切后移至:
<!–{if $relatedthreadlist && !$qihoo['relate']['position'] && $post['first']}–>
前面
把右侧广告位移至左侧,实现文字环绕效果:
在模板default文件夹下的css_common.htm查找:
ad_pip { clear: right; float: right;
修改成:
ad_pip { clear: left; float: left;
然后,把viewthread_node.htm文件中:
<!–{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread3'][$post['count']])}–><div class="ad_pip" id="ad_thread3_$post[count]">$advlist[thread3][$post[count]]</div><!–{else}–><div id="ad_thread3_$post[count]"></div><!–{/if}–>
剪切移至:
$post[message]</td></tr></table>
前面。
谢谢你的教程,我费了好大的功夫才在你这找到了!!!非常感谢!!
我已经改好了.
广告位移至:内容之下,紧接着内容:
搜索:
<!–{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread1'][$post['count']])}–><div class="ad_textlink1" id="ad_thread1_$post[count]">$advlist[thread1][$post[count]]</div><!–{else}–><div id="ad_thread1_$post[count]"></div><!–{/if}–>
移至: <!–{if $post['attachment']}–>
前面。也就是附件列表的前面。