View Full Version : Examples of new pagenav_xxx templates in use
Kier
Mon 30th Jul '01, 7:44pm
In the 2.0.2 announcement, we mentioned that I have completely re-done the pagenav system, and it's now very flexible.
Take a look at this, achieved without any hacks, just template edits:
Let's see some of your versions!
Chen
Tue 31st Jul '01, 5:52pm
Will you be kind enough to post the templates here? I REALLY like the way you used it! :)
Thanks
tubedogg
Wed 1st Aug '01, 2:02am
Here's mine...
Current number is always highlighted (first row in the pic). Others highlight on mouseover (second row in the pic).
Streicher
Sat 4th Aug '01, 11:33am
tubedogg, your version looks very good. How do ou do that. Can you post the code?
tubedogg
Sat 4th Aug '01, 5:06pm
Sure. I'll start a new thread in here with it.
Only works in IE5+ (maybe IE4), possibly NS6 (haven't tried it), not sure about Opera.
]CkB[Cowboy
Mon 6th Aug '01, 7:52am
kier, could you post the code you used to do yours?
I'd love to see that (and I don't want to spend the time to figure it out)
Chen
Tue 7th Aug '01, 2:48am
Yes please! :D
]CkB[Cowboy
Wed 8th Aug '01, 7:43am
hello? anyone?
it's all well and good to show us a screenshot, but how about some code to back it up?
Kier
Wed 8th Aug '01, 7:56am
aw come on guys... it's basic HTML... try to figure it out for a while.
Chen
Wed 8th Aug '01, 8:18am
Come on man, you can't do this... it's like putting a piece of cheese in front of a mouse and when he's 2 centimeters away taking it away! :(
]CkB[Cowboy
Wed 8th Aug '01, 8:40am
"Try to figure it out for a while" ?
Frankly, the documentation isn't obvious enough to me, and I just don't have the time to devote to manually code it in. I work full time, and take what little time I can to try to make my Forums better for the people that use them. I do it for free, and for fun, and to help other people out.
I figured that since we purchased the vBulletin software, and that you had already done the work, that you would offer it up to us, to use.
It took me long enough to even get my pagenav_xxx templates to work, upgrading to 2.0.3, because a) "pagenav_xxx" isn't a template itself, it's just an allusion to a set of "pagenav" templates, b) I couldn't find any documentation of how to implement the new "pagenav_xxx" template system, and c) when I updated to 2.0.3 from 2.0.1 recently, the new "pagenav_xxx" templates were not added to my current set of templates, so instead of seeing some "default" templates I could edit, I had to just scratch my head and wonder why my pagenav no longer showed up in my thread display.
Once I happened upon Tubedogg's post, it became obvious to me what the correct way to set it up was, and I added his templates manually.
One question I have, since I can still not find adequate documentation answering my many questions, is how I would further customize the "pagenav_xxx" templates - because it's still extrememly vague.
So, I simply ask you to post the code you utilized to do what you posted a screenshot of. Is that too much to ask?
Thanks.
theory
Thu 9th Aug '01, 2:45pm
I can't seem to get the pagenav_xxx template running. I went in
and added the "pagenav_xxx" to my default templates and
placed the following code in the template box:
<!--Pages ($totalpages): -->
<b>$firstlink$prevlink$pagenav$nextlink$lastlink</b>
Do I need to also place code in my header template to activate
the links? I couldn't find too much information on getting this
working.
In the meantime, my forum takes about 1,000 posts / day and
people aren't able to navigate around. I did the upgrade from
2.0.0 to 2.0.3 and lost all page navigation.
Is there a way that I can revert back to the old template? I am
not looking for anything fancy, I just want this working again.
Thanks for any help you can provide me with.
Regards,
Brian Rauschenbach
Kier
Thu 9th Aug '01, 2:53pm
There seems to have been a misunderstanding here.
There is no such thing as a pagenav_xxx template.
By xxx I was referring to the collection of templates installed by default with the 2.0.2/2.0.3 upgrade script named pagenav, pagenav_nextlink etc.
If you are running 2.0.2 or later and you have no templates called pagenav_(something or other) then you did not upload vbulletin.style with the rest of the files to perform the upgrade.
You will need to use the 'upload style set' function in the styles control panel to upload the 2.0.3 vbulletin.style that is contained within the vBulletin zip file.
This is of critical importance.
]CkB[Cowboy
Thu 9th Aug '01, 3:02pm
I personally don't think the new "pagenav_xxx" template system was really explained very well in the instructions.
I generally don't have problems with instructions, but this one baffled me (for example, I have been able to figure out everything else I have needed to do in vB and PHP up until this bit)
I don't think it was explained in enough detail..
But would it be possible for you to post your own version of this code (as you have posted the screenshot at the top of the page) ?
I would like very much to use that in my own forums.
Thanks
ethank
Fri 10th Aug '01, 2:14pm
Here's the code for a version of the dropdown one. Because Netscape doesn't like form elements without the form tag, formatting in Netscape 4.7 is less than ideal, but it works fine.
headerinclude
.nextprev { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #FFFFFF; background-color: #005B7F ; font-weight: bolder}
pagenav
<script language="JavaScript">
if (navigator.appName=="Netscape"){
if (navigator.appVersion.substring(0, 3) <= "4.8"){
document.writeln('<form>');
}
}
</script>
Pages ($totalpages): <b>[ $prevlink
<select name="pagenumber" onChange="document.location.href=this.options[this.selectedIndex].value;" valign="middle">
$firstlink
$pagenav
$lastlink
</select>
<script language="JavaScript">
if (navigator.appName=="Netscape"){
if (navigator.appVersion.substring(0, 3) <="4.8"){
//document.writeln('</form>');
}
}
</script>
$nextlink ]</b>
pagenav_curpage
<option value="$address&pagenumber=$curpage" SELECTED>$curpage/$totalpages</option>
pagenav_firstlink
<option value="$address&pagenumber=$curpage">First Page</option>
pagenav_lastlink
<option value="$address&pagenumber=$curpage">Last Page</option>
pagenav_nextlink
<script language="JavaScript">
if (navigator.appName=="Netscape"){
if (navigator.appVersion.substring(0, 3) <= "4.9"){
document.writeln('<a href="$address&pagenumber=$nextpage">></a>');
}
else
{
document.writeln('<input type="submit" value=">" onClick="document.location.href=\'$address&pagenumber=$nextpage\'" style="nextprev" class="nextprev">');
}
}
else
{
document.writeln('<input type="submit" value=">" onClick="document.location.href=\'$address&pagenumber=$nextpage\'" style="nextprev" class="nextprev">');
}
</script>
pagenav_pagelink
<option value="$address&pagenumber=$curpage">$curpage</option>
pagenav_prevlink
<script language="JavaScript">
if (navigator.appName=="Netscape"){
if (navigator.appVersion.substring(0, 1) <= "4"){
document.writeln('<a href="$address&pagenumber=$prevpage"><</a>');
}
else
{
document.writeln('<input type="submit" value="<" onClick="document.location.href=\'$address&pagenumber=$prevpage\'" style="nextprev" class="nextprev">');
}
}
else
{
document.writeln('<input type="submit" value="<" onClick="document.location.href=\'$address&pagenumber=$prevpage\'" style="nextprev" class="nextprev">');
}
</script>
dwh
Sat 11th Aug '01, 11:03am
this gives me IE6 javascript error.
ethank
Sat 11th Aug '01, 11:12am
Originally posted by dwh
this gives me IE6 javascript error.
Can you elaborate? I just tried it in IE6 and it works fine.
Ethan
Kier
Sat 11th Aug '01, 11:21am
Okay, now that someone else has put in the effort to try and work out a method, here is the code I used to create the screenshot.
pagenav
<table cellpadding="0" cellspacing="0" border="0"><form><tr>
<td><smallfont>Go to page
$prevlink<select name="pagenumber"
onchange="window.location=('$address&pagenumber='+this.options[this.selectedIndex].value)">
$firstlink$pagenav$lastlink
</select>$nextlink
</smallfont></td>
</tr></form></table>
pagenav_curpage
<option value="$curpage" selected>Page $curpage/$totalpages</option>
pagenav_firstlink
<option value="$curpage">First Page</option>
pagenav_lastlink
<option value="$curpage">Last Page</option>
pagenav_nextlink
<input type="button" value=">" onclick="window.location='$address&pagenumber=$nextpage'")" style="font-size:11px">
pagenav_pagelink
<option value="$curpage">Page $curpage/$totalpages</option>
pagenav_prevlink
<input type="button" value="<" onclick="window.location='$address&pagenumber=$prevpage'")" style="font-size:11px">
Enjoy :)
ethank
Sat 11th Aug '01, 12:00pm
Ahh...but does it work in Netscape 4.7 and below? I had similar code but had to do all the javascript monkey business because stupid Netscape 4.7 didn't like it.
Anyhow, people seem to like the implementation I put on Murmurs, much more than the default anyhow.
Ethan
edpak
Wed 29th Aug '01, 11:52pm
Just in case anybody want to try Kier's version of this script, it definitely "DOES NOT" work in 4.7 and was the cause of my my forums being down to NetChit users for four days... :(
ethank: Thank you... Yours is working just fine in 4.7... :)... BUT I don't know about newer versions of NetChit... :confused:
Kier
Thu 30th Aug '01, 12:28am
Well that's odd... because it works (for me) in NS4.6...
edpak
Thu 30th Aug '01, 9:41am
Sorry Kier but it didn't work for me... I have 4.7 on another 'puter and when I checked the threads that contained your version of the script all I got was a blank page...
Forums themselves where not affected... In any case all is cool now... I think... :)
Originally posted by Kier
Well that's odd... because it works (for me) in NS4.6...
electrobase
Thu 30th Aug '01, 3:55pm
just as a huh?, your html post on my browser does not word wrap so it extends the posting off my screen. I haven't seen this before.
Anyone know what causes this?
CoolaShacka
Wed 19th Sep '01, 2:04pm
Nice idea tubedogg... :) thank you.
This is mine
Mr. X
Tue 23rd Oct '01, 1:32pm
Ok first off read the sig. :)
It seems like it KINDA works, but its butchering the layout. How do I add each line of code in the tempate? Do I put the cursor after the original code, press enter and paste, or replace the whole code etc?
Mr. X
Wed 31st Oct '01, 5:44am
Jeez. You'd think this would be a simple hack to install even for a cut and paste monkey like me, but nothing works. God Im an idiot..
Mr. X
Tue 27th Nov '01, 5:24am
Oh come on... Doesnt anyone even bother to read this forum or something?:rolleyes:
Sinecure
Sun 2nd Dec '01, 8:18pm
all the images are not showing up :(
/me can't see anyhthing :(
tobi
Tue 1st Jan '02, 1:27pm
Originally posted by CoolaShacka
Nice idea tubedogg... :) thank you.
This is mine
Matter super however like that goes that. I tried and would have it a drop Down menu Please help
My Pic (http://www.ftp3.de/bild.html)
Polinco
Tue 19th Mar '02, 1:28pm
I am trying to follow some of these threads but all to frequently I notice that images that are in the openings message or near the top of the thread are missing, rendering the entire topic virtually useless.
Two of the images I am referring to are from Kier and from Kevin.
Guys? Can you give us these images again please? Thanks. :)
Polinco
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights