Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 May 2011, 11:43
Evertonized Evertonized is offline
 
Join Date: Feb 2008
Default Sigs

Hi Guys,

Is there a way to display default signatures on posts, if a user hasn't set one?

Thanks
Steven
Reply With Quote
  #2  
Old 26 May 2011, 11:56
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
On the hook postbit_display_complete, you could add some PHP Code as a Plugin to test for the existence of a signature, and if it's absent, then put in your code.

For example,


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Basically,
  1. go to your AdminCP.
  2. Expand "Plugins & Products"
  3. Click "Add New Plugin"

On this page,
  1. Leaving "Product" as vBulletin is just fine.
  2. Choose postbit_display_complete as your hook.
  3. Put in a descriptive title. "That Genius Sarteck's Solution for our Default Sigs!" springs to mind, but you can title it however you want.
  4. Execution Order can be left at the default of 5.
  5. Put in the PHP Code I provided.
  6. Make sure that the Plugin is NOT active, at first.

Save and Reload.

Now, in another tab/window, open up a thread with someone who has no signature. Go back to your AdminCP (should still be on the Plugin you created since you saved and reloaded WITHOUT activating it). Now go ahead and choose "Yes" to activate it, then reload your thread, look, and if it works, great! If not, you come back here and say, "DAMN IT, SARTECK, YOU'RE A NINCOMPOOP FOR GIVING ME FALSE INSTRUCTIONS." And then we'll take it from there.

EDIT: P.S., setting the Plugin to "No" for it's activity is good if it doesn't work, too, so no one gets errors.
Reply With Quote
  #3  
Old 26 May 2011, 20:00
kaype kaype is offline
 
Join Date: May 2007
Hi Sarteck, looks like a easy solution. But what if I need an auto-signature to be assigned to all members of particular usergroup? Is there a similar easy solution?
Reply With Quote
  #4  
Old 26 May 2011, 21:44
Evertonized Evertonized is offline
 
Join Date: Feb 2008
DAMN IT, SARTECK, YOU'RE A NINCOMPOOP FOR GIVING ME FALSE INSTRUCTIONS.

And I had thought of a really good plugin name, to say thank you - but I'll tell you it, once/if we get it working :P

Thanks for helping btw.
Reply With Quote
  #5  
Old 26 May 2011, 22:09
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
@kaype, there is indeed.

You can test for the user belonging to a specific usergroup by adding a little bit to the IF block, like so. :>


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.





@Evertonized, I made a booboo in my code. (Forgive me, it was before I went to bed. XD) There should only be a SINGLE equal sign for assignment.

I had you putting,
$this->post['signature'] == 'THIS IS A DEFAULT SIGGY!';

It should be,
$this->post['signature'] = 'THIS IS A DEFAULT SIGGY!';
Reply With Quote
  #6  
Old 26 May 2011, 22:59
kaype kaype is offline
 
Join Date: May 2007
Gr8, thanks !

But guess I don't need the below code as I want to force the signature for all users in that group.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Also is there a way to set/force this on registration to a certain group? Like all users registering from X location will go into X group and they will will have a preset signature.
Reply With Quote
  #7  
Old 26 May 2011, 23:13
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
@kaype, if you want to force the same signature for all users in a group, a slightly different method should be used:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That will assign the signature to all members of a group, regardless of what they put in their signature box.



Forcing it on registration to a certain group is possible, too, but it would require some different methods. It also depends on if you want users to be able to change their signature at a later date. (The method above will not allow them to change their signature while they are a member of that group. Well, more accurately, they can make all the changes they want, but that sig you set will always be what shows up.)
Reply With Quote
  #8  
Old 27 May 2011, 00:33
kaype kaype is offline
 
Join Date: May 2007
Forcing it on registration to a certain group is possible, too, but it would require some different methods. It also depends on if you want users to be able to change their signature at a later date.
Can you let plz me know how to do this, as I am interested in set/force it on registration to a certain group.
Reply With Quote
  #9  
Old 27 May 2011, 00:52
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Well, I gotta know what it is you want. XP

You want, upon registration, for users to be placed into a group other than Registered Users?

And you want this group to be forced to wear a certain signature?

And you want this group to not be able to change their Sigs?

Do you want anyone to be ABLE to change their sigs? Does your Administrative staff have to manually move users out of the group in order for them to use sigs normally?
Reply With Quote
  #10  
Old 27 May 2011, 01:11
kaype kaype is offline
 
Join Date: May 2007
You want, upon registration, for users to be placed into a group other than Registered Users?
Yes, and I know how to do that. That is not what I am looking for.

And you want this group to be forced to wear a certain signature?
Yes, that is right. On signup or if admins/mods change a users usergroup. Basically any user with that user group should have this sig.

And you want this group to not be able to change their Sigs?
No, they cannot. Maybe admins can add a second sig if needed for a few user. But that is not important.

Do you want anyone to be ABLE to change their sigs?
No, not in this group as mentioned above.

Does your Administrative staff have to manually move users out of the group in order for them to use sigs normally?
Again, I think I have answered this - maybe admins can add a second sig if needed for a few user. But NOT change the primary preset sig.
Reply With Quote
  #11  
Old 20 Aug 2011, 15:44
xrvel xrvel is offline
 
Join Date: Jul 2011
Closed
__________________
Hi there !

Last edited by xrvel; 08 Mar 2020 at 12:14. Reason: Closed
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Thread Enhancements Spoiler Sigs (Hidden Signatures) - Hide Sigs by Usergroup, Userid or Post Count BirdOPrey5 vBulletin 3.8 Add-ons 4 25 May 2014 13:02
Show Thread Enhancements Spoiler Sigs (Hidden Signatures) - Hide Sigs by Usergroup, Userid or Post Count BirdOPrey5 vBulletin 4.x Add-ons 29 24 Apr 2012 05:04



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


New To Site? Need Help?

All times are GMT. The time now is 20:03.

Layout Options | Width: Wide Color: