vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Sub-Forums (https://vborg.vbsupport.ru/showthread.php?t=28478)

09-19-2001 10:00 PM

I updated the hack a little so it looks nice.

http://vbulletin.com/forum/showthrea...272#post173883

Credit To: ethank

Added:

Display order, so it orders the sub-forums the way they are listed in your admin CP.

Added an hr.

Thats it it!

if you watn the HR to look good add this into your
"Custom replacements"

hr is replaced by <hr size="1" color="{ tablebordercolor }"

{ tablebordercolor } - dont forget to remove the spaces "{ }

that is it!

valid 09-20-2001 01:29 AM

Demo

Kajiro 09-20-2001 07:33 AM

thx valid~ Nice Work!!:D
but when i add SIZE code in the HR .. get Error~
anyway... this is very useful~

Goldfinger 09-20-2001 07:55 AM

try putting a \ before any " on your size

like.. <hr size=\"1\">

Juan 09-20-2001 08:27 AM

This hack is very cool. Can it be done with the forums in a category?

mbombd 09-20-2001 09:06 AM

great hack, i was lookin' for this, thx :)

ethank 09-20-2001 02:55 PM

Awww, you made it perty! :)

I'll put the update on my code.

Ethan

floleb7 09-20-2001 06:29 PM

does this can be done for index ?

valid 09-20-2001 06:51 PM

Quote:

Originally posted by floleb7
does this can be done for index ?
Yes this way, take a look!

cyrus 09-20-2001 07:50 PM

EXCELLENT

and so amazingly easy to add !!

* pats VALId on back* :)

Bender 09-20-2001 07:55 PM

Great Hack, valid - easy to implement and works like a charm :D

Kajiro 09-20-2001 11:42 PM

Quote:

Originally posted by Goldfinger
try putting a \ before any " on your size

like.. <hr size=\"1\">

woo~ this can fix my problem~~
thx Q very MUCH ;)

DarkReaper 09-20-2001 11:50 PM

Right...this didn't work for me. Do forums have to have a description for this to work? Lots of my forums don't have descriptions....

Also, how would I get it so it only shows the total threads/replies for all the subforums added up, but not the subforums themselves?

valid 09-21-2001 02:47 AM

here, look at this screenshot!

Thats how you do it!

Quote:

Originally posted by DarkReaper
Right...this didn't work for me. Do forums have to have a description for this to work? Lots of my forums don't have descriptions....

Also, how would I get it so it only shows the total threads/replies for all the subforums added up, but not the subforums themselves?


valid 09-21-2001 02:54 AM

still works!

as you can see in the txt file, you need to mod 2 files, not just index.php

index.php and forumdisplay.php

JJR512 09-21-2001 08:06 AM

A very very trivial matter...but for the sake of making the subforum links exactly identical to the regular forum links, I changed the line that starts with $subs.= so that the forumid number and sessionhash were reversed. The stock vB has the sessionhash in the link first, followed by the forum specification...in this hack, it's backwards. As I said, it's trivial, I'm sure it makes no difference; I just like to have things looking the same, that's all.

PHP Code:

$subs.="<a href=\"forumdisplay.php?s=$session[sessionhash]&forumid=$forum_child[forumid]\">$forum_child[title]</a>"


DarkReaper 09-21-2001 10:52 AM

I have forums that have subforums. They go 5 levels deep. I modified both files. It doesn't work.

valid 09-21-2001 11:08 AM

Than I dont know whats wrong, : P (sorry), should have worked with ease, maybe you have some other hacks runing that prevent it from displaying or you installed it wrong, who knows, I'm very limited in php codeing.

So this hack is not suppored, just trying to help the best way I can, and I didnt write it "ethank" did, I only mod it a little to give it a better look and display order of the forums, thats all.

: P

Quote:

Originally posted by DarkReaper
I have forums that have subforums. They go 5 levels deep. I modified both files. It doesn't work.

Goldfinger 09-21-2001 11:12 AM

Valid on your board how'd you do the auto post.. thats real cool. share :).

valid 09-21-2001 06:58 PM

Go to dev forum and then to vbulletin hacks section on that forum! : P

JJR512 09-22-2001 05:14 AM

I'm wondering if there can be some way to indicate on the main page if the subforums have new posts. In a main forum, where you have the subforums listed below it (under an hr), I'm thinking of some kind of little indicator, about the same size as the smallfont text. I guess we would have to have two new graphics, one to indicate on and one to indicate off, but could you write into your hack the code to make it light up appropriately?

DarkReaper 09-22-2001 04:31 PM

Quote:

