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)
-   -   Administrative and Maintenance Tools - ZH - Global Variables (https://vborg.vbsupport.ru/showthread.php?t=133923)

Ziki 12-12-2006 10:00 PM

ZH - Global Variables
 
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Hack name
Global Variables

~Hack description
Allows you to use some variables in any template you want for example when adding $zhmemberstotal it will display the number of members you have in total.:cross-eyed:

~Hack options
  • On/Off
  • On/Off Members
  • On/Off Threads
  • On/Off Posts
  • On/Off Polls
  • On/Off Events
  • On/Off Smilies
  • On/Off Forums
  • On/Off Attachments

~Hack info
File uploads: 0
Template edits: 0
Templates: 0
File edits: 0
Plugins: 1
SQL Queries: 0
Phrases: 3
Settings: 1

Install time: 3 sec
Install level: Easy

~Hack installation

Step 1: Import Product


~Hack screenshots
None


~Hack copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki 12-13-2006 05:23 PM

Variables:

$zhmemberstotal >>>>> Number of members in total.
$zhthreadtotal >>>>> Number of threads in total.
$zhposttotal >>>>> Number of posts in total.
$zhpolltotal >>>>> Number of polls in total.
$zhsmilietotal >>>>> Number of smilies in total.
$zhforumtotal >>>>> Number of forums in total.
$zheventtotal >>>>> Number of events in total.
$zhattachmenttotal >>>>> Number of attachments in total.

Surviver 12-13-2006 06:06 PM

This is not goode for the Performace, ist adds 8 Queries to each page. (global).

If you have a slow Server or many members, this is not good for the Perforace ...

Greetings SUrviver

Ziki 12-13-2006 06:07 PM

Yes I know.

Atakan KOC 12-13-2006 06:15 PM

very poor...

My Forum : Session Timeout 900 seconds
Online User : 400 :(

Xoligy 12-13-2006 06:16 PM

Why not make the ability to turn each one on/off?

Ziki 12-13-2006 06:21 PM

Will do.Wait a minute,Great idea anyways :D

Garyk 12-13-2006 06:27 PM

very nice waitng for you to update it so you can turn things on and off

Ziki 12-13-2006 06:31 PM

1.0.1 released

Options for every variable edit so you can shutdown the query.

Adrian Schneider 12-13-2006 06:34 PM

This is what the datastore is for. Have these queries run via cron and store them in the datastore... no point running them on every page!

Garyk 12-13-2006 06:39 PM

just installed and i get this error when trying to install
Code:

Database error in vBulletin 3.6.2:

Invalid SQL:

                                INSERT INTO vb_setting
                                        (varname, grouptitle, value, defaultvalue, datatype, optioncode, displayorder, advanced, volatile, validationcode, blacklist, product)
                                VALUES
                                        (
                                        'zh_variables_onoff',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        10,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_members',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        20,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_threads',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        30,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_posts',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        40,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_forums',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        50,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_smilies',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        60,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_posts',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        70,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_events',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        80,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        ),
        (
                                        'zh_variables_attachments',
                                        'zh_variables',
                                        '1',
                                        '1',
                                        'boolean',
                                        'yesno',
                                        90,
                                        0,
                                        1,
                                        '',
                                        0,
                                        'zh_variablesX'
        );

MySQL Error  : Duplicate entry 'zh_variables_posts' for key 1
Error Number : 1062
Date        : Wednesday, December 13th 2006 @ 02:38:35 PM
Script      : http://pspvert.net/forums/admincp/plugin.php?do=productimport
Referrer    : http://pspvert.net/forums/admincp/plugin.php?do=productadd
Classname    : vb_database


Ziki 12-13-2006 06:53 PM

UNinstall and import again

Garyk 12-13-2006 07:01 PM

i get the same error but when i go into vbulletin options i get the options for this mod im testing if the phrases work now

Edit: nope they dont work

Ziki 12-13-2006 07:04 PM

Oh OK wait will fix now

Garyk 12-13-2006 07:05 PM

Quote:

Originally Posted by Ziki (Post 1137985)
Oh OK wait will fix now

thnx plz post abck when fixed

Ziki 12-13-2006 07:06 PM

1.0.2 released
small fix

Ziki 12-14-2006 07:45 AM

Quote:

Originally Posted by SirAdrian (Post 1137959)
This is what the datastore is for. Have these queries run via cron and store them in the datastore... no point running them on every page!

I never used the datastore.I might remake it today or tommorow.

SaN-DeeP 12-14-2006 10:30 PM

nice idea Ziki thanks this might be useful
/me subscribes to thread.

Ziki 12-15-2006 12:50 PM

Why subscribing and not installing?

SaN-DeeP 12-16-2006 10:43 AM

Quote:

Originally Posted by Ziki (Post 1139125)
Why subscribing and not installing?

cause I need this for my new board, which shall be launched on 1st Jan 2007 :)

Ziki 12-17-2006 02:41 PM

Oh.And if I didn't mention yet you can suggest some new variables

katilkuzu 12-17-2006 02:44 PM

thanx. *installed*...

StrifeX 01-21-2007 06:42 PM

I have a suggestion, maybe you can make a variable for displaying how many threads are in each forum.

Markup like $zhtotalforumposts[forumidhere]

How does that sound?

Ziki 01-21-2007 06:48 PM

taken into account

StrifeX 05-01-2007 03:18 PM

Well, working on it or not Ziki?

Ziki 05-02-2007 05:07 PM

Read my sig.

D&Y 07-25-2007 06:33 PM

Thanks Very Useful Hack Installed.


All times are GMT. The time now is 01:50 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.01283 seconds
  • Memory Usage 1,800KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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