热搜:6KBBS6kbbs V8.0 官方论坛
当前位置: 6kbbs V8.0 官方论坛 » 查看mwjboss的资料
用google搜索代替6kbbs原有的搜索,高速,还有的钱赚

实例见:http://shen.me
有问题可以和我联系
qq:5210001
需要修改的内容有
header.htm
这是我的header文件:

  1. <!--<?php
  2. $forumstr='';
  3. $formustr_n=0;
  4. foreach($cache_forums as $h_forum){
  5. if(intval($h_forum['pid'])==0){
  6. if(++$formustr_n>5){break;}
  7. $forumstr.="<li class=\"header_121_a\" id=\"hmenu_fid{$h_forum['id']}\"><a href=\"index.php?fid={$h_forum['id']}\">{$h_forum['forumname']}</a></li>";
  8. }
  9. }
  10. $tmp_str='';
  11. foreach($cache_template as $tmp){
  12. $tmp_str.="<li><a href=\"index.php?styleid={$tmp['id']}\" style=\"color:{$tmp['color1']}\"><span style=\"background:{$tmp['color1']}; display:block; margin-top:11px; width:10px; height:10px; float:left; overflow:hidden;\"></span>{$tmp['name']}</a></li>";
  13. }
  14. $plugins_str='';
  15. foreach($cache_plugins as $plg){
  16. $plugins_str.="<li><a href=\"{$plg[link]}\">{$plg['name']}</a></li>";
  17. $pluginscode.=$plg['code'];
  18. }
  19. if(!empty($cache_plugins)){
  20. $plugins_menu="<li class=\"header_121_a\" id=\"hmenu_plugins\" onmouseover=\"selectMenu(this.id)\"><a href=\"#\">插件</a></li>";
  21. }
  22. if($cache_settings['openportal']=='1'){
  23. $sys_menu="<a href=\"{$_SYS['portalurl']}\">门户</a> | <a href=\"{$_SYS['indexurl']}\">论坛</a>";
  24. }else{
  25. $sys_menu="<a href=\"{$_SYS['indexurl']}\">论坛首页</a>";
  26. }
  27. print <<<EOT
  28. -->
  29. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  30. <html xmlns="http://www.w3.org/1999/xhtml">
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  33. <title>{$headtitle}</title>
  34. {$headmeta}
  35. {$cache_settings['headcontent']}
  36. <link href="{$_SYS['TP']}/css.php?t=templatecss&s={$_SYS['styleid']}&v={$_SYS['VERSION']}&f=global" rel="stylesheet" type="text/css" />
  37. </head>
  38. <body>
  39. <div class="header_top">
  40. <div class="div_out_onbg header_center">
  41. <div class="header_top_left">{$sys_menu}</div>
  42. <div class="header_top_right">

  43. <!--
  44. EOT;
  45. if(isLogin()){
  46. print <<<EOT
  47. -->
  48. <a href="member.php">欢迎您: {$lg['displayname']}</a> | {$msg_link} | <a href="member.php">个人中心</a> | <a href="logout.php">退出</a>
  49. <!--
  50. EOT;
  51. if($lg['groupid']==GROUP_ADMIN){
  52. print <<<EOT
  53. -->
  54. | <a href="admin" target="_blank">后台管理</a>
  55. <!--
  56. EOT;
  57. }
  58. }else{
  59. print <<<EOT
  60. -->
  61. <a href="login.php">会员登录</a> | <a href="{$cache_settings['signupfilename']}">会员注册</a>
  62. <!--
  63. EOT;
  64. }
  65. print <<<EOT
  66. -->

  67. </div>
  68. </div>
  69. </div>
  70. <div class="header">
  71. <table class="header_table"><tr><td class="header_table_left"><a href="{$_SYS['indexurl']}"><img src="logo/logo.gif" border="0" /></a></td><td class="header_table_right"><div class="logoright">{$adcode[1]}</div></td></tr></table>
  72. </div>
  73. <div class="div_out_onbg">
  74. <table class="header_1_table"><tr><td class="header_11"></td><td class="header_121">
  75. <ul><li class="header_121_a"><a href="http://shen.me/">论坛首页</a></li>{$forumstr}{$plugins_menu}</ul>
  76. </td>
  77. <td class="header_13"></td></tr></table>
  78. <table class="header_2_table"><tr><td class="header_21"></td>
  79. <td class="header_22" id="secmenu"><table border="0" cellpadding="0" cellspacing="0"><tr><form action="http://shen.me/search.php" id="cse-search-box"><td> 站内搜索:</td><td width="250pt">
  80. <input type="hidden" name="cx" value="partner-pub-9372656533990607:gtq2ktyi79p" />
  81. <input type="hidden" name="cof" value="FORID:10" />
  82. <input type="hidden" name="ie" value="UTF-8" />
  83. <input type="text" name="q" style="border: 1px solid #D4D0C8; width: 250px;"/></td><td>
  84. <input type="submit" name="sa" value="找什么" style="BORDER-RIGHT: #7b9ebd 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7b9ebd 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde); BORDER-LEFT: #7b9ebd 1px solid; CURSOR: hand; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: #7b9ebd 1px solid
  85. "/></td></form><td>
  86. <span id="sec_hmenu_bbs" style="display:none;"><ul><li><a href="search.php?action=new">今日新帖</a></li><li><a href="search.php?action=good">精华帖子</a></li><li><a href="search.php">论坛搜索</a></li><li><a href="userlist.php">会员列表</a></li></ul></span>
  87. <span id="sec_hmenu_member" style="display:none;"><ul><li><a href="member.php?action=pic">我的头像</a></li><li><a href="member.php?action=details">个人资料</a></li><li><a href="member.php?action=password">密码设置</a></li><li><a href="member.php?action=msg">站内短信</a></li><li><a href="member.php?action=group">我的用户组/积分</a></li><li><a href="member.php?action=mytopic">我发表的帖子</a></li><li><a href="member.php?action=replytopic">我参与的帖子</a></li></ul></span>
  88. <span id="sec_hmenu_template" style="display:none;"><ul>{$tmp_str}</ul></span>
  89. <span id="sec_hmenu_plugins" style="display:none;"><ul>{$plugins_str}</ul></span></td></tr></table></td><td class="header_23"></td></tr></table>
  90. </div>
  91. {$pluginscode}
  92. <!--body container BEGIN--><table class="container_0"><tr><td class="topleft"></td><td class="topcenter"></td><td class="topright"></td></tr>
  93. <tr><td class="middleleft"></td><td class="middlecenter">
  94. <!--
  95. EOT;
  96. ?>
