字体:  

[湖湘学生网 5.1献礼!]DZ home首页6.1 DIV+CSS (更新于05-21 21:20)

aiens 发表于: 2008-5-01 01:19 来源: SupeSite/X-Space官方站

五一来了。
湖湘学生网 献给 各位 MJJ的 小礼物。
DIV+CSS 架构。
测试通过 IE6+IE7+火狐。


湖湘学生网-弘扬湖湘学生文化.jpg


仿chinaz新版首页。
演示: www.hunanx.com/bbs

采用数据库调用方式。(部分JS调用@条头简介)

涉及文件  index.php
                 home/images
                 templates/default/home.htm
                 hotpic.php

时间有限,有问题我尽量帮助。
希望下载的朋友帮我做个链接。  http://www.hunanx.com

免费才是硬道理!

更新了部分文件 修复已发现的错误。

   //////共享了 部分站内JS txt 后台导入就可以。//////

最新更新时间 05-07 15:30   修正版主推荐处的字数问题。 方法 2楼


2楼有参考使用方法  更新了点点  时间有限 不能一一回复  见谅! 大家记住 我是湖南站长 就可以了  ~




http://www.discuz.net/viewthread ... ;page=12#pid7333150
这里是网友提供的一些修正错误的办法!感谢之~~~


希望网友们互相帮助,我时间也紧,回复得慢。

共进 ~~~ 大家!

[ 本帖最后由 aiens 于 2008-5-27 22:19 编辑 ]

hunanx.rar
(2008-05-02 19:13:31, Size: 268 KB, Downloads: 2552)

discuz_request_20080502.txt
(2008-05-02 20:30:27, Size: 38.2 KB, Downloads: 740)

最新回复

aiens at 2008-5-01 01:21:00
使用方法:


直接把  hunanx.rar压缩包解压后 上传压缩包里面的文件到根目录
上传到BBS根目录
   DZ后台修改首页文件为其他 例如 BBS.php  (原index.php 也需FTP改名)

1.找到 index.php

QUOTE:

//头条置顶帖
$hack_cut_str = 40; //标题字数
$hack_cut_strauthor = 9;
$fid2_new_top_hot_threadlist = array();
$mthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid='138' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND f.fid not in (0) AND t.displayorder in (1) ORDER BY t.dateline DESC LIMIT 0, 1");
while($mthread = $db->fetch_array($query)) {
        $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
        $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
                $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
                $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
        $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
        if($mthread['highlight']) {
                $string = sprintf('%02d', $mthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $mthread['highlight'] = 'style="';
                $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $mthread['highlight'] .= '"';
        } else {
                $mthread['highlight'] = '';
        }
        $fid_toutiao_new_top_hot_threadlist[] = $mthread;
}
//头条置顶帖结束
.

其中 138 就是 fid,修改成你自己的FID就可以了。

QUOTE:

$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid in (122) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 16");
fid in (122)    这里的  122 就是 版块号   依次类推修改

修改显示 行数  就是  LIMIT 0, 16   
  16 来控制行数。




其他板块 采用类似的方法 修改 fid即可。

2.部分帖子的简介是站内JS调用,你们到后台调用帖子的 {message} (帖子简介)   可以下载我导出的TXT文本 再导入

3.根据自己的站做一些修改,就可以了。

home.htm
修改头部导航
  hot栏目
一些广告图片 链接 logo 等等





注意:
Get_FeedBack.htm 这个是静态的  可以到 home.htm 删除 换成其他的。



05-07 更新
版主推荐字数控制代码。

QUOTE:

//版主推荐
$hack_cut_str = 22; //标题字数
$recommendlist = array();
$query = $db->query("SELECT tid, fid, author, authorid, subject FROM {$tablepre}forumrecommend ORDER BY displayorder LIMIT 4");
while($recommend = $db->fetch_array($query)) {
        if(($recommend['expiration'] && $recommend['expiration'] > $timestamp) || !$recommend['expiration']) {
            $recommend['subject'] = cutstr($recommend['subject'],$hack_cut_str);
                $recommend['forumname'] = $_DCACHE['forums'][$recommend['fid']]['name'];
                $recommendlist[] = $recommend;
        }
}
替换index.php 中的原 版主推荐 代码 就可以。

[ 本帖最后由 aiens 于 2008-5-7 15:32 编辑 ]
kisslbz at 2008-5-01 01:21:03
楼主 没有加图,版规刚修改的 要小心删帖
酒色沉醉 at 2008-5-01 01:21:28
刚看到 回复就成。。。。哎 太快了
kisslbz at 2008-5-01 01:22:46
艾 我还以为在沙发上提醒楼主,谁知道做到板凳上提醒的
酒色沉醉 at 2008-5-01 01:22:51
等下看   不错
翔安网 at 2008-5-01 01:23:52
支持一下先
hysnwy at 2008-5-01 01:23:55
怎么没有下载啊
aiens at 2008-5-01 01:31:14
更新了 呵呵 我还在编辑帖子 你们就回复 了!
aiens at 2008-5-01 01:33:36
下载的都回个帖 支持下 呵呵!
hysnwy at 2008-5-01 01:35:46
我接着帮你顶上
hysnwy at 2008-5-01 01:36:35
能问下楼主的QQ吗,我有事找你,谢谢
aiens at 2008-5-01 01:37:30

QUOTE:

原帖由 hysnwy 于 2008-5-1 01:36 发表
能问下楼主的QQ吗,我有事找你,谢谢
QQ 250396075
hysnwy at 2008-5-01 01:38:28
谢谢楼主了,麻烦了
aiens at 2008-5-01 01:58:16
先休息去了 88
hysnwy at 2008-5-01 02:05:27
很欣赏楼主的免费才是王道,佩服你
ilysony at 2008-5-01 02:09:22
楼主无私的精神,敬佩
sobvow at 2008-5-01 02:28:41
不错。。。
easyker at 2008-5-01 02:28:53
liuji7899223 at 2008-5-01 03:03:00
楼主  导航有问题啊,最后面的 3个导航 鼠标移动到上面后只显示一点点下拉菜单 !!
你检查下 在IE7 下是这样 IE6 不知道!!

就那
他们都说
我要投稿
真实交友
这3个导航

[ 本帖最后由 liuji7899223 于 2008-5-1 03:04 编辑 ]
wuqing585 at 2008-5-01 03:09:25
你真是太有才了