vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Admin Signatures Parsed for vB Variables: by Logician (https://vborg.vbsupport.ru/showthread.php?t=81895)

Neutral Singh 05-25-2005 11:17 AM

Quote:

Originally Posted by yinyang
is there a place where i can get the complete list of vB variables?

mmmmmm... nope !! i dont think so ...

Zero Tolerance 05-25-2005 11:22 AM

$bbuserinfo contains a lot of information, if you make a file in your forums directory called "test.php", and put this code in it:
PHP Code:

<?php
require_once("./global.php");
print_r($bbuserinfo);
?>

Then visit this file in your browser, you will see a load of mumbo jumbo, right click, view source, you will get a lot of stuff, like:
Quote:

Array
(
[userid] => 1
[temp] =>
[field1] => I like to code :P
[field2] => England
[field3] => Coding...
[field4] => ...more coding
[field5] => Male
[field6] => #0099FF
To use this field, just put $bbuserinfo[FIELD]

So if you see:
[myfield] => Bla bla
You would use:
$bbuserinfo[myfield]

:)

- Zero Tolerance

yinyang 05-25-2005 10:31 PM

Quote:

Originally Posted by Zero Tolerance
$bbuserinfo contains a lot of information, if you make a file in your forums directory called "test.php", and put this code in it:
PHP Code:

<?php
require_once("./global.php");
print_r($bbuserinfo);
?>

Then visit this file in your browser, you will see a load of mumbo jumbo, right click, view source, you will get a lot of stuff, like:


To use this field, just put $bbuserinfo[FIELD]

So if you see:
[myfield] => Bla bla
You would use:
$bbuserinfo[myfield]

:)

- Zero Tolerance

thanks! that was awesome and so much info. for others who may find it also useful, i have found the following bbuserinfo's helpful as well:

$bbuserinfo[joindate]
$bbuserinfo[lastvisit]
$bbuserinfo[lastactivity]
$bbuserinfo[lastpost]
$bbuserinfo[reputation]
$bbuserinfo[pmtotal]
$bbuserinfo[pmunread]
$bbuserinfo[lastvisitdate]

*edit*
actually, don't use anything with dates as they show up as really long numbers.

Zero Tolerance 05-26-2005 12:55 PM

Yeah the date's show up as unix timestamps, i suppose additional code could be added to parse them into text format :)

- Zero Tolerance

COBRAws 05-27-2005 01:13 PM

im gonna have fun with this one with my members hehehe

supernet33 06-05-2005 08:30 PM

I installed this, and it works fine in all the admins except for one? Could it be some permissions?

Neutral Singh 06-06-2005 04:36 AM

Yes, i think the user should be a member of Administrator (id: 6) Usergroup.

Hoang Tu Ao Den 06-26-2005 08:01 PM

Installed ! Can I have more than one usergroups ?

Neutral Singh 06-30-2005 04:30 AM

Quote:

Originally Posted by Hoang Tu Ao Den
Installed ! Can I have more than one usergroups ?

Code:

Edit includes/functions_showthread.php

FIND
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

ADD BELOW:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                // Logician Hack : Admin signatures parsed for vb variables
                                if ($post['usergroupid']==6)
                                {
                                        @eval('$post[signature] = "' . addslashes($post['signature']) . '";');
                                        $post['signature'] = stripslashes($post['signature']);
                                }
                                // Logician Hack : Admin signatures parsed for vb variables
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

JUST BELOW THE ABOVE CODE, ADD:
Code:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                                // Logician Hack : Admin signatures parsed for vb variables
                                if ($post['usergroupid']==2)
                                {
                                        @eval('$post[signature] = "' . addslashes($post['signature']) . '";');
                                        $post['signature'] = stripslashes($post['signature']);
                                }
                                // Logician Hack : Admin signatures parsed for vb variables
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

(Notice the change in above code --> if ($post['usergroupid']==2). You can do it for each usergroupid, separately. :)

Enjoy !!

Hoang Tu Ao Den 07-02-2005 09:43 PM

Thank you !


All times are GMT. The time now is 07:53 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.01161 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_php_printable
  • (4)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