#############################################
插件名称:DZ知道
适用版本:DZ5
作 者:wxyuan90
数据升级:无
演 示:
功能说明:高度仿百度知道,提取指定板块悬赏贴,该板块不得发普通帖子
,该板块新帖按钮自动转向到发悬赏页面
备 注:使用了缓存技术,速度绝对有保证
最后更新:2006/11/18
#############################################
全新安装开始:
1、上传附件(注意是本楼的那个)
2、修改/include/newthread.inc.php
找- $db->query("INSERT INTO {$tablepre}threads (fid, readperm, price, iconid, typeid, author, authorid, subject, dateline, lastpost, lastposter, displayorder, digest, blog, special, attachment, subscribed, moderated, supe_pushstatus,cid)
- VALUES ('$fid', '$readperm', '$price', '$iconid', '$typeid', '$author', '$discuz_uid', '$subject', '$timestamp', '$timestamp', '$author', '$displayorder', '$digest', '$blog', '$special', '$attachment', '$subscribed', '$moderated', '$supe_pushstatus','$city_id')");
复制代码
后面加
- if ($price<>0) {
- $zhidaoref=1;
- require_once './zhidao.php';}
复制代码
找后面加- if ($forum['fid']==$zhidao_fid && !$rewardprice && $topicsubmit) showmessage('知道板块中只能发悬赏贴!');
复制代码
3、修改/include/common.inc.php
最后?>之前加
- $zhidao_fid=7; //知道板块的FID
复制代码
自己修改其中的数值为知道板块的FID
4、后台设定对应FID的论坛中启用至少一个主题分类
5、修改templates/default/forumdispay.htm
找- <!--{if $allowpost || !$discuz_uid}-->
- <div id="newspecialheader" class="right"><a href="post.php?action=newthread&fid=$fid&extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" class="absmiddle" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" class="absmiddle" alt="" /></a><script type="text/javascript">menuregister(false, "newspecialheader", true)</script></div>
- <!--{if ($allowposttrade && $ec_id) || $allowpostpoll || $allowpostreward || $allowpostactivity || !$discuz_uid}-->
- <div class="popupmenu_popup newspecialmenu" id="newspecialheader_menu" style="display: none">
- <table cellpadding="4" cellspacing="0" border="0" width="100%">
- <!--{if $allowpostpoll || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&poll=yes">{lang thread_poll}</a></div></td></tr><!--{/if}-->
- <!--{if ($allowposttrade && $ec_id) || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&trade=yes">{lang thread_trade}</a></div></td></tr><!--{/if}-->
- <!--{if $allowpostreward || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&reward=yes">{lang thread_reward}</a></div></td></tr><!--{/if}-->
- <!--{if $allowpostactivity || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&activity=yes">{lang thread_activity}</a></div></td></tr><!--{/if}-->
- </table></div>
- <!--{/if}-->
- <!--{/if}-->
复制代码
替换为- <!--{if (($allowpost || !$discuz_uid) && $fid<>$zhidao_fid)}-->
- <div id="newspecialheader" class="right"><a href="post.php?action=newthread&fid=$fid&extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" class="absmiddle" alt="" /></a><a href="###"><img src="{IMGDIR}/newspecial.gif" border="0" class="absmiddle" alt="" /></a><script type="text/javascript">menuregister(false, "newspecialheader", true)</script></div>
- <!--{if ($allowposttrade && $ec_id) || $allowpostpoll || $allowpostreward || $allowpostactivity || !$discuz_uid}-->
- <div class="popupmenu_popup newspecialmenu" id="newspecialheader_menu" style="display: none">
- <table cellpadding="4" cellspacing="0" border="0" width="100%">
- <!--{if $allowpostpoll || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&poll=yes">{lang thread_poll}</a></div></td></tr><!--{/if}-->
- <!--{if ($allowposttrade && $ec_id) || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&trade=yes">{lang thread_trade}</a></div></td></tr><!--{/if}-->
- <!--{if $allowpostreward || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&reward=yes">{lang thread_reward}</a></div></td></tr><!--{/if}-->
- <!--{if $allowpostactivity || !$discuz_uid}--><tr><td class="popupmenu_option"><div class="newspecial"><a href="post.php?action=newthread&fid=$fid&extra=$extra&activity=yes">{lang thread_activity}</a></div></td></tr><!--{/if}-->
- </table></div>
- <!--{/if}-->
- <!--{/if}-->
- <!--{if $fid==$zhidao_fid}-->
- <div id="newspecialheader" class="right"><a href="post.php?action=newthread&reward=yes&fid=$fid&extra=$extra"><img src="{IMGDIR}/newtopic.gif" border="0" class="absmiddle" alt="" /></a></div>
- <!--{/if}-->
复制代码
6、适当地方添加链接www.xxx.com/zhidao.php
全新安装结束
[ 本帖最后由 wxyuan90 于 2006-11-18 22:08 编辑 ] |