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)

Psychdrone 02-13-2002 10:44 PM

NO offence but this hack sucks,

Everyone so that your aware, it adds a query for every subforum that you have, so watch out!

tamarian 02-19-2002 04:56 PM

Yes, if you have many subforums, this hack can be very expensive (100+ queries).

However, you can easily optimize it.

I deleted this portion:
PHP Code:

$permission=$DB_site->query_first("select accessmask from access where userid = $bbuserinfo[userid] AND forumid = $forum_child[forumid]"); 
if (
$permission['acessmask'] != || $permission['accessmask'] == null


And the matching "}"

This will reduce the queries to only the number of main forums you have (mine went down from 130 to 40)

Warning To use this optimization, make sure you have no hidden/private sub-forums that reside under public forums.

Jonathan 03-24-2002 11:22 PM

PLEASE HELP! URGENT!

After installing the hack I get this error:

Parse error: parse error in /var/www/html/forumdisplay.php on line 401

These are what the lines read:

400 - $limitlower=($pagenumber-1)*$perpage+1;
401 - $limitupper=($pagenumber)*$perp

and 401 is the last line on mine, what's wrong?

PLEASE HELP, IT'S VERY URGENT!

eGoR 04-08-2002 04:38 PM

amazing work on this code
thx alot :P

Corbu 05-07-2002 09:28 AM

I link soo much this hacks !

I'have a request. It works on vb 2.2.5. I install it and it looks : screenshot at the end of the post.

I'll try to made a better design of this by remplacing the code of the hack by this on forumdisplay.php :
PHP Code:

// ADDED BY ERK 
if ($forum[cancontainthreads]!=0


$subforums=$DB_site->query("select title,forumid from forum where parentid = $forum[forumid] and active != 0 ORDER BY parentid,displayorder"); 
if (
$DB_site->num_rows($subforums)>0

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

$i 0
while (
$forum_child=$DB_site->fetch_array($subforums)) 

$i++; 
$permission=$DB_site->query_first("select accessmask from access where userid = $bbuserinfo[userid] AND forumid = $forum_child[forumid]"); 
if (
$permission['acessmask'] != || $permission['accessmask'] == null

$subs.="<a href=\"forumdisplay.php?forumid=$forum_child[forumid]&s=$session[sessionhash]\"><li>$forum_child[title]</li></a>"
if (
$i $DB_site->num_rows($subforums)) 

$subs.=""



$DB_site->free_result($subforums); 
$forum_child=null
$forum['description'].= $subs
$subs=null

// END ADDED 

But now...I have a big request :

I wanted to make the button at the left of the name of the sub-forum as an indicator gif button such as the same of when there is a new message on the forums. To know witch sub-forum as new messages...

Do you understand my request ? I'm sorry for my english...

Thank you.

FCorner 05-22-2002 11:23 AM

This is totally cool! Thank you! :-D

jbell 05-31-2002 11:29 PM

Quote:

Originally posted by valid
I updated the hack a little so it looks nice.

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

why can't I access that link?


:

You do not have permission to access this page. This could be due to one of several reasons:

If you are a registered member and a vBulletin customer, please add your username to this form to be able to access certain resticted areas on this site!

You do not have permission to access the page that you were trying to. Are you trying to edit someone else's post or trying to access administrative features? Check that you are allowed to perform this action in the Forum Rules.
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Jack Jensen 06-20-2002 04:51 PM

"Very nice hack

But I think there's a little glitch if a subforum has subforums.
The subforums of subforum are displayed this way

subforum
subforums: x, y
x
y

Is there a way to prevent it?"

Yea I have the same question/problem. If there is a way to NOT show the sub-forums under the hacked sub-forums when you're in the thread, this would be perfect. :D

Can it be done?

Massiel 08-17-2002 11:16 PM

Very kewl, was looking for this!!!

Cold Steel 09-17-2002 11:59 AM

Great hack, have had it installed for awhile.

But how come it doesn't show up in the hack database?


All times are GMT. The time now is 09:26 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,750KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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