vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - [Naxon] Global Variables (https://vborg.vbsupport.ru/showthread.php?t=155144)

Paul M 08-13-2007 09:35 PM

This adds five select queries to every page, including selecting the entire post, pm and thread tables !

I suggest you need to rethink this - those queries will kill anything but the smallest forums.

Naxon 08-13-2007 10:53 PM

^ sorry, I forgot to add this on the new version.

Wayne Luke 08-14-2007 01:08 AM

It would be better to create a datastore row for this and then use a scheduled task to update that row. Then all the information can be pulled with one query, you don't pull extra crap out of the database and the administrator of the site can adjust the interval to suit his/her site. Just adding variables to add them isn't always a good idea.

Surviver 08-14-2007 03:40 AM

With the following PHP-Code you can save 2 Queries.

PHP Code:

$forums 0;
$categories 0;

foreach (
$vbulletin->forumcache as $forum)
{
    if (
$forum['options'] & $vbulletin->bf_misc_forumoptions)
    {
        
$forums++;
    }
    else
    {
        
$categories++;
    }



Zachery 08-14-2007 04:16 AM

Quote:

Originally Posted by Naxon (Post 1316924)
^ sorry, I forgot to add this on the new version.

Whats the point of duplicating these?

Code:

$naxon[userid] - User's ID.
$naxon[username] - Username.
$naxon[usergroup] - User's group ID.
$naxon[userposts] - User's post count.
$naxon[userkarma] - Users karma (reputation).
$naxon[usermail] - User's email address.
$naxon[ip] - User's IP.

Those are all already available in $bbuserinfo / $vbulletin->userinfo

FreshFroot 08-14-2007 04:16 AM

Naxon.. your better off putting time in the SEO hack you were making than this hack...

Magnumutz 08-14-2007 05:27 AM

I concur with FreshFroot... that re-write mod was really starting to get som attention.

Naxon 08-23-2007 10:11 PM

Yeah, I can't find time... I'll continue this soon...
I'm working :)

Zachery 08-25-2007 12:00 PM

Quote:

Originally Posted by Naxon (Post 1316924)
^ sorry, I forgot to add this on the new version.

Whats the point of duplicating these?

Code:

$naxon[userid] - User's ID.
$naxon[username] - Username.
$naxon[usergroup] - User's group ID.
$naxon[userposts] - User's post count.
$naxon[userkarma] - Users karma (reputation).
$naxon[usermail] - User's email address.
$naxon[ip] - User's IP.

Those are all already available in $bbuserinfo / $vbulletin->userinfo

booktoweb 01-26-2008 11:59 PM

nor work with 3.7.0


All times are GMT. The time now is 02:55 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.01035 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (2)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
  • (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