Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Admin Signatures Parsed for vB Variables: by Logician Details »»
Admin Signatures Parsed for vB Variables: by Logician
Version: 1.01, by Neutral Singh Neutral Singh is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-22-2005 Last Update: 05-24-2005 Installs: 24
 
No support by the author.

Logician Hack : Admin signatures parsed for vb variables

Version 1.01 changes explained in the End of this post.

As the thread name suggests, credit for this cute little modification belongs to Logician, the gr8 vB Magician, who distributes hacks without even taking a credit for them.

Requested by: Myself :devious: --> here



Context
Searched through all vb.org website for this nature of hack and anything that visually comes near to this modification is /you /me hack but that hack did not suit my requirement. I wanted to show any vb variable of my liking in the signatures and this little modification by Logician does exactly the same and is much more dynamic... Any resemblance to my other hack is surely coincidental.

What this hack does ?
Pretty simple, this modification is only for Admin's signatures, which parses the admin signatures for all vb variables and presents it into a readable information.

Utility:
For example: i, as an admin, want my signatures to a show personalised message for members as follows:

Dear [Aman Singh], if you like spending your time at these forums then please consider making a donation. [more details here...]

Now, here the [membername] is dynamic and should change accordingly to every user who is reading the message in my signatures. After the modification, to achieve the above signatures, i enter the following information in my signatures:

Dear $bbuserinfo[username], if you like spending your time at these forums then please consider making a donation. [more details here...]

This mod makes the vb variable $bbuserinfo[username] dynamically change for each username to make the message a lot more personalised and more appealing. (and who knows someone might get encouraged to shell out a buck or two )

Some of useful vB variables are listed below:

Code:
$bbuserinfo[username] : Username of the visitor
$bbuserinfo[email] : email of the visitor
$bbuserinfo[icq] : icq number of the visitor
$bbuserinfo[aim] : aim nick of the visitor
$bbuserinfo[yahoo] : yahoo id of the visitor
$bbuserinfo[posts] : Post count of the visitor
$bbuserinfo[homepage] : Home page of the visitor
$bbuserinfo[field1] : Value of user profile 1 of the visitor
$bbuserinfo[field2] : Value of user profile 2 of the visitor
$bbuserinfo[field3] : Value of user profile 3 of the visitor
$bbuserinfo[joindate]
$bbuserinfo[lastvisit]
$bbuserinfo[lastactivity]
$bbuserinfo[lastpost]
$bbuserinfo[reputation]
$bbuserinfo[pmtotal]
$bbuserinfo[pmunread]
$bbuserinfo[lastvisitdate]
(List compiled from gr8 WebTemplates Content Management System by Logician --> here) and kind help by Zero Tolerance

File Edits : Two

Files to Edit :
i) forum_root/includes/functions_showthread.php
ii) forum_root/member.php

Difficulty : Still, one of the easiest hacks ever.

Installation Time : Now it takes less than 3 mintues to apply the hack.

Instructions :

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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

That's all. ;)

Logician \\=^))

Modificaton done by Aurous --> here
This mod helps in parsing the signatures properly in member profiles.

Code:
In member.php:

Search for:

// signature
if ($userinfo['signature'])
{
	require_once('./includes/functions_bbcodeparse.php');


Below, add this code:


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

1.01 : Added modification by Aurous at post#8, this helps properly parsing the signatures in member profiles as well. Thanks Aurous.
1.00 : Released

Instructions are attached herewith.
The snapshot is attached herewith.

Hey You!! Dont Forget to hit INSTALL !!
Enjoy !!
Aman Singh

Show Your Support

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

Comments
  #22  
Old 07-12-2005, 02:35 PM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this be ported to vb3.5?
Reply With Quote
  #23  
Old 07-20-2005, 03:53 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Neutral Singh
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 !!
Couldn't you just do "if ($post['usergroupid']==2 OR 6)"? I don't know exactly how the OR thing works, but I know it can be used in a fashion similar to that, atleast that way you wouldn't need to repeat the entire code addition. Oh and by the way, great hack!
Reply With Quote
  #24  
Old 08-02-2005, 10:46 AM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this be done for posts??
Reply With Quote
  #25  
Old 08-05-2005, 05:01 AM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

one request can we get it so when you preview your sig you can see it as it should be seen by the users?
Reply With Quote
  #26  
Old 08-05-2005, 06:26 PM
sketch42's Avatar
sketch42 sketch42 is offline
 
Join Date: May 2004
Location: Brooklyn, NY
Posts: 361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this
Hey $bbuserinfo[username] i see you havent been on since $bbuserinfo[lastactivity] , have you read the Rules Lately.


returns this... any ideas?
Hey sketch42 i see you havent been on since 1123269876 , have you read the Rules Lately.
Reply With Quote
  #27  
Old 08-05-2005, 10:11 PM
ciocsy ciocsy is offline
 
Join Date: Jun 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, it worked like a charm!
Reply With Quote
  #28  
Old 09-02-2005, 09:07 AM
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Location: Sikh Philosophy Network
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sketch42
one request can we get it so when you preview your sig you can see it as it should be seen by the users?
Imagine your member's name instead of yours and thats what your members would see in your signatures.
Reply With Quote
  #29  
Old 11-14-2005, 10:16 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this going to be ported? *looks hopefully*
Reply With Quote
  #30  
Old 02-08-2006, 04:42 PM
goodwillstacy goodwillstacy is offline
 
Join Date: Sep 2005
Location: Atlanta & Austin
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would also love if this was ported. It really increased the number of donations I got.
stacy
Reply With Quote
Reply

Thread Tools

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 06:27 AM.


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.07355 seconds
  • Memory Usage 2,305KB
  • 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
  • (5)bbcode_code
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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