vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Multiple Signatures Hack. (https://vborg.vbsupport.ru/showthread.php?t=59588)

hwtan 01-02-2004 10:00 PM

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

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!

[high]* MGM clicks install
[/high]

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

Quote:

Originally Posted by hwtan
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

Quote:

Originally Posted by the_sisko
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):

PHP Code:

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

Quote:

Originally Posted by hwtan
Updated! Now support signature titles.

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

PHP Code:

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

Quote:

Originally Posted by Boofo
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:
PHP Code:

<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

Quote:

Originally Posted by hwtan
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:
PHP Code:

<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

Quote:

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']);


All times are GMT. The time now is 04:43 PM.

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.02558 seconds
  • Memory Usage 1,827KB
  • 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
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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