PDA

View Full Version : Multiple Signatures Hack.


hwtan
01-02-2004, 10:00 PM
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

Dan
01-03-2004, 05:57 PM
thanks for the hack :D I might use it not sure yet

MindTrix
01-03-2004, 05:58 PM
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.

TheAnt
01-03-2004, 05:59 PM
Nice *install

idwf
01-03-2004, 07:32 PM
very nice...could you modify this some more though, and make a random sig option?

Dean C
01-03-2004, 07:47 PM
Wow this looks great :)!

Gio Takahashi
01-03-2004, 07:49 PM
Nice Hack, I think I will install this!

hwtan
01-03-2004, 07:50 PM
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.

The Keeper
01-03-2004, 08:51 PM
Couldn't you just have an option which says Random and use the MySQL rand function?

C.Birch
01-03-2004, 09:18 PM
useing quick reply now sign shows rest works fine even if theres a few $'s missing in the install log ;)

DuffMan
01-03-2004, 09:20 PM
I'd like a random sig option too.

paratek
01-03-2004, 10:32 PM
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

MGM
01-03-2004, 11:57 PM
nice! i was looking for this :p

thanks for making it man!

* MGM clicks install

MGM out

hwtan
01-04-2004, 02:33 AM
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.

Boofo
01-04-2004, 07:04 AM
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? ;)

idwf
01-04-2004, 08:53 AM
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

C.Birch
01-04-2004, 09:57 AM
updated all working great here

Sephiroth 9999
01-04-2004, 11:25 AM
Looking good. :)

*Installs

the_sisko
01-04-2004, 11:35 AM
Make an input text field to give the sigs a title an display the titel instead of sig 1, sig2, ..., sigX

Boofo
01-04-2004, 01:31 PM
How would you do that, sir? ;)

rake
01-04-2004, 02:49 PM
Is the signature editor still compatible with the editor inferface settings in vbulletin?
Nice hack. My members will like it. :)

FASherman
01-04-2004, 08:22 PM
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!

C.Birch
01-04-2004, 09:25 PM
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.

hwtan
01-05-2004, 04:08 AM
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.

LeonHartHVA
01-08-2004, 09:44 AM
I like this hack very much. Thanks hwtan

Boofo
01-08-2004, 10:03 AM
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.

gmarik
01-08-2004, 05:28 PM
Nice and neede one - I give you thanks.

hwtan
01-08-2004, 11:46 PM
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.

krash123
01-17-2004, 12:49 AM
This could be fun, I'm gonna try it out tommorow.

gmarik
01-17-2004, 06:23 AM
<a href="https://vborg.vbsupport.ru/member.php?u=34866" target="_blank">krash123</a> vbmenu_register("postmenu_463642", true); would be really interesting

wolfe
01-19-2004, 11:34 AM
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 .....

msimplay
01-22-2004, 04:03 PM
will add when the hacks out of beta and when i have my forum on Vb gold

spence2
02-09-2004, 05:35 PM
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:

SB2002
03-11-2004, 01:49 PM
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?

Anub1s
03-27-2004, 06:40 PM
0k i install it

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

Vivi Ornitier
04-20-2004, 01:54 AM
ya what's the vartitle for the last phrase??

LeonHartHVA
04-21-2004, 02:08 PM
when u'll have final release :)

LeonHartHVA
04-22-2004, 04:18 AM
SQL-query :

UPDATE userfield SET fieldX = 'First Signature'

MySQL said:


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


How can I fix it

Vivi Ornitier
04-22-2004, 07:04 PM
can someone answer my question?

Sulaiti
05-27-2004, 03:09 PM
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']);

weaver
05-27-2004, 06:48 PM
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. :)

Sanity
07-31-2004, 12:26 PM
I got a parse error in functions_showthread. This piece of code:

Sry, didnt see the posting above :nervous:

Sanity
07-31-2004, 12:57 PM
My fault, all errors fixed.

weaver
08-02-2004, 02:03 PM
great hack :)

weaver
08-02-2004, 02:12 PM
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! :)

Reeve of shinra
08-03-2004, 03:52 AM
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>

Berethorn
10-11-2004, 12:30 AM
*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. :)

Talisman
10-11-2004, 03:23 AM
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?

integra99
10-12-2004, 04:48 AM
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.

integra99
10-13-2004, 06:24 PM
Any idea how to integrate this with the AdminCP so I don't have to use phpMyAdmin everytime I have to change someones signature?

Shadow Blaze
10-22-2004, 05:25 AM
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*

urmyantichrist
11-11-2004, 08:51 PM
I've run into a problem after installing this hack... Noone's signatures are showing up at all now..

Any insight?

outlaw621
11-16-2004, 04:59 PM
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

urmyantichrist
11-16-2004, 06:35 PM
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!

Scerina
11-19-2004, 03:33 AM
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!

Scerina
11-21-2004, 06:31 AM
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?

Scerina
11-21-2004, 06:48 AM
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'] = '';
}

Scerina
11-21-2004, 06:54 AM
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

Scerina
11-21-2004, 03:25 PM
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...

Dean C
11-21-2004, 04:05 PM
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

urmyantichrist
11-22-2004, 07:32 PM
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?

urmyantichrist
12-14-2004, 07:05 PM
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??

jos
12-23-2004, 09:10 AM
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

EDDIE!
12-28-2004, 01:52 AM
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?

ozmazdaclub
12-29-2004, 09:14 PM
Parse errors anyone shed some light on this please...

ozmazdaclub
01-03-2005, 10:37 PM
Noi signatures now after the uninstallation... what the helll....

Neikol
01-06-2005, 11:23 AM
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?

Berethorn
01-30-2005, 04:11 AM
There's a major problem with this....admin cannot edit signatures (without phpmyadmin).

Is there a way around this? :\

Wired1
07-07-2006, 12:59 PM
anyone thought of updating this for vB 3.5/3.6?