天使网赚论坛

 找回密码
 立即注册
查看: 2849|回复: 0

关于({完美五格}最新图片+主题+回复+精华+发贴)修改细节

[复制链接]

334

主题

361

帖子

1万

积分

超级版主

心灵欢迎您的光临

Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40Rank: 40

积分
10273

终身成就奖优秀斑竹奖宣传大使奖特殊贡献奖金点子奖原创先锋奖贴图大师奖灌水天才奖新人进步奖幽默大师奖

QQ
心灵 发表于 2007-8-27 09:16:30 | 显示全部楼层 |阅读模式
刚看了下,几位朋友修改的插件,关于 最新五格调用版+横排美化(图片+最新主题+最新回复+社区精华+今日发贴)


只提供附件没有提供修改方案,下面我大体说下。

/image  无须担心,直接上传就可以。
/template/wind  包含index.htm thread_children.htm

如果你没有修改过index.htm,并使用wind风格,那么无须看以下操作 直接上传就可以。若不是请往下看。

打开你的template/风格/index.htm
查找:
Copy code
<!--<?php 第一行了。
添加:
Copy code
//首页调用开始
//幻灯图开始
$cachepics=R_P.\"data/bbscache/index_toppics.php\";//幻灯图片缓存文件
$cachepicstime=300;//幻灯图片缓存自动更新时间,单位秒
if (($timestamp-@filemtime($cachepics)>=$cachepicstime)){
$query=$db->query(\"SELECT tm.tid,tm.fid,tm.subject,t.attachurl FROM pw_threads tm
LEFT JOIN pw_attachs t ON t.tid = tm.tid
WHERE t.type=&#39;img&#39; and ifcheck=&#39;1&#39;
ORDER BY postdate DESC
LIMIT 60
\");//LIMIT 30 可以根据需要调整,我这里是估算每个主题有6张图片的情况下。

$imgcontent=\"<?php\\n\";
$pics=$links=$texts=\"\";
$rs_i=0;
while ($imginfo = $db->fetch_array($query) and $rs_i<6) {//i只调用6张图片
if(($rs_tid!=$imginfo[tid])&&(eregi(\"\\.(jpg)$\",$imginfo[attachurl]))){
  $pics.=$db_bbsurl.\"/\".$attachpath.\"/\".$imginfo[attachurl].\"|\";
  $links.=$db_bbsurl.\"/read.php?tid=\".$imginfo[tid].\"|\";
  $texts.=$imginfo[subject].\"|\";
  $rs_i++;//同一主题的只要最后上传的那张图片
}
$rs_tid=$imginfo[tid];
}

$pics=substr($pics,0,-1);
$links=substr($links,0,-1);
$texts=substr($texts,0,-1);

$pics=&#39;$pics=\"&#39;.$pics.&#39;\";&#39;;
$links=&#39;$links=\"&#39;.$links.&#39;\";&#39;;
$texts=&#39;$texts=\"&#39;.$texts.&#39;\";&#39;;

$imgcontent = $imgcontent.$pics.\"\\n\".$links.\"\\n\".$texts.\"\\n?>\";
writeover($cachepics,$imgcontent);
}
@require_once($cachepics);
//幻灯图结束

//会员排行+主题排行开始
$cachelist=R_P.\"data/bbscache/index_toplist.php\";//主题排行缓存文件
$cachelisttime=60;//主题排行自动更新时间,单位秒
if (($timestamp-@filemtime($cachelist)>=$cachelisttime)){
$listnum=10;//主题显示个数
$listlength=26;//主题标题长度
$memberposttoday=$newthreads=$digestthreads=$replythreads=\"\";

//会员当日发帖排行开始
$query=$db->query(\"SELECT m.uid,m.username,md.todaypost FROM pw_members m LEFT JOIN pw_memberdata md USING(uid) WHERE md.lastpost>&#39;$tdtime&#39; ORDER BY md.todaypost DESC limit 0,$listnum\");
$c_i=1;//初始化图片序号
while($members=$db->fetch_array($query)){
$memberposttoday.=\"<img src=&#39;$imgpath/top/c_\".$c_i.\".gif&#39; align=&#39;absmiddle&#39; width=&#39;11&#39; height=&#39;11&#39;> <a href=&#39;profile.php?action=show&uid=$members[uid]&#39;>$members[username]</a> $members[todaypost]<br />\";
$c_i++;
}
unset($members);
unset($c_i);
//会员当日发帖排行结束

//最新发表主题开始
$query = $db->query(\"SELECT tid,author,subject,postdate FROM pw_threads order by postdate desc limit 0,$listnum\");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[postdate]=date(\"Y-m-j g:i\",$threads[postdate]);
$threads[subject]=substrs($threads[subject],$listlength);
$newthreads.=\"<img src=&#39;$imgpath/top/c_\".$c_i.\".gif&#39; align=&#39;absmiddle&#39; width=&#39;11&#39; height=&#39;11&#39;> <a href=&#39;read.php?tid=$threads[tid]&#39; title=&#39;作者threads[author] 时间threads[postdate]&#39;>$threads[subject]</a><br />\";
$c_i++;
}
unset($threads);
unset($c_i);
//最新发表主题结束

//社区精华主题开始
$query = $db->query(\"SELECT tid,author,subject,hits FROM pw_threads where digest > 0 order by postdate desc limit 0,$listnum\");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[subject]=substrs($threads[subject],$listlength);
$digestthreads.=\"<img src=&#39;$imgpath/top/c_\".$c_i.\".gif&#39; align=&#39;absmiddle&#39; width=&#39;11&#39; height=&#39;11&#39;> <a href=&#39;read.php?tid=$threads[tid]&#39; title=&#39;作者threads[author] 浏览threads[hits]&#39;>$threads[subject]</a><br />\";
$c_i++;
}
unset($threads);
unset($c_i);
//社区精华主题结束

//最新回复主题开始
$query = $db->query(\"SELECT tid,author,subject,replies,lastpost FROM pw_threads order by lastpost desc limit 0,$listnum\");
$c_i=1;//初始化图片序号
while($threads=$db->fetch_array($query)){
$threads[lastpost]=date(\"Y-m-j g:i\",$threads[lastpost]);
$threads[subject]=substrs($threads[subject],$listlength);
$replythreads.=\"<img src=&#39;$imgpath/top/c_\".$c_i.\".gif&#39; align=&#39;absmiddle&#39; width=&#39;11&#39; height=&#39;11&#39;> <a href=&#39;read.php?tid=$threads[tid]&#39; title=&#39;作者threads[author] 回复threads[lastpost]&#39;>$threads[subject]</a><br />\";
$c_i++;
}
unset($threads);
unset($c_i);
//最新回复主题结束

@writeover($cachelist,\"<?php\\n\\$memberonline=\\\"$memberonline\\\";\\n\\$memberposttoday=\\\"$memberposttoday\\\";\\n\\$newthreads=\\\"$newthreads\\\";\\n\\$digestthreads=\\\"$digestthreads\\\";\\n\\$replythreads=\\\"$replythreads\\\";\\n\\$membersmoney=\\\"$membersmoney\\\";\\n\\$membersrvrc=\\\"$membersrvrc\\\";\\n\\$memberscredit=\\\"$memberscredit\\\";\\n\\$membersvalue=\\\"$membersvalue\\\";\\n\\$membersonlinetime=\\\"$membersonlinetime\\\";\\n\\$membersdigests=\\\"$membersdigests\\\";\\n?>\");
}
@require_once($cachelist);
//会员排行+主题排行结束

//首页调用结束

查找:127行,查到</table></div>

添加:
Copy code
<!-- 主题排行开始 -->
<div class=\"t\">
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">
<tr class=\"tr3 tac\">
  <td width=\"18%\"><span class=\"b\" style=\"color:#FF6699\">社区最新图片</span></td>
  <td width=\"22%\"><span class=\"b\" style=\"color:#669900\">最新发表主题</span></td>
  <td width=\"22%\"><span class=\"b\" style=\"color:#0066FF\">最新回复主题</span></td>
  <td width=\"22%\"><span class=\"b\" style=\"color:#FF9933\">社区精华主题</span></td>
  <td width=\"16%\"><span class=\"b\" style=\"color:#FF3300\">今日发贴排行</span></td>
</tr>
<tr class=\"tr3\">
  <td align=\"center\">
  <script type=\"text/javascript\">
  <!--
   var focus_width=165
   var focus_height=140
   var swf_height = focus_height
   var swf_height = focus_height

   var pics=\"$pics\"
   var links=\"$links\"

   document.write(&#39;<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"&#39;+ focus_width +&#39;\" height=\"&#39;+ swf_height +&#39;\">&#39;);
   document.write(&#39;<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"*****\" value=\"{$imgpath}/pixviewer.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#F4FBFF\">&#39;);
   document.write(&#39;<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">&#39;);
   document.write(&#39;<param name=\"FlashVars\" value=\"pics=&#39;+pics+&#39;&links=&#39;+links+&#39;&borderwidth=&#39;+focus_width+&#39;&borderheight=&#39;+focus_height+&#39;\">&#39;);
   document.write(&#39;<embed src=\"{$imgpath}/pixviewer.swf\" wmode=\"opaque\" FlashVars=\"pics=&#39;+pics+&#39;&links=&#39;+links+&#39;&borderwidth=&#39;+focus_width+&#39;&borderheight=&#39;+focus_height+&#39;\" menu=\"false\" bgcolor=\"#F4FBFF\" quality=\"high\" width=\"&#39;+ focus_width +&#39;\" height=\"&#39;+ swf_height +&#39;\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />&#39;);
   document.write(&#39;</object>&#39;);
  //-->
  </script>
  </td>
  <td class=\"f_two\" style=\"vertical-align:top;\">$newthreads</td>
  <td style=\"vertical-align:top;\">$replythreads</td>
  <td class=\"f_two\" style=\"vertical-align:top;\">$digestthreads</td>
  <td style=\"vertical-align:top;\">$memberposttoday</td>
</tr>
</table>
</div>
<!-- 主题排行结束 -->


到此,完毕。

完美五格.rar

24 KB, 下载次数: 201

虽然生活在同一个世界里,但却被一面玻璃墙隔开。
在彼此的世界里面,我可以看到你在哭,你可以看到我在笑;
但是我永远也无法感触到你的体温,就像你永远也无法感觉到我的心跳。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

天使网赚论坛创建于2008年8月,本站内容均为会员发表,并不代表本论坛立场!
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论!
天使网赚论坛法律顾问:ITlaw-庄毅雄

QQ|小黑屋|Archiver|天使网赚论坛 |网站地图

GMT+8, 2024-4-19 16:59 , Processed in 0.091628 second(s), 34 queries .

快速回复 返回顶部 返回列表