View Full Version : "New Post" feature include page number of threads?
Sia Bani
09-08-2003, 05:03 PM
Hello fellas. A lot of my members use the "View New Posts" feature and were wondering if there was anyway to display the page numbers of a thread when the search results came up. Basically, they can either go to the first post or the last post, but there's not option for pages.
Any ideas?
Thanks.
Logician
09-08-2003, 08:24 PM
This might be a little tricky because page count is not a fixed number, it changes according to user's settings or your settings in admin cp/options page.
Sia Bani
09-08-2003, 09:30 PM
So there's no solution to this?
MetroSports82
09-09-2003, 12:26 AM
Open SEARCH.PHP
FIND:
unset($paperclip);
}
UNDERNEATHE ADD:
if (($bbuserinfo['maxposts'] != -1) and ($bbuserinfo['maxposts'] != 0)) {
$maxposts = $bbuserinfo['maxposts'];
}
if (($searchresult['replycount']+1) > $maxposts and $linktopages) {
$thread = $searchresult; // for templates
$totalpages = ($searchresult['replycount']+1)/$maxposts;
if ($totalpages != intval($totalpages)) {
$totalpages = intval($totalpages)+1;
}
$acurpage = 0;
$pagenumbers = '';
while ($acurpage++ < $totalpages) {
if ($acurpage == $maxmultipage) {
eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_more')."\";");
break;
} else {
eval("\$pagenumbers .= \"".gettemplate('forumdisplay_multipagenav_pagenumber ')."\";");
}
}
eval("\$searchresult[pagenav] = \"".gettemplate('forumdisplay_multipagenav')."\";");
} else {
$searchresult['pagenav']='';
}
SAVE AND CLOSE SEARCH.PHP and UPLOAD.
Now, OPEN your searchresultbit_threadonly TEMPLATE:
FIND:
$searchresult[threadtitle]</a></normalfont>
ADD RIGHT AFTER THAT:
<smallfont>$searchresult[pagenav]</smallfont>
That should do the trick. I've been using this for quite some time on my forums. ;)
Sia Bani
09-09-2003, 12:54 AM
Awesome! Thanks.
Sia Bani
09-09-2003, 01:00 AM
hmmm...didn't do the trick. Nothing's different. I'm running 2.2.8. Any ideas what the problem is?
MetroSports82
09-09-2003, 01:10 AM
Doh! My bad.. Forgot the one step.
OPEN your searchresultbit_threadonly TEMPLATE:
FIND:
$searchresult[threadtitle]</a></normalfont>
ADD RIGHT AFTER THAT:
<smallfont>$searchresult[pagenav]</smallfont>
Sorry about that. :P Now it should come up w/o any problems. Let me know how that goes. :)
thanks.
Sia Bani
09-09-2003, 01:20 AM
Thanks very much. Works really well!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.