PDA

View Full Version : Miscellaneous Hacks - WoWRoster (SigGen) Default Signature


Mother_Dee
27 Mar 2008, 17:38
I've had a couple of people ask how I did a default signature on my forums, so I thought I'd post the slip of code for the community.

Please note that without a WoWRoster/vBulletin integration this will currently only work if you require your Members to register with their World of Warcraft main character name (as we do since our website is a guild site.)

You must have the WoWRoster SigGen addon installed for this to work, since it pulls the default signature from the SigGen addon in WoWRoster for display. Also, this is based off of WoWRoster version 2.0 Beta release and not the previous version of WoWRoster.

Once an individual creates their own signature, the default signature graphic disappears, to be replaced by the user-created signature.

First, decide which usergroups this should apply to. This would mean any usergroups that wouldn't show on your Roster should be discluded. Write the usergroup numbers down so you don't forget. :)

Open your postbit or postbit_legacy (or both, if you have a user choice) template and find:

<if condition="$post['signature']">


Now take note of what the format of the signature is below. For a basic style the code might be something like:

<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->


You will want to copy the basic layout of the user-posted signature (div, table, etcetera, however it is posted) so that the layout is completely consistent. This is just one of many layouts styles will use, make sure you take note of the one on your forums!

Here's how it should look, with you inserting your styles' signature layout:

<if condition="$post['signature']">
(table or div format for user-set signature)
<else />

<if condition="is_member_of($post, USERGROUP,USERGROUP)">
(same table or div setup as the above so it matches)
<a href="http://www.YOURFORUMS.com/roster/index.php?p=char-info&member=$post[username]"><img src="http://www.YOURFORUMS.com/roster/index.php?p=util-siggen&mode=signature&member=$post[username]@REGION-SERVER" border="0" /></a>
</if>
</if>


Replace USERGROUP with your chosen usergroups (comma separated per the example,) YOURFORUMS with your website, REGION with EU or US, and SERVER with your server name (ie: Kael'thas).

If you want the default signature to show on the profile page for the member where a user-input signature would show, just repeat the above instructions for the member_info template.

If you have any questions, please let me know, and please *CLICK INSTALL* (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=168730) if you used this on your forums.

Demo Links:
Default Signature (http://www.darkportals.com/forum/showthread.php?p=38576#post38576)
Member Info Template (http://www.darkportals.com/forum/member.php?u=99)

Derek Chai
28 Mar 2008, 00:11
nice

quarum
30 Apr 2008, 16:49
I have to ask this - how would you do a WoWRoster/vBulletin integration? I am runnin vB 3.7.0, vBadvanced 3.0.1 and the current WoWRoster Beta.

Many many thanks

Mother_Dee
30 Apr 2008, 19:50
Unfortunately, no one has come up with a WoWRoster integration as of yet. It makes me a bit sad, but there are few integrations for vBulletin and things like WR or EQDKP, etc...

I'm with you on hoping for one eventually...