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)

Naxon 08-12-2007 10:00 PM

[Naxon] Global Variables
 
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 :)

Naxon 08-13-2007 08:31 PM

First post reserved.

Version 1.1 Released: New Variables
Variables added in 1.1:
Quote:

$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.

Adrian Schneider 08-13-2007 08:35 PM

Not to be rude, but what is the point of this?

Cole2026 08-13-2007 08:45 PM

Quote:

Originally Posted by SirAdrian (Post 1316813)
Not to be rude, but what is the point of this?

Yeah, doesn't the userinfo array carry all this information?

ragtek 08-13-2007 08:47 PM

all this variables existists without your plugin ;)
so it is just extracode that have to be executed and extramemory because you are not using & ( don't know whats the exact name on english)

Naxon 08-13-2007 08:53 PM

^ I know, I'm doing now a new version with new variables.

ragtek 08-13-2007 08:54 PM

lol?

SCRIPT3R 08-13-2007 08:57 PM

same idea; https://vborg.vbsupport.ru/showthread.php?t=133923? but again, useless as all this is already available by default.

Naxon 08-13-2007 09:25 PM

Version 1.1 Released: New Variables
Variables added in 1.1:
Quote:

$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.

ragtek 08-13-2007 09:32 PM

i would use the forumcache instead of your query for the forums, because if someone don't have the rights, he shouldn know how many forums exist in my eyes

for all other things the same..
just want to help ;)

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

MiahBeSmokin420 01-27-2008 12:27 AM

Delete This Post I Made | Delete This Post I Made | Delete This Post I Made |


All times are GMT. The time now is 06:00 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.01299 seconds
  • Memory Usage 1,759KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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