Helpful Information
 
 
Category: vBulletin 3.0 Beta Releases
Multiple Signatures Hack.

Allows user to have multiple signatures.

The user can choose which signature to use for a post or private message or have a signature randomly displayed with the post.

Does not require additional queries for normal usage.

####################################################

Templates to modify (6):
modifysignature, editpost, newreply, newthread, showthread_quickreply, pm_newpm

Files to modify (2):
./profile.php, ./includes/functions_showthread.php

####################################################
# Revision History:
####################################################
04 Jan 2004, 0400hrs (GMT+8)
Initial Beta Release (for vB3 RC1)

04 Jan 2004, 0500hrs (GMT+8)
Fixed: When editing signature with WYSIWYG editor, changing the
selected signature does not update the WYSIWYG with the
signature.

04 Jan 2004, 1200hrs (GMT+8)
Fixed: Miscellanous typo in this document.
Fixed: Empty signature shown in post/PM after user removed signature.
Fixed: Disallow user from selecting an empty signature.
Fixed: Removed hardcoded 'No' with $vbphrase[no].
Changed:Editing a post that has a empty signature now automatically
remove the signature.
New: Now remember user's last edited signature.

04 Jan 2004, 1630hrs (GMT+8)
Fixed: Signature showing up only once per thread.
New: Random Signatures.
New: User may choose the default signature type (random/last edited)
for new posts and private messages.

05 Jan 2004, 1400hrs (GMT+8)
Changed:Order of installation to allow updates of default values.
Changed:Loop instead of if/else statements for new default signature.
Changed:Use $vbphrase[none] instead of $vbphrase[no].
Changed:Use of $vbphrase[sigopt_*] for template conditionals to allow
changes to be made to the option titles without having to
re-edit the templates.
New: Use of signature titles instead of numbers.

06 Jan 2004, 1130hrs (GMT+8)
Fixed: More typos:
$vbphrase[signopt_none] to $vbphrase[sigopt_none]
'Random Signature' in pm_newpm to $vbphrase[sigopt_random]
Changed:Renamed $vbphrase[none] --> $vbphrase[sig_none]
Changed:Renamed $vbphrase[sigrand] --> $vbphrase[sig_random]
Changed:User Profile Options to use a dropdown box
Changed:Comments to delimits code changes in changed php files.
New: Signature editor open with last edited signature.
New: Phrase $vbphrase[sigopt_first]
New: Now with option to allow user to use his/her first signature as
the default signature.
New: Tested with vB3 RC2

thanks for the hack :D I might use it not sure yet

Is this because someone asked for it? I saw a thread thats all.

Nice work mate ill be sure to install this soon as it is very handy.

Congratulations and thanks.

Nice *install

very nice...could you modify this some more though, and make a random sig option?

Wow this looks great :)!

Nice Hack, I think I will install this!

Thanks for the comments :)

MindTrix: Yes, this was written because people asked for it in the Modification requests forum.

idwf: Modification in what way? Random sig is not practical at the moment.

Couldn't you just have an option which says Random and use the MySQL rand function?

useing quick reply now sign shows rest works fine even if theres a few $'s missing in the install log ;)

I'd like a random sig option too.

Not sure if you realize it, but there is typo in your instructions

This:

#######################################################################
#
# AdminCP: Under Style & Template, Search In Template, Search for text: cp_signature, Search In Title Only: No
#######################################################################

shouldn't it be cb_signature? Thre me off for a while untill i changed it

Paratek smacks the *install* My Users are loving this...Nice Hack

nice! i was looking for this :p

thanks for making it man!

/me clicks install

MGM out

C.Birch, Paratek: sorry for the mistakes. Yeap, it's cb_signature. Fixed the missing '$'.

Now supports random signatures :)

For those whom installed this, please feedback if you encounter any problem. Will do a full release if no major bugs are reported.

Maybe in the drop down to pick the sig you could have the fist so many characters show up so we can chnage to another sig if we want to. It can still stay random, just gives us an idea of what sig will display. Does that make any sense? ;)

Thanks for the comments :)

MindTrix: Yes, this was written because people asked for it in the Modification requests forum.

idwf: Modification in what way? Random sig is not practical at the moment.
urm....in the sense that theres an option in the dropdown that selects a random one of your saved sigs. So, that you dunno what one will be added. I like this idea cos ive created many sig images, and dont want to waste them all :p

updated all working great here

Looking good. :)

*Installs

Make an input text field to give the sigs a title an display the titel instead of sig 1, sig2, ..., sigX

How would you do that, sir? ;)

Is the signature editor still compatible with the editor inferface settings in vbulletin?
Nice hack. My members will like it. :)

Make an input text field to give the sigs a title an display the titel instead of sig 1, sig2, ..., sigX
I agree. I'd rather pick signatures based on a description rather than a number. Instead of picking 1,2,3,4, etc, I'd rather pick between default, sports, politics, humorous.

Other than that, damned nice hack!