search.htm
这是search.htm文件
  1. <!--<?php
  2. $forum=$cache_forums[$fid];
  3. print <<<EOT
  4. -->
  5. <div class="position"><span>当前位置:</span> {$_SYS['positionindex']} » <a href="search.php">搜索</a></div>
  6. <!--//检索-->
  7. <div id="cse-search-results"></div>
  8. <script type="text/javascript">
  9. var googleSearchIframeName = "cse-search-results";
  10. var googleSearchFormName = "cse-search-box";
  11. var googleSearchFrameWidth = 900;
  12. var googleSearchDomain = "www.google.cn";
  13. var googleSearchPath = "/cse";
  14. </script>
  15. <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>


  16. <!--//检索-->

  17. <div class="div_clear" style="height:6px;"></div>
  18. <div class="pagediv">
  19. <table class="pagetable"><tr><td class="left"></td><td class="right">{$pager->getPageStr()}</td></tr></table>
  20. </div>
  21. </div>
  22. <script type="text/javascript" src="getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|choosedate|popwin|ajax|search"></script>
  23. <script type="text/javascript">
  24. var action="{$action}";
  25. var fid="{$fid}";
  26. var area="{$area}";
  27. var topictypestr="{$topictypestr}";
  28. var topicspc="{$topicspc}";
  29. window.onload = search_InitPage;
  30. </script>
  31. <!--
  32. EOT;
  33. ?>
  34. -->
两个文件

所在版块:模板下载 - 发表时间: 2010-11-23 08:49
支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片

下面是/template/bluedream/index.htm源文件,替换可得其效果
详细效果大家可以看http://shen.me首页图片幻灯片
<!--<?php
print <<<EOT
-->

<div class="div_out_inner_nobg">
<table width="100%"><tr><td class="position" style="width:400px;"><span>当前位置:</span> {$_SYS['positionindex']} » <a href="{$_SYS['indexurl']}">首页</a></td>
<td>
<div class="static_out">
<ul>
  <li>今日<em><a href="search.php?action=new">{$cache1['todaynum']}</a></em></li>
  <li>昨日<em>{$cache1['yesterdaynum']}</em></li>
  <li>最高日<em>{$cache1['mostnum']}</em></li>
  <li>主题<em>{$cache1['topicsnum']}</em></li>
  <li>帖子<em>{$cache1['postsnum']}</em></li>
  <li>会员<em>{$cache1['usersnum']}</em></li>
  <li>新会员<em><a href="user.php?username={$cache1['lastuser']}" class="spc">{$cache1['lastuser']}</a></em></li>
</ul>
</div>
</td></tr></table>
</div>
{$adcode[3]}

