The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Ok, this modification changes the current pagenav stuff such as: "Pages (3): [ < ? 1 ? 2 ? 3 ? ]" to a simple dropdown menu containing all the pages...no previous/next/first/last crap.
In functions.php: Find this: Code:
if ($pagenumber>1) {
$prevpage = $pagenumber-1;
eval("\$prevlink = \"".gettemplate("pagenav_prevlink")."\";");
}
if ($pagenumber<$totalpages) {
$nextpage = $pagenumber+1;
eval("\$nextlink = \"".gettemplate("pagenav_nextlink")."\";");
}
while ($curpage++<$totalpages) {
if ( ( $curpage <= $pagenumber-$pagenavpages || $curpage >= $pagenumber+$pagenavpages ) && $pagenavpages!=0 ) {
if ($curpage==1) {
eval("\$firstlink = \"".gettemplate("pagenav_firstlink")."\";");
}
if ($curpage==$totalpages) {
eval("\$lastlink = \"".gettemplate("pagenav_lastlink")."\";");
}
} else {
if ($curpage==$pagenumber) {
eval("\$pagenav .= \"".gettemplate("pagenav_curpage")."\";");
} else {
eval("\$pagenav .= \"".gettemplate("pagenav_pagelink")."\";");
}
}
}
Code:
$pagenav = '<FORM ACTION="" METHOD=POST><SELECT NAME=url onchange="window.location.href=this.options[this.selectedIndex].value">';
while ($curpage++<$totalpages) {
if ($curpage == $pagenumber) {
$select=" SELECTED";
}
else {
$select="";
}
$pagenav .= '<OPTION VALUE="'.$address.'&pagenumber='.$curpage.'"'.$select.'>Page '.$curpage.' of '.$totalpages;
}
$pagenav .= '</SELECT><INPUT TYPE=submit NAME=Submit VALUE="Go!"></FORM>';
$pagenav That's it! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Screen shot????
|
|
#3
|
||||
|
||||
|
I installed it on my test board - nice! It will need some cleaning up to make it fit in a little (the dropdown makes it look a bit funky).
Here's a small screen shot: |
|
#4
|
||||
|
||||
|
<a href="http://www.vbulletin.com/forum/showthread.php?s=&threadid=24044" target="_blank">http://www.vbulletin.com/forum/showt...threadid=24044</a>
|
|
#5
|
|||
|
|||
|
Yeah, I saw that thread floleb7, but none of them did what I wanted. Those just require editing the templates and don't show every single page in the dropdown menu like this which requires editing more than just a template. Someone may want one of those other options in that thread though.
|
|
#6
|
|||
|
|||
|
Hello
Very nice hack But it has bug with member's cp when try to change avatar. Submit not working! Try to fix it please Thanx |
![]() |
|
|