something i like to see is a drop down in user cp where a user can pick one to show if they dont pick. i know theres the use last edited bit but i mean let them use 1, 2 or 3 just incase they forget to pick.

because alot of my users are forgetting to pick and having no sign showing.

Updated! Now support signature titles.

C.Birch, run this SQL command (assuming no table prefix):


UPDATE userfield SET fieldX = 'Last Edited Signature' WHERE fieldX='';


This will reset users with no default setting to use the last edited signature in their profile, which by default, is the first signature.

I like this hack very much. Thanks hwtan

Updated! Now support signature titles.

C.Birch, run this SQL command (assuming no table prefix):


UPDATE userfield SET fieldX = 'Last Edited Signature' WHERE fieldX='';


This will reset users with no default setting to use the last edited signature in their profile, which by default, is the first signature.Can we set this up to only allow certain usergroups or users to use it? I'd like to set it up so only the staff can use it (or the Admin).

Also, can we get a checkbox in the postbit to allow turning it off for that message (like it is now)? If it is checked, it will use whatever you have in the drop down showing or you can change it) and if the box is unchecked it will show no sig at all in that message.

Nice and neede one - I give you thanks.

Can we set this up to only allow certain usergroups or users to use it? I'd like to set it up so only the staff can use it (or the Admin).

Also, can we get a checkbox in the postbit to allow turning it off for that message (like it is now)? If it is checked, it will use whatever you have in the drop down showing or you can change it) and if the box is unchecked it will show no sig at all in that message.

1. A simple way to do is would be to use template conditionals to determine if the user is belongs to a group allowed to use the multi-signatures hack and if not so display the unmodified version of the template.

Something like:

<if condition="is_member_of($bbuserinfo[userid], $powerusergid))">
... modified version of the template follows
<else />
.. original template
</if>


2. There's a 'No Signature' option in the combo box. When that option is selected, no signature will be shown for the particular message.

This could be fun, I'm gonna try it out tommorow.

krash123 (http://www.vbulletin.org/forum/member.php?u=34866) vbmenu_register("postmenu_463642", true); would be really interesting

FIXED NOW nevermind but this mods instuctions are too unclear to follow they need rewriting out like the thing about the "N" and the insert fields with N in then and the only thing seperating them is .....

will add when the hacks out of beta and when i have my forum on Vb gold

1. A simple way to do is would be to use template conditionals to determine if the user is belongs to a group allowed to use the multi-signatures hack and if not so display the unmodified version of the template.

Something like:

<if condition="is_member_of($bbuserinfo[userid], $powerusergid))">
... modified version of the template follows
<else />
.. original template
</if>



Could you possibly include this as a standard option in your great hack? My users can "get by" with one signature...but multiple signatures for the admin would be very useful.

Sorry I'm not smart enough to figure this out without your help. :ermm:

i'd love to use this hack, but in the txt file i have (most recent on, downloaded today) the final phrase is missing a var name and it wont let me add it without a var name, if anyone has this installed on rc4, would you care to share with me how you got it up and running?

0k i install it

just want to know how can i get 2+ signatures?

ya what's the vartitle for the last phrase??

when u'll have final release :)

SQL-query :

UPDATE userfield SET fieldX = 'First Signature'

MySQL said:


#1054 - Unknown column 'fieldX' in 'field list'


How can I fix it

can someone answer my question?

Fix :nervous:

Phrase Type: User tool (global)
Varname:
Text: Signature Title

will be :

Phrase Type: User tool (global)
Varname: signature_title
Text: Signature Title


for vBulletin Version 3.0.1

find :

/includes/functions_showthread.php


$post['signature'] = parse_bbcode($post['signature' . $post[showsignature], 'nonforum', $vboptions['allowsmilies']);


Change to :

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

Looks like a nice one but I'll wait til it's out of Beta. I think it's a great idea for a hack. :)

I got a parse error in functions_showthread. This piece of code:


Sry, didnt see the posting above :nervous:

My fault, all errors fixed.

great hack :)

Fix :nervous:

Phrase Type: User tool (global)
Varname:
Text: Signature Title

will be :

Phrase Type: User tool (global)
Varname: signature_title
Text: Signature Title


for vBulletin Version 3.0.1

find :

/includes/functions_showthread.php


$post['signature'] = parse_bbcode($post['signature' . $post[showsignature], 'nonforum', $vboptions['allowsmilies']);


Change to :

$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
Thanks very much! Maybe the install instructions should be updated to reflect this? It would have saved me a lot of stress! :)

For anyone using this custom usergroups:

Did you also wrap the edit from hwtan around the replacents for:


<label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label>

*Installed* After some hassle. The instructions could be a bit clearer, but the hack is very good.

Things that would be great: The ability to only allow admin or other user groups to use the random sig, or choose their sig. I can see this being abused. If people change large images and stuff, it will confuse things easily. It's much better if the only thing that is randomized is a simple text quote. :)

What a nice hack.. thks! I'd like to install this on my test board, but I need a little help adding some conditionals to the code.

1 - If member is in the admin or mod usergroups, they get to use multiple sigs. That's a nice touch.

2 - If you have contributing members in some "premium" usergroup, they should have this, too. That's a useful perk to offer people who've actually donated money to support your site.

3 - Members of an age-restricted/adult-only usergroup with access to private areas could use an alternate sig inside "naughty" forums.... but those sigs wouldn't be appropriate in the more public forums where they would be seen by all the other members.

How would I set random/selectable conditions based on usergroup ID -- AND -- restrict certain (adult oriented) sigs according to specified forum IDs?

I installed this hack, but edited it to my needs. I have it set to select from 3 signature (1,2,3), removed the 'N' signature (not sure what that is). Also, the random function would not work for me whatever I tried to do.

Any idea how to integrate this with the AdminCP so I don't have to use phpMyAdmin everytime I have to change someones signature?

nope... doesn't make any sense whatsoever to me :-p but that's okay doesn't have to, i don't mind using this hack *presses the install button*

I've run into a problem after installing this hack... Noone's signatures are showing up at all now..

Any insight?

I've run into a problem after installing this hack... Noone's signatures are showing up at all now..

Any insight?

I am having the same problem

I have tried uninstalling this hack, but still cannot see any signatures on threads/posts... Not getting any errors, just not able to see sigs...

Help!

Can someone please install this hack for me? If you can help me out, please contact me via email at: Pandora@Sweet-November.Net

Thanx!

I installed this hack and it wont let me change the second signature nor would it save...it just stays on the first one.

What is wrong? Can someone help me out plz?

Okay, am gettin error messages in my threads...when I go to view them I get this:
Parse error: parse error, unexpected ',', expecting ']' in /home/pandy/public_html/boards/includes/functions_showthread.php on line 546

Can someone please look at this coding and tell me if everything is correct and if not, how can I fix it? This is from my functions_showthread.php file that we are suppose to modify for this pacific hack:
// Multiple Signatures Hack by Ethan -- Start of Code Block
// choose a random signature
if ($post['showsignature'] == 127) {
$sigtries = N;
$post['showsignature'] = rand(1, N);
while (($post['signature' . $post['showsignature']] == '') AND ($sigtries> 0)) {
$post['showsignature'] = ($post['showsignature'] % N) + 1;
--$sigtries;
}
if ($sigtries == 0) $post['showsignature'] = 0;
}
$post['signature'] = $post['signature' . $post['showsignature']];
// Multiple Signatures Hack by Ethan -- End of Code Block
// get signature
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
{
// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
if (!isset($sigcache["$post[userid]_$post[showsignature]"]))
{
$parsed_postcache['skip'] = true;
$post['signature'] = parse_bbcode($post['signature' . $post[showsignature], 'nonforum', $vboptions['allowsmilies']);

// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
$sigcache["$post[userid]_$post[showsignature]"] = $post['signature'];
}
else
{
// Modified by Multiple Signature Hack, to uninstall change $sigcache["$post[userid]_$post[showsignature]"] to $sigcache["$post[userid]"]
$post['signature'] = $sigcache["$post[userid]_$post[showsignature]"];
}
}

else
{
$post['signature'] = '';
}

threads on my forum are now messed up...

I am gettin these parse error messages...

Here is the link to my forum:
http://www.underworld-chaos.net/boards

What kind of hack is this if u can't freaking get support?! esp from the creator themselves who created this hack???? My forum is all screwed up now...

Scerina - No author is obided to provide support for their modification. Note this author has not ticked the box to offer support. This community is a forum for volunteers to help each other and share their work. Please be more polite in future when making posts as after all you modify your board at your own risk and no-one but you is responsible for that :) Also please don't quadruple-post :D! Thankyou for understanding

I have tried uninstalling this hack, but still cannot see any signatures on threads/posts... Not getting any errors, just not able to see sigs...

Help!

Can anyone help with this?

Tried reinstalling once more, to see if I could get my signatures back, and no deal..

Can someone help me understand these instructions a bit better??

Hi,

Can you modify your multiple sig hack for use in 3.03 and install it for me at my group... i'm ready to pay 75 $.

can yu do this? please advise.
if not can you refer me to someone who can?

btw, after paying, i am ready to share it free here at your thread for others to take adavantage of.

please advise.

thanks
jos

hpsinfo_03@myway.com

I've run into a problem after installing this hack... Noone's signatures are showing up at all now..

Any insight?
I am now having the same problem.
If anyone got this to work, can you please help us?

Parse errors anyone shed some light on this please...

Noi signatures now after the uninstallation... what the helll....

I'm also having the same problem as urmyantichrist...I installed and no one's signatures showed up at all, and I have no uninstalled everything as far as I can tell, but still can't seem to get the signatures back...any clues?

There's a major problem with this....admin cannot edit signatures (without phpmyadmin).

Is there a way around this? :\

anyone thought of updating this for vB 3.5/3.6?










privacy (GDPR)