热搜:6KBBS6kbbs V8.0 官方论坛
当前位置: 6kbbs V8.0 官方论坛 » 模板下载 » 支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
帖子状态  
本帖子共有 1558 位阅读者, 13 个回复.
  • 回复
14条记录

mwjboss

幼儿园
帖子
金钱
魅力
威望
注册
2010-10-21 
mwjboss 发表于 2010-10-21 07:09   
支持一下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;
?>
-->

mwjboss

幼儿园
帖子
金钱
魅力
威望
注册
2010-10-21 
mwjboss 发表于 2010-10-21 08:38   
忘了还有一个SWF文件请上传到根目录
右键另存文件地址
http://shen.me/rollpic.swf

dos_cc

超级版主
帖子
280 
金钱
391 
魅力
392 
威望
391 
头衔
DOS.CC 
注册
2010-10-23 
dos_cc 发表于 2010-11-09 11:27   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
不错啊,收下了!

dos_cc

超级版主
帖子
280 
金钱
391 
魅力
392 
威望
391 
头衔
DOS.CC 
注册
2010-10-23 
dos_cc 发表于 2010-11-11 23:31   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
怎样连续播放图片!?

piaowings

幼儿园
帖子
金钱
14 
魅力
14 
威望
14 
注册
2010-11-13 
piaowings 发表于 2010-11-13 19:52   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
怎么用呀楼主

dos_cc

超级版主
帖子
280 
金钱
391 
魅力
392 
威望
391 
头衔
DOS.CC 
注册
2010-10-23 
dos_cc 发表于 2010-11-13 21:39   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
我试过,但只能显示最新发帖的一张图片,不知道还需要修改哪些地方!

ssay

幼儿园
帖子
金钱
魅力
威望
注册
2010-11-09 
ssay 发表于 2010-11-13 23:43   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片

dos_cc

超级版主
帖子
280 
金钱
391 
魅力
392 
威望
391 
头衔
DOS.CC 
注册
2010-10-23 
dos_cc 发表于 2010-11-16 11:13   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
太谢谢楼主了!

yinnianlong

幼儿园
帖子
金钱
魅力
威望
注册
2010-12-09 
yinnianlong 发表于 2010-12-09 20:08   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
还是没弄明白多格怎么用啊
能否说明下

dos_cc

超级版主
帖子
280 
金钱
391 
魅力
392 
威望
391 
头衔
DOS.CC 
注册
2010-10-23 
dos_cc 发表于 2010-12-09 21:19   
RE:支持一下6kbbs的蓝色模板,我给论坛首页加了个图片幻灯片
GIF图片格式会造成显示不正常!
  • 回复
14条记录