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

Pie'oh'pah 07-27-2001 07:20 PM

Lo mate,

first thanx for doin this!!

Unfortunately, it doesn't work for me.

I did as you said

(execpt, that 2 lines $prevpage_atag=""; and $nextpage_atag=""; have been different in my file, they used ' ' instead of " " )

Everything else went fine, changed/added the templates, but it still looks same as before

Im using IE 6....

Any hints?

bad_madman 07-27-2001 08:24 PM

The Style Sheets are correct (http://www.unreal-alliance.de/vbulletin/), but who are the forums with more than 25 threads (standard in vB) per page.

Note: the modifications affect only the forum (all pages, which are called by forumdisplay.php display).

MSIE6: Is all the same. I tested also the MSIE 6.0.

Otherwise does not know however, what it could still be :(
Sorry for my bad english

Madman

Pie'oh'pah 07-27-2001 09:34 PM

1 Attachment(s)
On our Board 10 threads per page is standard before splitting over multiple pages.

Take a look at this thread for example, its more then 70 replies:

http://www.unreal-alliance.de/vbulle...9&pagenumber=1

it should affect it, or am i mistaken?

Take a look to the picture.

This is, what i want to get rid of :D

bad_madman 07-27-2001 10:07 PM

[QUOTE]Note: the modifications affect only the forum (all pages, which are called by forumdisplay.php display) :D

Pie'oh'pah 07-27-2001 10:54 PM

Do'h :D

well, we are getting closer

<switching to german language>

Ich habe wahrscheinlich einen irgendwo einen Fehler gemacht, kann ihn aber nicht finden.

Schau doch mal auf die site, vielleicht kannst du mir eben einen tip geben, wo ich suchen muss.

Es sieht so aus, als ob etwas bei dem code f?r die aktuelle Seite und beim code f?r den Sprung zur letzten Seite nicht stimmt

bad_madman 07-27-2001 11:26 PM

:D cool :D

forgotten this line to replace ?

--------------------------------------------------------------------------------
$endpagetag = '';
--------------------------------------------------------------------------------

with:

--------------------------------------------------------------------------------
$endpagetag = '</span>';
--------------------------------------------------------------------------------

btw - good german ;)
Madman

bad_madman 07-27-2001 11:40 PM

Sorry, there an error was in my entry. My entry was not displayed correctly in this Forum (probably by the vB code PHP). The error concerns the 2 templates - you must modify those again. I have mean entry in the forum corrected (vB-Code PHP removed).

Madman

Pie'oh'pah 07-27-2001 11:47 PM

Quote:

Originally posted by Bad_Madman
btw - good german ;)
Madman
LOL probably because I am german :D:D:D

<switching again>

Nee, den </span> hatte ich nich vergessen. war drin.
Was deine letzte message angeht, schreib mir das doch nochmal auf deutsch.

oder sonst ICQ 13422324 (ich bin invisible)

Bin noch wach (2:38)

bad_madman 07-27-2001 11:53 PM

ich fasse es nicht - ein Deutscher. Mein Gott, mein english ist ja sooo mies - wieso l?sst Du mich erst ewig mit meinem english abk?mpfen :D

Also auf Deutsch:
Bei den Eintragungen, die in den 2 Templates vorgenommen werden m?ssen hat sich im Forum ein Fehler eingeschlichen. Ich hatte es richtig gepostet, aber nach dem Abspeichern fehlten Eintr?ge - auch nach dem erneuten Editieren meines Eintrags waren Sie da (im Edit-Fenster), aber nach dem Speichern fehlten sie wieder :(

Deswegen habe ich die Eintragungen, die in den Templates vorgenommen werden m?ssen ohne den vB-Code 'PHP' dargestellt. Dann ist es korrekt. Das war auch der Fehler bei Dir (dass zwischendurch ein $ angezeigt wurde und dass ein </span> bei Dir fehlte.

Jetzt sollte es funktionieren :D

cu
Madman

Pie'oh'pah 07-28-2001 12:49 AM

Thnx :D:D:D

It's working perfectly now! Great job.

PS: Schlaf jut :)

mam14 07-28-2001 07:37 AM

can someone wrap this up and create a good English language instruction file??

Thanks for the great work!

mam14 07-28-2001 09:25 AM

Thanks Bad_Madman..
But I did exactly what you said and nothing changed! The thread pages are still exactly the same as before.. Is there anything else I should do?

Pie'oh'pah 07-28-2001 11:26 AM

Step 1. (skip if exists)

create new template called numbernav_own
Code:

$firstpage_atag$doublearr1$endfirstprevtag $prevpage_atag$singlearr1$endfirstprevtag $pagenumbers $nextpage_atag$singlearr2$endlastnexttag $lastpage_atag$doublearr2$endlastnexttag
create new template called numbernav_pages_own
Code:

$numbernav_atag$curpage$endpagetag


Step 2. edit showthread.php

find:
PHP Code:

$shorturl="showthread.php3?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage"

add below:
PHP Code:

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


find:
PHP Code:

$prevpage_atag=''

add below:
PHP Code:

$doublearr1='';
$singlearr1=''


find:
PHP Code:

$nextpage_atag=''

add below:
PHP Code:

$doublearr2='';
$singlearr2=''


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')."\";"); 


Step3. Find and replace all
Code:

class=\"thtcolor\"
with:
Code:

class=\"pageNum\"



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;} 


That should do it. Thanx again to Madman!

mam14 07-28-2001 02:12 PM

This is great guys.. I got it working..
One thing.. Pie'oh'pah..why is the hover function much slower in the forumdisplay?

Pie'oh'pah 07-28-2001 02:51 PM

Dude,

i haven't done this hack! Therefore I won't take credit :D

If you would have provided a link to your board, I could have checked though.

If you took a look at my site (unreal-alliance.de) then its probably because of the shockwave applets running. This slows stuff up...

Anyways, madman needs to take a look. I just followed your request by making the instructions somewhat easier to understand.

-Pie

Remi 07-29-2001 08:36 PM

" $numbernav_atag$curpage$endpagetag " (without ")

I don't understand what do you mean by (without ")

Can someone clear this please

bad_madman 07-29-2001 08:52 PM

[QUOTE]Originally posted by Remi
" $numbernav_atag$curpage$endpagetag " (without ")

I don't understand what do you mean by (without ")

Can someone clear this please

Remi 07-29-2001 08:58 PM

Thanks :D


All times are GMT. The time now is 01:40 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.01576 seconds
  • Memory Usage 1,875KB
  • 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
  • (4)bbcode_code_printable
  • (47)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete