07-11-2000, 05:22 PM
In the showthread.php file you have
if ($threadinfo[posts]>$perpage) {
$totalpages=$threadinfo[posts]/$perpage;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}
if ($pagenumber=="lastpage") {
$pagenumber=$totalpages;
}
eval("\$pagenav = \"".gettemplate("showthread_numpages")."\";");
To get it to say "This thread is XX pages long", etc.
I created a new template for saying "This thread is one page long"
and change the above to:
if ($threadinfo[posts]>$perpage) {
$totalpages=$threadinfo[posts]/$perpage;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}
if ($pagenumber=="lastpage") {
$pagenumber=$totalpages;
}
if ($totalpages==1){
eval("\$pagenav = \"".gettemplate("showthread_numpage")."\";");
}else{
eval("\$pagenav = \"".gettemplate("showthread_numpages")."\";");
}
I have not been able to get this to display on single pages. I know the template is working because if I change the showthread_numpages to numpage it will say it is One page long.
So any ideas? Obviously it is not counting anything and just jumping to the second in line in the if else line.
Thanks,
Parker
if ($threadinfo[posts]>$perpage) {
$totalpages=$threadinfo[posts]/$perpage;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}
if ($pagenumber=="lastpage") {
$pagenumber=$totalpages;
}
eval("\$pagenav = \"".gettemplate("showthread_numpages")."\";");
To get it to say "This thread is XX pages long", etc.
I created a new template for saying "This thread is one page long"
and change the above to:
if ($threadinfo[posts]>$perpage) {
$totalpages=$threadinfo[posts]/$perpage;
if ($totalpages!=intval($totalpages)) {
$totalpages=intval($totalpages)+1;
}
if ($pagenumber=="lastpage") {
$pagenumber=$totalpages;
}
if ($totalpages==1){
eval("\$pagenav = \"".gettemplate("showthread_numpage")."\";");
}else{
eval("\$pagenav = \"".gettemplate("showthread_numpages")."\";");
}
I have not been able to get this to display on single pages. I know the template is working because if I change the showthread_numpages to numpage it will say it is One page long.
So any ideas? Obviously it is not counting anything and just jumping to the second in line in the if else line.
Thanks,
Parker