Originally posted by JJR512
I'm wondering if there can be some way to indicate on the main page if the subforums have new posts. In a main forum, where you have the subforums listed below it (under an hr), I'm thinking of some kind of little indicator, about the same size as the smallfont text. I guess we would have to have two new graphics, one to indicate on and one to indicate off, but could you write into your hack the code to make it light up appropriately?
I've been wanting that as well...but I'd also like to have it add up the thread and reply count for all the sub-forums and show that too...as well as the last posted date, etc...

\/ash 09-23-2001 05:13 AM

damn tom. your so elite =]

ethank 09-23-2001 05:21 AM

Quote:

Originally posted by JJR512
I'm wondering if there can be some way to indicate on the main page if the subforums have new posts. In a main forum, where you have the subforums listed below it (under an hr), I'm thinking of some kind of little indicator, about the same size as the smallfont text. I guess we would have to have two new graphics, one to indicate on and one to indicate off, but could you write into your hack the code to make it light up appropriately?
Its possible, but a bit query intensive in my case cause of the markread table. Also it might be a bit cluttered.

Ethan

valid 09-23-2001 05:46 AM

ethank is right : P

Nice idea but in my case, I have lots of subforums, it would get cluttered as ethank said, haveing like 6 or less, its a good idea, bad idea for like 11 and up, and if you have like 1000+ members and all of them post in the subforums all the subforums would have a gif/jpg indicator that theres new post, and that would use up too much forum space, if you dont mind scrolling and scrolling all the time to get to a forum on index.php, lol, you get the idea.

JJR512 09-23-2001 08:25 AM

I only meant a small little gif, like maybe a little dot or something...but OK. How about this then: Have the link to the subforum be one color if it has new posts, be another color if it doesn't? Or something along those lines.

DarkReaper 09-23-2001 03:20 PM

I think you're missing the point. The graphic itself isn't the problem, but the fact that a lot more queries are nessesary to check for new posts throughout an entire forum hierarchy is excess load.

valid 09-23-2001 04:00 PM

what Dark said! : P

hehe was going to say that but didnt know how, me = limited in php.

Quote:

Originally posted by DarkReaper
I think you're missing the point. The graphic itself isn't the problem, but the fact that a lot more queries are nessesary to check for new posts throughout an entire forum hierarchy is excess load.

magistr 09-24-2001 09:00 AM

Valid!

please
send me url your screeshot
this style very cool and i want have this style board
http://vbulletin.com/forum/attachmen...&postid=173889

YourHostSucks 09-27-2001 07:05 PM

I love it! :)

Thanks!

Axelon 09-27-2001 08:38 PM

i don't see the subforum...

i have only the write :

subforum:



:( :( :(

Kengan 10-02-2001 04:35 AM

Nice Hack !! ;)

hacker 10-02-2001 06:05 AM

One of the simplest and yet very elegant hack!!

BTW, I don't understand this. Can someone explain it to me?

if you watn the HR to look good add this into your
"Custom replacements"

hr is replaced by <hr size="1" color="{ tablebordercolor }"

{ tablebordercolor } - dont forget to remove the spaces "{ }

YourHostSucks 10-02-2001 06:28 AM

PHP Code:

<hr size="1" color="{ tablebordercolor } ">

take out the space after {  and before 

Will make you hr line size"1" (nice and small)
and color will be your styles color for the table border...

hacker 10-02-2001 06:31 AM

Where do I find this line of code?

YourHostSucks 10-02-2001 06:44 AM

I am going to assume you already installed this hack...

So, open index.php and forumdisplay.php

Search For:

PHP Code:

$forum['description'] .= "<hr><B>Sub-Forums:</B> "

Replace With:

PHP Code:

$forum['description'] .= "<hr size="1" color="tablebordercolor "><B>Sub-Forums:</B> "

But take out the space after { and before } around tablebordercolor.

hacker 10-02-2001 09:13 AM

Thanks for your help.

Only thing now: Whenever I replace the code that you gave me, I get an error message:

Parse error: parse error in /home/public_html/forums/index.php on line 291

hacker 10-02-2001 09:20 AM

$forum['description'] .= "<hr><B>Sub-Forums:</B> ";

Replace With:

PHP:

$forum['description'] .= "<hr size="1" color="#555576 "><B>Sub-Forums:</B> ";

I just can't seem to get past the error.

mister 10-02-2001 12:55 PM

you need to escape your quotes.

put a \ before any " inside your string.

your code should be:

Quote:

$forum['description'] .= "<hr size=\"1\" color=\"#555576\"><B>Sub-Forums:</B> ";

hacker 10-02-2001 01:05 PM

Thanks a million. The escape characters really helped! Thank you thank you thank you!!!:p


All times are GMT. The time now is 05:39 PM.

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.01398 seconds
  • Memory Usage 1,816KB
  • 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_php_printable
  • (8)bbcode_quote_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
  • (40)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