<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<div class="div_out index_anc">
<div id="announce_index_div">{$announce_index}</div>
</div>
<!--
EOT;
}
print <<<EOT
-->
<div class="div_out index_hotnew">
<table class="title">
  <tr>
   <td class="left"></td>
   <td>今日推荐</td>
   <td class="right"></td>
  </tr>
</table>
<div class="index_hotnew_out">
<table class="hotnew">
  <tr>
   <td width="200pt">
   <!--
EOT;
$newtopicstr1='';
$newtopics=$db->row_query("select distinct db_topics.title as title,db_attachments.filepath as filepath,min(db_topics.id) as id from db_topics,db_attachments where db_attachments.tid=db_topics.id and db_topics.verifystate=0 and db_topics.isrecycle=0 and db_topics.attachicon='img' group by db_topics.id  order by db_topics.ordertime  desc limit 4");
$newi=0;
foreach($newtopics as $newtopic){
      
  $viewurl=genUrl("view.php?tid={$newtopic['id']}");
  $newtopicstr1.="imgLink[${newi}]='{$viewurl}';\n";
  $newtopicstr1.="imgUrl[${newi}]='uploadfile/attachment/${newtopic['filepath']}';\n";
  $newtopicstr1.="imgtext[${newi}]='{$newtopic['title']}';\n";
$newi++;
}
print <<<EOT
-->
<script type='text/javascript'>
var imgUrl = new Array();
var imgtext = new Array();
var imgLink = new Array();
{$newtopicstr1}
var pics=imgUrl[0];
var links=imgLink[0];
var texts=imgtext[0];
for(var i=1;i<imgUrl.length;i++){
pics+='|'+imgUrl;
links+='|'+imgLink;
texts+='|'+imgtext;
}
var focus_width=196
var focus_height=140
var text_height=0
var swf_height = focus_height+text_height
document.write('<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="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.nwnu.edu.cn/admin/rollpic.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#F0F0F0">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="rollpic.swf" wmode="opaque" FlashVars="pics='+pics+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
</script>
</td><td>
<!--
EOT;
$newtopicstr='';
$newtopics=$db->row_select("topics","verifystate=0 and isrecycle=0",18,"id,fid,title,username,highlight,posttime,ordertime,lastreply","ordertime desc");
$newi=0;
foreach($newtopics as $newtopic){
$newi++;
$newtopic['title']=htmlFilter($newtopic['title']);
$newtopic['username']=htmlFilter($newtopic['username']);
if(!empty($newtopic['highlight'])){
  $newtopic['title']=genHighLighStr($newtopic['highlight'],$newtopic['title']);
}
if($newtopic['posttime']==$newtopic['ordertime']){
  $newtopic['posttime']=getDateStr($newtopic['posttime']);
  $linktitle="{$newtopic['username']} 发表于 {$newtopic['posttime']}";
}else{
  $lastre=explode("\t",$newtopic['lastreply']);
  $linktitle=htmlFilter($lastre[1])." 回复于 ".getDateStr($lastre[0]);
}
$viewurl=genUrl("view.php?tid={$newtopic['id']}");
if($newi<4){
  $newtopicstr.="<li class='bigtitle'><a href=\"{$viewurl}\" title=\"{$linktitle}\" target=\"_blank\">{$newtopic['title']}</a></li>";
}else{
  $newtopicstr.="<li class='normaltitle'><a href=\"{$viewurl}\" title=\"{$linktitle}\" target=\"_blank\">【{$cache_forums[$newtopic['fid']]['forumname']}】{$newtopic['title']}</a></li>";
}
}
print <<<EOT
-->
<ul>{$newtopicstr}</ul>
   </td>
  </tr>
</table>
</div>
</div>
<div class="div_out index_forum">
<table class="title">
  <tr>
   <td class="left"></td>
   <td>论坛版块</td>
   <td class="right"></td>
  </tr>
</table>
<div class="index_fourm_out">
<div class="div_clear" style="height:6px;"></div>

<!--
EOT;
foreach($cache_forums as $forum){
if(intval($forum['pid'])>0 || (!empty($_GET['fid']) && intval($_GET['fid'])!=intval($forum['id']))){
  continue;
}
print<<<EOT
-->
<div class="index_forum_1"><span class="folder_1" id="folder_{$forum['id']}">{$forum['forumname']}</span></div>
<div class="div_out_inner index_forum_2" id="folderdiv_{$forum['id']}">
<!--
EOT;
if(is_array($forum['childfid'])){
  foreach($forum['childfid'] as $cfid){
   $childforum=$cache_forums[$cfid];
   if($childforum['ishidden']=='1'){continue;}
   $forumurl=genUrl("forum.php?fid={$cfid}");
   $viewurl=genUrl("view.php?tid={$childforum['lasttid']}");
   $childforum['lastuser']=htmlFilter($childforum['lastuser']);
   if($forum['showtype']=='0'){
    print<<<EOT
-->
   <table class="index_a3"><tbody><tr><td class="index_a3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_a3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<p>{$childforum['forumcontent']}</p><p>版主: {$childforum['adminsstr']}</p></td><td width="140px" align="center"><span class="topicsnum">{$childforum['topicsnum']}</span> / {$childforum['postsnum']}</td><td width=""><a href="{$viewurl}">{$childforum['lastpost']}</a><br /><a href="user.php?username={$childforum['lastuser']}">{$childforum['lastuser']}</a> - <span class="time">{$childforum['lastposttime']}</span></td></tr></tbody></table>
<!--
EOT;
   }else{
    print<<<EOT
-->
   <div class="index_b"><table class="index_b3"><tbody><tr><td class="index_b3_0"><img src="{$childforum['forumicon']}" border="0" /></td><td class="index_b3_1"><b><a href="{$forumurl}">{$childforum['forumname']}</a></b> (今日:<b class="today">{$childforum['todaynum']}</b>)<br />主题:{$childforum['topicsnum']}   帖子:{$childforum['postsnum']}<br /><span class="lastpost">最后发表:<a href="{$viewurl}">{$childforum['lastuser']}</a></span></td></tr></tbody></table></div>
<!--
EOT;
   }
  }
}
print<<<EOT
-->
<div class="div_clear"></div>
</div>
<!--
EOT;
}
print<<<EOT
-->
</div>
</div>
<div class="div_clear" style="height:12px;"></div>
<div class="div_out index_else">
<table class="title">
  <tr>
   <td class="left"></td>
   <td>论坛其他</td>
   <td class="right"></td>
  </tr>
</table>
<div class="index_else_out">
  <div class="index_a4"><b><a href="online.php">在线用户</a></b> - 共 <b>{$online_allnum}</b> 人在线, <b>{$online_usernum}</b> 位会员, <b>{$online_guessnum}</b> 位访客, 最多 <b>{$cache1['mostonlinenum']}</b> 人发生在 <b>{$cache1['mostonlinetime']}</b> </div>
<!--
EOT;
if(numFilter($cache_settings['indexmostonline'])>0){
print <<<EOT
-->
  <div class="index_a5"><img src="images/group/203.gif" border="0" align="absmiddle" /> 管理员  <img src="images/group/202.gif" border="0" align="absmiddle" /> 超级版主  <img src="images/group/201.gif" border="0" align="absmiddle" /> 版主  <img src="images/group/204.gif" border="0" align="absmiddle" /> 荣誉会员  <img src="images/group/1.gif" border="0" align="absmiddle" /> 会员 </div>
  <div class="index_a5_online">
  <ul>
<!--
EOT;
foreach($index_onlines as $online_online){
print<<<EOT
-->
  <li><img src="images/group/{$online_online['onlineicon']}.gif" border="0" align="absmiddle" /> {$online_online['name']}</li>
<!--
EOT;
}
print<<<EOT
-->  
  </ul>
  </div>
<!--
EOT;
}
print<<<EOT
-->   
  <div class="index_a4"><b>友情链接</b></div>
  <div class="index_a6">
<!--
EOT;
foreach($cache_links_logo as $link){
print<<<EOT
-->
  <a href="{$link['url']}" target="_blank" title="{$link['content']}"><img src="{$link['logo']}" border="0" /></a>
<!--
EOT;
}
print<<<EOT
-->
</div>
<div class="index_a7">
<!--
EOT;
foreach($cache_links_text as $link){
print<<<EOT
-->
  <p><a href="{$link['url']}" target="_blank" title="{$link['content']}">{$link['name']}</a></p>
<!--
EOT;
}
print<<<EOT
-->
<div class="div_clear" style="height:1px;"></div>
    </div>
</div>
</div>
{$adcode[2]}
<script type="text/javascript" src="getfiles.php?t=js&v={$_SYS['VERSION']}&f=util|index"></script>
<!--
EOT;
if(!empty($announce_index)){
print <<<EOT
-->
<script type="text/javascript">
window.onload=function(){
       var o=E("announce_index_div");
       window.setInterval(function(){scrollup(o,22,0);},3000);
}
</script>
<!--
EOT;
}
print <<<EOT
-->
<!--
EOT;
?>
-->

所在版块:模板下载 - 发表时间: 2010-10-21 07:09