Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[Naxon] Global Variables Details »»
[Naxon] Global Variables
Version: 1.1, by Naxon Naxon is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 08-12-2007 Last Update: 08-12-2007 Installs: 12
 
No support by the author.

Please note that this mod is in BETA stage and it isn't contains a lot of variables...
In the future (next version) I'll add more variables.

Variables List:
Quote:
$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.

## Added in version 1.1 ##

$naxon[totalforums] - Total number of forums.
$naxon[totalcats] - Total number of categories.
$naxon[totalpms] - Total number of Private Messages.
$naxon[totalthreads] - Total number of threads.
$naxon[totalposts] - Total number of posts.
This Modifictioin Is Running Queries !!

You can use those variables wherever you want !

Just Upload The Product !!

Next version - more vars

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-13-2007, 09:35 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 08-13-2007, 10:53 PM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ sorry, I forgot to add this on the new version.
Reply With Quote
  #14  
Old 08-14-2007, 01:08 AM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 08-14-2007, 03:40 AM
Surviver's Avatar
Surviver Surviver is offline
 
Join Date: Feb 2006
Location: Bonn, Germany
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
  #16  
Old 08-14-2007, 04:16 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Naxon View Post
^ 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
Reply With Quote
  #17  
Old 08-14-2007, 04:16 AM
FreshFroot's Avatar
FreshFroot FreshFroot is offline
 
Join Date: Jul 2005
Posts: 770
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Naxon.. your better off putting time in the SEO hack you were making than this hack...
Reply With Quote
  #18  
Old 08-14-2007, 05:27 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I concur with FreshFroot... that re-write mod was really starting to get som attention.
Reply With Quote
  #19  
Old 08-23-2007, 10:11 PM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I can't find time... I'll continue this soon...
I'm working
Reply With Quote
  #20  
Old 08-25-2007, 12:00 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Naxon View Post
^ 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
Reply With Quote
  #21  
Old 01-26-2008, 11:59 PM
booktoweb booktoweb is offline
 
Join Date: Oct 2005
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nor work with 3.7.0
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04430 seconds
  • Memory Usage 2,308KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete