vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   how can I do this? (https://vborg.vbsupport.ru/showthread.php?t=22087)

mam14 07-06-2001 08:21 AM

1 Attachment(s)
I always found the multi-page style of vB where page numbers are displayed at the bottom of the page, rather boring..
So I thought about modifying it & I came across a site running a forign language bb with a somewhat cool way of displaying the pages. Here is a snapshot of it..

Also note that whenever a page is accessed, that cell is highlighted in the table.

Questions is: how can modify vB 2.0.1 so that it looks more like this..
Any Ideas?

Guarddog 07-06-2001 11:20 AM

Just create a for loop... :)

mam14 07-06-2001 04:05 PM

Thanks for the input Guarddog.. but I have no idea what you're talking about!

Guarddog 07-07-2001 10:28 AM

I don't use VBulletin, don't have the code, but i've got an idea.

PHP Code:

$normalc ""#Normal color
$highlightc "red"#The highlighted bar color


$output "<table>\n";
for(
$pageloop=1;$pageloop<$totalpages;$pageloop++){
if(
$pageloop == $currentpage)
$output .= "<tr><td bgcolor=\"$highlightc\">$pageloop</td></tr>";
else
$output .= "<tr><td bgcolor=\"$normalc\">$pageloop</td></tr>";
}

$output .= "</table>";
echo 
$output

I don't know if i used the right intergers, it may be like arrays or something: $vars["currentpage"];, i don't know cause i don't have the code...

Rare 07-20-2001 06:30 PM

Can someone hack this?

NanoEntity 07-21-2001 03:27 PM

wow cool, can someone create this hack, looks pritty!

NanoEntity 07-27-2001 06:47 AM

BUMP^

Pie'oh'pah 07-27-2001 08:38 AM

Agreed. Somebody hack this !! :D

ThomasP 07-27-2001 09:03 AM

looks awesome! thumbs up

bad_madman 07-27-2001 04:38 PM

1 Attachment(s)
(screenshot below) / vB 2.01

1. create new template called numbernav_own
$firstpage_atag$doublearr1$endfirstprevtag $prevpage_atag$singlearr1$endfirstprevtag $pagenumbers $nextpage_atag$singlearr2$endlastnexttag $lastpage_atag$doublearr2$endlastnexttag
2. create new template called numbernav_pages_own (the content beginning and ending with a blank)
$numbernav_atag$curpage$endpagetag

3. edit FORUMDISPLAY.PHP

find:
PHP Code:

$shorturl="forumdisplay.php3?s=$session[sessionhash]&forumid=$forumid&daysprune=$daysprune&sortorder=$sortorder&sortfield=$sortfield&perpage=$perpage"

add below:
PHP Code:

$doublearr1='«';$doublearr2='»';$singlearr1='‹';$singlearr2='›'

find:
PHP Code:

$prevpage_atag=''

add below:
PHP Code:

$doublearr1='';
$singlearr1=''

find:
PHP Code:

$firstpage_atag="<a href=\"$shorturl&pagenumber=1\">"

replace with:
PHP Code:

$firstpage_atag="<a class=\"pageNum\" href=\"$shorturl&pagenumber=1\">"

find:
PHP Code:

$prevpage_atag="<a href=\"$shorturl&pagenumber=".($pagenumber-1)."\">"

replace with:
PHP Code:

$prevpage_atag="<a class=\"pageNum\" href=\"$shorturl&pagenumber=".($pagenumber-1)."\">"

find:
PHP Code:

$nextpage_atag=''

add below:
PHP Code:

$doublearr2='';
$singlearr2=''

find:
PHP Code:

$lastpage_atag="<a href=\"$shorturl&pagenumber=$totalpages\">"

replace with:
PHP Code:

$lastpage_atag="<a class=\"pageNum\" href=\"$shorturl&pagenumber=$totalpages\">"

find:
PHP Code:

$nextpage_atag="<a href=\"$shorturl&pagenumber=".($pagenumber+1)."\">"

replace with:
PHP Code:

$nextpage_atag="<a class=\"pageNum\" href=\"$shorturl&pagenumber=".($pagenumber+1)."\">"

find:
PHP Code:

$numbernav_atag=""

replace with:
PHP Code:

$numbernav_atag='<span class="pageNum">'

find:
PHP Code:

$endpagetag ''

replace with:
PHP Code:

$endpagetag '</span>'

find:
PHP Code:

eval("\$pagenumbers .= \"".gettemplate('numbernav_pages')."\";"); 

replace with:
PHP Code:

eval("\$pagenumbers .= \"".gettemplate('numbernav_pages_own')."\";"); 

find:
PHP Code:

$numbernav_atag="<a href=\"$shorturl&pagenumber=$curpage\">"

replace with:
PHP Code:

$numbernav_atag="<a class=\"pageNum\"  href=\"$shorturl&pagenumber=$curpage\">"

find:
PHP Code:

eval("\$pagenumbers .= \"".gettemplate('numbernav_pages')."\";"); 

replace with:
PHP Code:

eval("\$pagenumbers .= \"".gettemplate('numbernav_pages_own')."\";"); 

find:
PHP Code:

eval("\$pagenav = \"".gettemplate('numbernav')."\";"); 

replace with:
PHP Code:

eval("\$pagenav = \"".gettemplate('numbernav_own')."\";"); 

and last:
add in headinclude template in the Style Sheets section ( <style type="text/css"> ):
PHP Code:

.pageNum {color#ffffff; background-color: #808080; border-color: #000000; border-style: solid; border-width: 1px; margin: 0px; padding: 0px; padding-left: 4px; padding-right: 4px; width: 1em;}
a.pageNum {color#0000ff; background-color: #e0e0e0;}
a.pageNum:hover {color#ffffff; background-color: #a0a0a0;} 

cu
Madman


All times are GMT. The time now is 10:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01318 seconds
  • Memory Usage 1,777KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (28)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete