QQ群:1号群已满人,2号群建设中
新闻频道 交易信息 求职招聘 房屋租售帮助中心帮助中心
发新话题
打印

关于增加栏目后,滑动门的问题。

关于增加栏目后,滑动门的问题。

演示网址在这:http://www.3dportal.cn/discuz/home.php
模板文件shunde.htm做了添加版块的修改,并且设置了新调用版块的$fid。
index.php里写出版块调用数据库语句,对应了模板文件的$fid。
以上看来没有问题。

home\common.js 中新建一个调用参数,对应了模板文件的  id=Baby
或者Lady等。
现在问题就出现在这里,我添加的版块有的出现滑动门了,有的错误,不知到怎末会事。还需要修改其他文件吗?
恳请帮助,谢谢。

[ 本帖最后由 jwj9952 于 2008-4-22 08:43 编辑 ]

附件

1.JPG (44.04 KB)

2008-4-22 08:39

1.JPG

2.JPG (21.06 KB)

2008-4-22 08:39

2.JPG

TOP

home\common.js中的参数与shundecn.htm的参数对应好后是不会有问题的,但是记住,不能重复.你先检查一下是不是有id=Baby重复或没修改到的.

TOP

昨天检查了两个小时,没有发现重复的。

TOP

index.php也要增加调用涵数,加了吗

TOP

举个例子:
HTM文件:
复制内容到剪贴板
代码:
<DIV class=WXTEACHER_NO5_Right>
<DIV class=WXTEACHER_NO5_Right_Baby>
<DIV class=Title>
<UL>
  <LI><SPAN class=WXTEACHER_NO5_Right_Baby_Nav id=Baby16_Title0
  onmouseover="Baby16('0')"><A href="forumdisplay.php?fid=201" target=_blank>化工机械</a></SPAN> </LI>
  <LI><SPAN class=WXTEACHER_NO5_Right_Baby_Nav_Current id=Baby12_Title1
  onmouseover="Baby16('1')"><A href="forumdisplay.php?fid=285" target=_blank>重型机械</a></SPAN> </LI>
  <LI><SPAN class=WXTEACHER_NO5_Right_Baby_Nav_Current id=Baby12_Title2
  onmouseover="Baby16('2')"><A href="forumdisplay.php?fid=304" target=_blank>建筑机械</a></SPAN> </LI></UL></DIV>
<DIV class=List id=Baby16_Main0>
<UL>
         <!--{loop $fid1129_new_post_threadlist $nthread}-->
       <li><span>$nthread[author]</span><a href="viewthread.php?tid=$nthread[tid]" target="_blank" $nthread['highlight'] title='最新帖子 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></li>
      <!--{/loop}-->                               
  </UL></DIV>
<DIV class=List id=Baby16_Main1 style="DISPLAY: none">
<UL>
           <!--{loop $fid1130_new_post_threadlist $nthread}-->
       <li><span>$nthread[author]</span><a href="viewthread.php?tid=$nthread[tid]" target="_blank" $nthread['highlight'] title='最新帖子 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></li>
      <!--{/loop}--></UL></DIV>
<DIV class=List id=Baby16_Main2 style="DISPLAY: none">
<UL>
          <!--{loop $fid1131_new_post_threadlist $nthread}-->
       <li><span>$nthread[author]</span><a href="viewthread.php?tid=$nthread[tid]" target="_blank" $nthread['highlight'] title='最新帖子 {LF}所在论坛: $nthread[forumname]{LF}主题标题: $nthread[subject] {LF}主题作者: $nthread[author]{LF}发表时间: $nthread[date]{LF}浏览次数: $nthread[views] 次 {LF}回复次数: $nthread[replies] 次{LF}最后回复: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></li>
      <!--{/loop}-->
          </UL></DIV>
</DIV></DIV></DIV>
PHP文件:
复制内容到剪贴板
代码:
//调用化工机械、压力容器及工程管道新贴//
$hack_cut_str =30; //修改标题显示字数
$hack_cut_strauthor = 9;
$fid1129_new_post_threadlist = array();
$nthread = array();
$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 (201) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = $nthread['name'];
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
        if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
        } else {
                $nthread['highlight'] = '';
        }
        $fid1129_new_post_threadlist[] = $nthread;
}
//完毕//

//调用重型机械及特种机械新贴//
$hack_cut_str =30; //修改标题显示字数
$hack_cut_strauthor = 9;
$fid1130_new_post_threadlist = array();
$nthread = array();
$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 (285) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = $nthread['name'];
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
        if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
        } else {
                $nthread['highlight'] = '';
        }
        $fid1130_new_post_threadlist[] = $nthread;
}


//调用建筑机械、建筑科学及建设工程技术新贴//
$hack_cut_str =30; //修改标题显示字数
$hack_cut_strauthor = 9;
$fid1131_new_post_threadlist = array();
$nthread = array();
$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 (304) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = $nthread['name'];
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
        if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
        } else {
                $nthread['highlight'] = '';
        }
        $fid1131_new_post_threadlist[] = $nthread;
}
//完毕//
JS文件:
复制内容到剪贴板
代码:
//亲16
function Baby16(id)
{
for (var i = 0;i < 3;i++)
{
var searchtitle = document.getElementById("Baby16_Title" + i);
var searchmain = document.getElementById("Baby16_Main" + i);
if (i == id)
{
searchtitle.className = 'WXTEACHER_NO5_Right_Baby_Nav';
searchmain.style.display = "";
}
else
{
searchtitle.className = 'WXTEACHER_NO5_Right_Baby_Nav_Current';
searchmain.style.display = "none";
}
}
}

TOP

找到原因了



另请教一个新问题,如何加上这样的菜单导航。

[ 本帖最后由 jwj9952 于 2008-4-22 09:50 编辑 ]

附件

1.JPG (24.95 KB)

2008-4-22 09:49

1.JPG

TOP

那里的菜单,图看不清呀

TOP

我的意思是同类的我给统一加个框,(帽子),还是HOME页

TOP

发新话题