PDA

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


Mother_Dee
01-24-2008, 10:00 PM
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 usergroup (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* (https://vborg.vbsupport.ru/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)

Mother_Dee
01-25-2008, 08:28 PM
If the above code doesn't work to pull your information, try using the alternate code used by SigGen (it's been changed between the two a few times.)

Replace:

<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>


With:

<a href="http://www.YOURFORUMS.com/roster/index.php?p=char-info&a=c:$post[username]"><img src="http://www.YOURFORUMS.com/roster/index.php?p=util-siggen-signature&a=c:$post[username]@REGION-SERVER" border="0" /></a>

BlizzardHQ
01-25-2008, 11:40 PM
/me clicks for future reference

Mother_Dee
01-28-2008, 01:46 PM
I'm waiting to see if there are going to be any changes once the beta for WoWRoster is completed, I'll post updates if that happens.

Mother_Dee
01-28-2008, 01:56 PM
Thanks for the install. :)

Mother_Dee
01-30-2008, 07:18 PM
Updated demo links as I've made some changes to my forums.