Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

首页点歌台for2.5sp1(不知还有没有人想要)

[复制链接]
jafeey 发表于 2005-10-19 15:58:08 | 显示全部楼层 |阅读模式
昨晚因论坛会员强烈要求弄一个!就试着弄弄!结果弄出来!已测试!没有任何问题

适用版本:2.5F SP1

修改文件: index.php

修改模板: index.htm

难度:         非常简易

需要安装插件:社区俱乐部2.1(2.0也应该行)

演示:http://jafeey.5wish.com/bbs

打开index.php

找到

  1. if(empty($gid)) {
复制代码


在前面添加

  1. /* 点歌台For D25 */

  2. $songlist = '';
  3. $song = array();
  4. $query = $db->query("SELECT * FROM cdb_clubsong ORDER BY stime DESC LIMIT 0, 10");
  5.         while($song = $db->fetch_array($query)) {
  6.            $songlists .= "<a href="####" onclick="javascript:window.open('plugins.php?p=club&index=hearsong&songid=$song[sgid]','','width=450,height=500,scrollbars=yes')"><font color=blue><b>".$song[username]."</font></b> 为 <font color=red><b>".$song[touser]."</b></font> 送上一首 《".$song[songname]."》 </a>&nbsp;&nbsp;&nbsp;&nbsp;";
  7.         }

  8. /* 点歌台For D25 */
复制代码


打开index.htm

找到

  1. <!--{if !empty($newpmexists)}-->
复制代码


在前面加入

  1. <!--{if empty($gid)}-->
  2.         <table border="0" cellspacing="0" cellpadding="0" width="{TABLEWIDTH}" bgcolor="{BORDERCOLOR}" align="center">
  3.         <tr><td>
  4.         <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
  5.         <tr class="header"><td colspan="3">$bbname 点歌台<a href=plugins.php?p=club&index=addsong><font color=>[我要点歌]</font></a></td></tr>
  6.         <tr bgcolor="{ALTBG2}" align="center">
  7.         <td colspan="3" align="center">
  8.         <!--{if empty($announcements)}-->
  9.                 {lang index_noannouncement}
  10.         <!--{else}-->
  11.                 <marquee direction="left" scrollamount="3" onMouseOver="this.stop();" onMouseOut="this.start();">
  12.                 $songlists
  13.                 </marquee>
  14.         <!--{/if}-->
  15.         </td></tr></table></td></tr></table>
  16. <!--{/if}-->
复制代码


其中<tr class="header"><td colspan="3">$bbname 点歌台<a href=plugins.php?p=club&index=addsong><font color=>[我要点歌]</font></a></td></tr>里的plugins.php?p=club&index=addsong改为你点歌台的连接地址(默认是我论坛里的)

关于两个公告显示!
freddy在9楼有更新

[ 本帖最后由 jafeey 于 2005-10-19 17:36 编辑 ]

评分

1

查看全部评分

蓝精灵2315 发表于 2005-10-19 16:05:41 | 显示全部楼层
哈哈
回复

使用道具 举报

beecheung 发表于 2005-10-19 16:11:56 | 显示全部楼层
支持原创
回复

使用道具 举报

3com3 发表于 2005-10-19 16:15:20 | 显示全部楼层
先顶了再看!~~
回复

使用道具 举报

 楼主| jafeey 发表于 2005-10-19 16:42:21 | 显示全部楼层
谢谢楼上几位支持
回复

使用道具 举报

seilu 发表于 2005-10-19 16:46:02 | 显示全部楼层
這個還需要裝其他的支持插件麽?
回复

使用道具 举报

5025488.net 发表于 2005-10-19 16:47:30 | 显示全部楼层
需要安装俱乐部
回复

使用道具 举报

freddy 发表于 2005-10-19 17:05:16 | 显示全部楼层
是楼主原创吗?我现在测试一下!
回复

使用道具 举报

freddy 发表于 2005-10-19 17:21:51 | 显示全部楼层
测试成功!但。。。你这样改会出现两个公告显示。。。汗个。。如果没有公告,首页会出现两个:
目前没有公告。。汗个。。
我改了一下~

在index.htm的


  1.         <!--{if empty($announcements)}-->
  2.                 {lang index_noannouncement}
  3.         <!--{else}-->
  4.                 <marquee direction="left" scrollamount="3" onMouseOver="this.stop();" onMouseOut="this.start();">
  5.                 $announcements
  6.                 </marquee>
  7.         <!--{/if}-->
复制代码


之后,加入:


  1.         <tr class="header"><td colspan="3">$bbname 点歌台<a href=plugins.php?p=club&index=addsong><font color=>[我要点歌]</font></a></td></tr>
  2.         <tr bgcolor="{ALTBG2}" align="center">
  3.         <td colspan="3" align="center">
  4.                 <marquee direction="left" scrollamount="3" onMouseOver="this.stop();" onMouseOut="this.start();">
  5.                 $songlists
  6.                 </marquee>
复制代码
回复

使用道具 举报

 楼主| jafeey 发表于 2005-10-19 17:37:26 | 显示全部楼层
原帖由 freddy 于 2005-10-19 17:21 发表
测试成功!但。。。你这样改会出现两个公告显示。。。汗个。。如果没有公告,首页会出现两个:
目前没有公告。。汗个。。
我改了一下~

在index.htm的

[code]
        <!--{if empty($announcements)}-->
...

谢谢加与修改
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-21 19:08 , Processed in 0.116987 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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