标题:
MX版本更改每页主题显示数目
[打印本页]
作者:
cnangel
时间:
2003-8-18 10:36
标题:
MX版本更改每页主题显示数目
打开forums.cgi文件,查找:
$numberofpages = $numberofitems / 25;
if ($numberofitems > 25) {
$showmore = "yes";
if ($inshow eq "" || $inshow < 0) { $inshow = 0; }
if ($inshow > 0) { $startarray = $inshow; } else { $startarray = 0; }
$endarray = $inshow + 25 - 1;
if ($endarray < ($numberofitems - 1)) { $more = "yes"; }
elsif (($endarray > (25 - 1)) && ($more ne "yes")) { $endarray = $numberofitems -1; }
}
else {
$showmore = "no";
$startarray = 0;
$topicpages = qq~<font color=$menufontcolor>本论坛只有一页</font>~;
$endarray = $numberofitems -1;
}
if (($inthreadages)&&($inthreadages ne "all")) { $threadagesstart = "&threadages=$inthreadages"; } else { undef $threadagesstart; }
if ($showmore eq "yes") {
if (25 < $numberofitems) {
($integer,$decimal) = split(/\./,$numberofpages);
if ($decimal > 0) { $numberofpages = $integer + 1; }
$mypages=$numberofpages;
#分页
$intshow=$inshow/(7*25);
($intshow,$mydecimal) = split(/\./,$intshow);
$intshow = $intshow + 1;
$preshow=($intshow-1)*7*25-25;
$nextshow=$intshow*7*25;
$pages=qq~<a href=$thisprog?forum=$inforum&show=$preshow$threadagesstart class=hb>←</a> ~ if ($intshow > 1);
if ($numberofpages > ($intshow*7)){
$numberofpages=($intshow*7);
$isnext=qq~<a href=$thisprog?forum=$inforum&show=$nextshow$threadagesstart class=hb>→</a> ~;
}
$pagestart = ($intshow-1)*7*25;
$counter = ($intshow-1)*7;
while ($numberofpages > $counter) {
$counter++;
if ($inshow ne $pagestart) { $pages .= qq~<a href=$thisprog?forum=$inforum&show=$pagestart$threadagesstart class=hb>$counter</a> ~; }
else {
$pages .= qq~<font color=$fonthighlight><b>$counter</b></font> ~;
if ($counter ne "1") {
$pagenow = $counter - 1;
$pageup = $pagestart - 25;
$showup = qq~<a href="$thisprog?forum=$inforum&show=$pageup$threadagesstart" title="第$pagenow页" ><font face=webdings >7</font></a> ~;
} else { $showup = qq~<font color=$fonthighlight><font face=webdings >7</font></font>~; }
if ($mypages > $counter) {
$pagenow = $counter + 1;
$pagedown = $pagestart + 25;
$showdown = qq~<a href="$thisprog?forum=$inforum&show=$pagedown$threadagesstart" title="第$pagenow页" ><font face=webdings >8</font></a> ~;
} else { $showdown = qq~<font color=$fonthighlight><font face=webdings >8</font></font>~; }
}
$pagestart = $pagestart + 25;
}
$pages .= $isnext;
#分页end
}
if ($inshow ne "0") { $beginpage=qq~<a href="$thisprog?forum=$inforum&show=0$threadagesstart" title="首 页" ><font face=webdings >9</font></a> ~; } else { $beginpage=qq~<font color=$fonthighlight><font face=webdings >9</font></font>~; }
$showend=($mypages-1)*25;
if ($inshow ne $showend) { $endpage=qq~<a href="$thisprog?forum=$inforum&show=$showend$threadagesstart" title="尾 页" ><font face=webdings >:</font></a> ~; } else { $endpage=qq~<font color=$fonthighlight><font face=webdings >:</font></font>~; }
$topicpages = qq~<font color=$menufontcolor><b>共 <font color=$fonthighlight>$mypages</font> 页</b> $beginpage $showup [ $pages ] $showdown $endpage~;
}
复制代码
把其中的数字25全部都更换成你需要的每页的显示的主题数就可以了,全部都要换啊。
_LHRL_
欢迎光临 星星博客 (http://commerce.huhoo.net/)
Powered by Discuz! 7.0.0