SigGen

From WoWRosterWiKi
(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
Signature/Avatar Generator AddOn for [[Roster]]
 
Signature/Avatar Generator AddOn for [[Roster]]
  
Download -> http://www.wowroster.net/Downloads/details/id=20.html<br>
+
Download -> http://www.wowroster.net/downloads/?id=20<br>
Support -> http://www.wowroster.net/Forums/viewforum/f=38.html
+
Support -> http://www.wowroster.net/forum38.html
  
Current version: '''0.3.0 - Documentation still being updated'''<br>
+
Current version: '''0.3.2.409'''<br>
Updated: 17:13, 22 June 2008 (CDT)<br>
+
Documentation is for v0.3.0 and higher<br>
 +
Updated: 01:35, 28 June 2011 (UTC)<br>
 
Author: [[User:Zanix|Zanix]]
 
Author: [[User:Zanix|Zanix]]
  
Line 19: Line 20:
 
This is very configurable, everything can be moved fairly easily, text colors can be changed, almost everything can be displayed/hidden
 
This is very configurable, everything can be moved fairly easily, text colors can be changed, almost everything can be displayed/hidden
  
To configure, open <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid #000000;">/roster/index.php?rostercp-addon-siggen (SEO: roster/rostercp/addon/siggen.html)</code> in a web-browser
+
To configure, open <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid #000000;">/roster/index.php?rostercp-addon-siggen</code> (SEO: <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid #000000;">/roster/rostercp/addon/siggen.html</code>) in a web-browser
  
 
For members that haven't uploaded info, this will show limited information on a default background
 
For members that haven't uploaded info, this will show limited information on a default background
Line 33: Line 34:
 
All props to the original creator(s) of img.php
 
All props to the original creator(s) of img.php
  
<blockquote style="border:3px outset red; width:80%; padding:3px;">
+
{{Note|Ripped from the readme of img.php<br>Code written by Tony Fontaine, aka Reolus, tonyfontaine@knightraven.net http://www.gnomishmarinecorps.com<br>Inspired by the WoWSigCreator by Ashenfield ( ashenfield@gmail.com ) http://www.dizzarian.com}}
<code style="border:2px solid darkred;border-left:0px;border-top:0px;color:red;padding:2px;font-weight:bold;">Ripped from the readme of img.php</code><br>
+
Code written by Tony Fontaine, aka Reolus, tonyfontaine@knightraven.net http://www.gnomishmarinecorps.com<br>
+
Inspired by the WoWSigCreator by Ashenfield ( ashenfield@gmail.com ) http://www.dizzarian.com
+
</blockquote>
+
  
 
{| style="background:black;font-size:10px;font-weight:bold;border:2px outset #999999;" cellpadding="1" cellspacing="1"
 
{| style="background:black;font-size:10px;font-weight:bold;border:2px outset #999999;" cellpadding="1" cellspacing="1"
Line 82: Line 79:
  
 
==Requirements==
 
==Requirements==
<blockquote style="border:3px outset red;width:80%;padding:3px;">
+
WoWRoster v2.0.0 or higher<br>
WoWRoster.net Roster v2.0.0 or higher<br>
+
 
PHP 4.3.2 or better<br>
 
PHP 4.3.2 or better<br>
GD2 with PNG and Freetype Support<br>
+
GD2 with PNG and Freetype Support
<br>
+
 
 
Advanced functions in SigGen Config may not work if <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid black;">safe_mode</code> is turned <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">on</code> in your PHP config file<br>
 
Advanced functions in SigGen Config may not work if <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid black;">safe_mode</code> is turned <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">on</code> in your PHP config file<br>
 
<code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">SigGen</code> absolutely requires that your PHP installation supports the GD2 library, and that GD2 has <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">PNG Support</code> and <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">FreeType Support</code> turned on<br>
 
<code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">SigGen</code> absolutely requires that your PHP installation supports the GD2 library, and that GD2 has <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">PNG Support</code> and <code style="font-size:11px;color:white;padding:1px;background-color:#0066CC;border:1px solid black;">FreeType Support</code> turned on<br>
<strong>[[Roster:RosterDiag|RosterDiag]] MUST SAY</strong> <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">FreeType Support: yes</code> for you to use SigGen<br>
+
<strong>[[Roster:RosterDiag|RosterDiag]] MUST SAY</strong> <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">FreeType Support: yes</code> for you to use SigGen
<br>
+
 
<code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">FreeType Linkage: with freetype</code> is best although <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">with TTF</code> may work ok<br>
+
<code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">FreeType Linkage: with freetype</code> is best although <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">with TTF</code> may work ok
<br>
+
 
If you have trouble with the signature generator, first check [[Roster:RosterDiag|RosterDiag]] for information about how the GD2 library is configured (or not available) on your web server<br>
+
If you have trouble with the signature generator, first check [[Roster:RosterDiag|RosterDiag]] for information about how the GD2 library is configured (or not available) on your web server
<br>
+
 
 
If you DO NOT want SigGen, or if you cannot get GD2 to work on your server, you can un-install SigGen via [[Roster:CP|RosterCP]] -> [[Roster:CP#Addon_Management|Addon Management]], then delete the folder from the addons directory <code style="font-size:11px; color:black; padding:1px; background-color:#99FF99; border:1px solid black;">/addons/siggen/</code> and that will remove all traces of SigGen
 
If you DO NOT want SigGen, or if you cannot get GD2 to work on your server, you can un-install SigGen via [[Roster:CP|RosterCP]] -> [[Roster:CP#Addon_Management|Addon Management]], then delete the folder from the addons directory <code style="font-size:11px; color:black; padding:1px; background-color:#99FF99; border:1px solid black;">/addons/siggen/</code> and that will remove all traces of SigGen
</blockquote>
 
  
  
  
 
==File Structure==
 
==File Structure==
Here are the files as of '''v0.3.0''' and where they should be located -->
 
 
Here are the files and where they should be located -->
 
 
<div style="border:1px outset grey;margin-left:15px;width:500px;height:200px;font-size:10px;overflow:auto;">
 
<div style="border:1px outset grey;margin-left:15px;width:500px;height:200px;font-size:10px;overflow:auto;">
 
<pre>
 
<pre>
Line 170: Line 162:
  
 
==Usage==
 
==Usage==
Use sig.php for signatures, av.php for avatars<br>
+
After installing SigGen, you will find a SigGen button on the character panel that will preview the signature and avatar images for that character as well as provide dynamic link URLs for each.<br>
They are located in <code style="font-size:11px; color:black; padding:1px; background-color:#99FF99; border:1px solid black;">/addons/siggen/</code>
+
  
 
So if your roster URL is <nowiki>http://www.yoursite.com/roster/</nowiki>
 
So if your roster URL is <nowiki>http://www.yoursite.com/roster/</nowiki>
  
The files are at:<br>
+
Dynamic links:
Signature: <nowiki>http://www.yoursite.com/roster/addons/siggen/sig.php</nowiki><br>
+
* Signature: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-signature&member=Name</nowiki>
Avatar: <nowiki>http://www.yoursite.com/roster/addons/siggen/av.php</nowiki>
+
* Avatar: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-avatar&member=Name</nowiki>
  
 +
SEO - Friendly Links Mode:
 +
* Signature: <nowiki>http://www.yoursite.com/roster/util/siggen/signature/member=Name.png</nowiki>
 +
* Avatar: <nowiki>http://www.yoursite.com/roster/util/siggen/avatar/member=Name.png</nowiki>
  
To get the graphic for a character named "Bob", use:<br>
+
 
 +
To get the graphic for a character named "Bob", use:
 
* Signature:
 
* Signature:
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/sig.php?member=Bob</nowiki><br>
+
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-signature&member=Bob</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/signature/member=Bob.png</nowiki>
 
* Avatar:
 
* Avatar:
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/av.php?member=Bob</nowiki>
+
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-avatar&member=Bob</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/avatar/member=Bob.png</nowiki>
  
  
Alternatively, you can try to use these:<br>
+
Now suppose you host multiple guilds or characters across multiple realms and there are characters with the same name.<br>
*Signature:
+
You need to therefore be able to specify the realm in the URL to get the character of choice as follows:
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/sig.php/Bob.png</nowiki><br>
+
*Avatar:
+
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/av.php/Bob.png</nowiki>
+
  
 +
* Signature:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-signature&member=Name@Realm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/signature/member=Name@Realm.png</nowiki>
 +
* Avatar:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-avatar&member=Name@Realm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/avatar/member=Name@Realm.png</nowiki>
  
NOTE: This method for accessing SigGen does not work on all servers
+
 
 +
If you host multiple guilds on multiple realms in multiple regions and have characters/guilds/realms that have the same name.<br>
 +
Then you need to specify the region as well:
 +
 
 +
* Signature:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-signature&member=Name@RC-Realm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/signature/member=Name@RC-Realm.png</nowiki>
 +
* Avatar:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-avatar&member=Name@RC-Realm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/avatar/member=Name@RC-Realm.png</nowiki>
 +
 
 +
 
 +
For example:<br>
 +
To get the graphic for a character named "Bob" on the US realm called "MyRealm", use:
 +
* Signature:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-signature&member=Bob@US-MyRealm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/signature/member=Bob@US-MyRealm.png</nowiki>
 +
* Avatar:
 +
*: <nowiki>http://www.yoursite.com/roster/index.php?p=util-siggen-avatar&member=Bob@US-MyRealm</nowiki>
 +
*: SEO: <nowiki>http://www.yoursite.com/roster/util/siggen/avatar/member=Bob@RCUSMyRealm.png</nowiki>
 +
 
 +
 
 +
Alternatively, you can link directly to the generated image if you have chosen to save them on the server. The default file format is .png however this can be changed to .jpg or .gif.
 +
* Signature:
 +
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/sig/Bob@US-MyRealm.png</nowiki>
 +
* Avatar:
 +
*: <nowiki>http://www.yoursite.com/roster/addons/siggen/ava/Bob@US-MyRealm.png</nowiki>
  
  
 +
===mod_rewrite===
 
For another method, you can use mod_rewrite to re-write the path to the generator files
 
For another method, you can use mod_rewrite to re-write the path to the generator files
  
To use the this method, you must have an Apache server with mod_rewrite turned on
+
Allows you to use
 +
<pre>http://www.site.com/roster/MODE/Name@US-Realm.EXT</pre>
 +
Replace '''MODE''' with the config setting (IE. signature | avatar)<br>
 +
Replace '''Name@US-Realm''' with the character's name region and realm<br>
 +
Replace '''EXT''' with the extension (IE. png | gif | jpg)
  
.htaccess file (for Apache)<br>
+
To use the this method, you must have an Apache server with mod_rewrite turned on<br>
(Placed in the roster/ folder)
+
Or IIS users need an ISAPI filter
  
<ini>RewriteEngine on
+
This only allows for the signature and avatar SigGen config designs<br>
RewriteRule ^(sig|av)/(.*).png$ ./addons/siggen/$1.php?member=$2</ini>
+
If you added other designs, you have to add them in the mod rewrite file
 +
<pre>RewriteRule ^/?(signature|avatar|anotherconfig|more|purple)/(.*)</pre>
  
There is a way to mimic mod_rewrite on IIS using an ISAPI filter<br>
 
http://www.iismods.com/url-rewrite/index.htm<br>
 
You need admin access to your IIS installation<br>
 
I have not tested this, but I hear it does work
 
  
mod_rewrite.ini file (for IIS with URL Rewrite Filter for IIS)<br>
+
====Apache and htaccess====
(Placed in the roster/ folder)
+
Edit WoWRoster's .htaccess file
  
<ini>Debug 0
+
After
Reload 1000
+
<pre> # ENABLE ENGINE
RewriteRule ^(sig|av)/(.*).png$ ./addons/siggen/$1.php?member=$2</ini>
+
RewriteEngine On</pre>
  
With the power of mod_rewrite you can access your images at:<br>
+
Add
Signature: <nowiki>http://www.yoursite.com/roster/sig/Charactername.png</nowiki><br>
+
<pre> # SIGEN REWRITE
Avatar: <nowiki>http://www.yoursite.com/roster/av/Charactername.png</nowiki>
+
RewriteRule ^/?(signature|avatar)/(.*)\.(.*)$ /index.php?p=util-siggen-$1&member=$2&format=$3</pre>
  
[[Image:Addon_siggen_sig-ex.png|frame|left|Signature Example]]
+
So the entire file looks something like this
[[Image:Addon_siggen_ava-ex.png|frame|left|Avatar Example]]
+
<pre># WoWRoster .htaccess file
<br clear="all" />
+
# $Id: .htaccess 1254 2007-08-19 16:41:28Z Zanix $
  
==Setup==
+
# ONLY IF MOD_REWRITE IS INSTALLED
Now that you are sure that GD2 works properly on your server, here is how to get <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">SigGen</code> working
+
<IfModule mod_rewrite.c>
 +
# ENABLE ENGINE
 +
RewriteEngine On
  
Before you even start trying to access the signatures/avatars, you need to run the configuration page at
+
# SIGEN REWRITE
http://www.yoursite.com/roster/addon.php?roster_addon_name=siggen
+
RewriteRule ^/?(signature|avatar)/(.*)\.(.*)$ /index.php?p=util-siggen-$1&member=$2&format=$3
  
 +
# CONIDITIONS
 +
RewriteCond %{REQUEST_FILENAME} -f [OR]
 +
RewriteCond %{REQUEST_FILENAME} -d
  
 +
# REWRITE RULES
 +
RewriteRule ^(.+) - [PT,L]
 +
RewriteRule ^(.*) index.php
 +
</IfModule></pre>
  
===Log-in to SigGen Config===
 
First you will need to Log-In to SigGen config
 
  
Fill in the password box<br>
+
====IIS and url-rewrite ISAPI filter====
This is the same password that you use to log-in to Roster Config<br>
+
There is a way to mimic mod_rewrite on IIS using an ISAPI filter
This config page uses cookies so you don't have to log-in everytime you re-visit this page
+
  
[[Image:Addon_siggen_login.png|center|frame|Log-In]]
+
One of these may work
 +
* http://www.isapirewrite.com
 +
* http://www.qwerksoft.com/products/iisrewrite
 +
* http://www.opcode.co.uk/components/rewrite.asp
 +
You may need admin access to your IIS installation<br>
 +
I have not tested this, but I hear it does work
  
 +
The original ISAPI filter I found some time ago has disappeared from the internet, so I have no clue how to configure these products.
  
  
===Install===
 
This will set up the database tables and will give you great control over the look and feel of your signatures
 
  
Hit the big <code style="font-size:11px;color:white;padding:1px;background-color:#333333;border:1px outset #CC9900;">Install</code> button
+
==Setup==
 +
Now that you are sure that GD2 works properly on your server, here is how to get <code style="font-size:11px; color:white; padding:1px; background-color:#0066CC; border:1px solid black;">SigGen</code> working
  
The next screen should show the following<br>
+
Before you even start trying to access the signatures/avatars, you need to run the configuration page in RosterCP
Just follow the directions
+
  
[[Image:Addon_siggen_install.png|left|frame|Install SigGen]]
 
[[Image:Addon_siggen_installfinish.png|left|frame|Finish Install]]
 
<br clear="all" />
 
[[Image:Addon_siggen_upgrade.png|right|frame|Upgrade SigGen]]
 
  
 +
===Log into SigGen Config===
 +
First you will need to get to SigGen config
 +
 +
Go to RosterCP, then click SigGen from the Addon Config menu<br>
 +
Or go to <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid #000000;">/roster/index.php?rostercp-addon-siggen</code> (SEO: <code style="font-size:11px;color:black;padding:1px;background-color:#99FF99;border:1px solid #000000;">roster/rostercp/addon/siggen.html</code>)
  
  
===Upgrade===
 
This mode appears only when the following are true
 
* You already have the `roster_addon_siggen` table in the database
 
* You have copied the new version over an old one
 
* When the database has changed in the new version
 
If the database has not changed, the upgrade options will not appear
 
  
You have two options
+
===Install / Upgrade / Un-Install===
* '''Upgrade with reset'''
+
Use RosterCP->Addon Management to install, upgrade, or un-install SigGen
** This is the BEST option
+
*: This will upgrade the data tables and reset everything to defaults
+
* '''Upgrade without reset'''
+
** This option is not supported
+
*: And yes, I can tell if you choose this option
+
** Use this only if you are comfortable with editing the database manually as you may have to do so
+
  
  
  
 
==SigGen Settings==
 
==SigGen Settings==
<blockquote style="border:3px outset red; width:80%; padding:3px;">
+
{{Note|A lot of the settings on the SigConfig page have tooltips breifly describing what each function does<br>It is a VERY good idea to click Save Settings after you are done on each page, but it is not required<br>Note: Some settings will automatically "click" the Save Settings button.}}
<code style="border:2px solid darkred;border-left:0px;border-top:0px;color:red;padding:2px;font-weight:bold;">Important Note</code><br>
+
Alot of the settings on the SigConfig page have tooltips breifly describing what each function does<br>
+
It's a VERY good idea to click <code style="font-size:11px;color:white;padding:1px;background-color:#333333;border:1px outset #CC9900;">Save Settings</code> after you are done on each page, but it is not required<br>
+
Note: Some settings will automatically "click" the <code style="font-size:11px;color:white;padding:1px;background-color:#333333;border:1px outset #CC9900;">Save Settings</code> button
+
</blockquote>
+
  
  
Line 359: Line 381:
  
 
===Import / Export Settings===
 
===Import / Export Settings===
New in SigGen 0.2.0, you can export and import your SigGen settings for backup or sharing with others
+
You can export and import your SigGen settings for backup or sharing with others
 
====Export====
 
====Export====
 
When exporting, SigGen will only export that config mode<br>
 
When exporting, SigGen will only export that config mode<br>
Line 370: Line 392:
 
Where configname is the name of the config mode you are currently in
 
Where configname is the name of the config mode you are currently in
  
SigGen will also deny importing of older and newer setting files<br>
+
SigGen will also deny importing of newer DB version setting files<br>
So if you saved from SigGen 0.2.0 (which is DBver 1.2) you cannot upload to a newer version if the DBver has changed
+
So if you saved from SigGen 0.2.5 (which is DB version 1.3) you cannot upload a saved config from this version to 0.2.0, which is DB version 1.2
  
For example, if you have SigGen 0.2.5 and the db version changed to 1.3, then you could not load settings from a DBver lower than 1.3<br>
+
Starting with SigGen 0.3.0, SigGen will accept a settings file with an older DB version
Consequently, you could not import data saved from SigGen with DBver 1.3 to SigGen with DBver 1.2
+
  
  
  
 
===Image Packs===
 
===Image Packs===
New for SigGen 0.2.0, you can now use image packs<br>
 
 
Image packs have a limited "themeing" ability in that you can specify code to handle how images are selected
 
Image packs have a limited "themeing" ability in that you can specify code to handle how images are selected
  
Line 495: Line 515:
  
 
===siggen.php Direct Access and URL Switches===
 
===siggen.php Direct Access and URL Switches===
These are the arguments siggen.php will accept (applicable to sig.php, and av.php as well)
+
These are the URL arguments SigGen will accept
*( member=<span style="color:blue;">string</span> ) The name for the script to retrieve and display
+
* ( member=<span style="color:blue;">string</span> ) The name for the script to retrieve and display
*( mode=<span style="color:blue;">string</span> ) What config setting to get from the db ( current options: 'signature' | 'avatar' )
+
* ( mode=<span style="color:blue;">string</span> ) What config setting to get from the db ( default options: 'signature' | 'avatar' )
*( saveonly=[ <span style="color:green;">1</span> | <span style="color:red;">0</span> ] ) Turns on/off "Save Only Mode"
+
* ( saveonly=[ <span style="color:green;">1</span> | <span style="color:red;">0</span> ] ) Turns on/off "Save Only Mode"
*( etag=[ <span style="color:green;">1</span> | <span style="color:red;">0</span> ] ) Turns on/off "eTag" caching
+
* ( etag=[ <span style="color:green;">1</span> | <span style="color:red;">0</span> ] ) Turns on/off "eTag" caching
*( format=<span style="color:blue;">string</span> ) Sets image output format ( current options: 'png' | 'jpg' | 'gif' )
+
* ( format=<span style="color:blue;">string</span> ) Sets image output format ( current options: 'png' | 'jpg' | 'gif' )
  
  
Line 514: Line 534:
 
# Open your screenshot in your favorite image editor
 
# Open your screenshot in your favorite image editor
 
# Edit out the background (make it transparent) and resize to fit inside the signature
 
# Edit out the background (make it transparent) and resize to fit inside the signature
#: (With SigGen default settings, a good size is h-85px w-120px)
+
#: (With SigGen default settings, a good size is h-120px w-120px)
# Save it as .png, .gif, or .jpg format (24-bit .png with transparency is best and recommended)
+
# Save it as .png, .gif, or .jpg format (24-bit .png with alpha transparency is best and recommended)
 
* Backgrounds MUST be saved as .png or .jpg, .gif is not allowed
 
* Backgrounds MUST be saved as .png or .jpg, .gif is not allowed
  
 
=====Uploading to SigGen Config=====
 
=====Uploading to SigGen Config=====
The images you upload can be in .png, .gif, or .jpg format (24-bit .png with transparency is best and recommended)
+
The images you upload can be in .png, .gif, or .jpg format (24-bit .png with alpha transparency is best and recommended)
*Pick the name you want to upload for from the pull down list
+
* Pick the name you want to upload for from the pull down list
*Pick what image type you wish to upload ( Character Image | Background Image )
+
* Pick what image type you wish to upload ( Character Image | Background Image )
*Browse to the image you wish to upload
+
* Browse to the image you wish to upload
*Hit upload, SigGen Config will tell you if it was successful or not
+
* Hit upload, SigGen Config will tell you if it was successful or not
  
  
Line 529: Line 549:
 
====Delete Member Images====
 
====Delete Member Images====
 
This box will let you delete any currently uploaded images
 
This box will let you delete any currently uploaded images
*Pick the file you want to delete from the pull down list
+
* Pick the file you want to delete from the pull down list
*Hit delete, SigGen Config will tell you if it was successful or not
+
* Hit delete, SigGen Config will tell you if it was successful or not
  
  
Line 538: Line 558:
 
This is how "Save Image Mode" works
 
This is how "Save Image Mode" works
  
When activated, every visit to siggen.php, sig.php, or av.php, when a name is specified, will generate the image and save it to the server as a static image
+
When activated, every visit to SigGen when a name is specified, will generate the image and save it to the server as a static image
  
 
This mode is generally used in conjunction with the "Addon Update Trigger"
 
This mode is generally used in conjunction with the "Addon Update Trigger"
Line 552: Line 572:
 
* '''Convert Accents'''
 
* '''Convert Accents'''
 
** This will convert accented characters in a player's name to non accented characters when saving images
 
** This will convert accented characters in a player's name to non accented characters when saving images
 +
** See the next section below for the Accent Mapping SigGen uses
 
** <span style="color:red;">WARNING:</span> Any characters with similar looking accents can and will be overwritten
 
** <span style="color:red;">WARNING:</span> Any characters with similar looking accents can and will be overwritten
 +
** See [[#Accent_Mapping|Accent Mapping]] below for information.
 
* '''Saved images directory'''
 
* '''Saved images directory'''
 
** This is the directory that SigGen will write the generated images to
 
** This is the directory that SigGen will write the generated images to
 
** The directory specified here will be a full qualified path on your webserver
 
** The directory specified here will be a full qualified path on your webserver
 
*** There is some help with this pathing
 
*** There is some help with this pathing
***: Use %s% to specify the SigGen directory (%s% may equal /home/webuser/public_html/roster/addons/siggen/)
+
***: Use %s to specify the SigGen directory (%s may equal /home/webuser/public_html/roster/addons/siggen/)
***: Use %r% to specify the Roster directory (%r% may equal /home/webuser/public_html/roster/)
+
***: Use %r to specify the Roster directory (%r may equal /home/webuser/public_html/roster/)
 
** If you change this directory, SigGen Config will try to create the new directory, but it will not move any images that are in the old directory to the new one, nor will it delete them
 
** If you change this directory, SigGen Config will try to create the new directory, but it will not move any images that are in the old directory to the new one, nor will it delete them
 
** Default Directories
 
** Default Directories
*** Signatures: %s%sig/
+
*** Signatures: %ssig/
*** Avatars: %s%ava/
+
*** Avatars: %sava/
 
* '''Saved images format'''
 
* '''Saved images format'''
 
** The format in which SigGen will sve the image to the server
 
** The format in which SigGen will sve the image to the server
Line 570: Line 592:
 
** Example
 
** Example
 
*** The character's name is "Billybobjo"
 
*** The character's name is "Billybobjo"
 +
*** The character's region is "US"
 +
*** The characters realm is "MyRealm"
 
*** Saved image format is "jpeg"
 
*** Saved image format is "jpeg"
 
*** Prefix is set to "prefix-"
 
*** Prefix is set to "prefix-"
 
*** Suffix is set to "-suffix"
 
*** Suffix is set to "-suffix"
*** The saved image on the server will be "prefix-Billybobjo-suffix.jpg"
+
*** The saved image on the server will be "prefix-Billybobjo@US-MyRealm-suffix.jpg"
 
* '''UniUploader Fix'''
 
* '''UniUploader Fix'''
 
** Enable UniUploader save images workaround
 
** Enable UniUploader save images workaround
Line 718: Line 742:
 
====Guild Update====
 
====Guild Update====
 
This "auto-save mode" can also run during a guild update, which generates an image for every guild memeber
 
This "auto-save mode" can also run during a guild update, which generates an image for every guild memeber
 
  
 
To activate, turn on "Auto-save images on guild update" on the Main Settings page
 
To activate, turn on "Auto-save images on guild update" on the Main Settings page
  
<blockquote style="border:3px outset red; width:60%; padding:3px;">
+
{{Note|You must also enable "Addon Update Triggers" in RosterCP->Configure Main Roster to activate this mode}}
<code style="border:2px solid darkred;border-left:0px;border-top:0px;color:red;padding:2px;font-weight:bold;">Important Note</code><br>
+
{{Warning|WARNING|This can take a very long time.<br>Expect to wait up to '''10''' minutes, maybe even '''longer''' for larger amounts of characters when this is activated}}
You must also check the "Run Update Triggers" on update.php to activate this mode<br>
+
 
<br>
+
<span style="color:red;">WARNING:</span> This can take a very long time.<br>
+
Expect to wait up to '''10''' minutes, maybe even '''longer''' when this is activated<br>
+
<br>
+
 
An image is generated and placed on the update page for every member in the guild<br>
 
An image is generated and placed on the update page for every member in the guild<br>
 
Please wait for the page to fully finish downloading all the images to have all of them saved correctly
 
Please wait for the page to fully finish downloading all the images to have all of them saved correctly
</blockquote>
 
  
  
Line 760: Line 778:
 
===General FAQ===
 
===General FAQ===
 
[[Image:Addon_siggen_reset.png|right|frame|Reset to Defaults]]
 
[[Image:Addon_siggen_reset.png|right|frame|Reset to Defaults]]
*Reset to the default settings
+
* Reset to the default settings
**Check the box and hit Default Settings to reset to defaults
+
** Check the box and hit Default Settings to reset to defaults
  
 
[[Category:RosterAddon]]
 
[[Category:RosterAddon]]

Latest revision as of 01:35, 28 June 2011

WR.net

Important note: When you edit this page, you agree to release your contribution into the public domain.
If you do not want this or can not do this because of license restrictions, please do not edit.

Contents


Intro and Info

Signature/Avatar Generator AddOn for Roster

Download -> http://www.wowroster.net/downloads/?id=20
Support -> http://www.wowroster.net/forum38.html

Current version: 0.3.2.409
Documentation is for v0.3.0 and higher
Updated: 01:35, 28 June 2011 (UTC)
Author: Zanix

This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. So if it blows up your server it's not my fault
These signatures/avatars can be used for web forums, they will show a character's level, membership, rank, trade skill levels, and other such information.

The information in these signature graphics will be as up to date as the information in roster.
This is very configurable, everything can be moved fairly easily, text colors can be changed, almost everything can be displayed/hidden

To configure, open /roster/index.php?rostercp-addon-siggen (SEO: /roster/rostercp/addon/siggen.html) in a web-browser

For members that haven't uploaded info, this will show limited information on a default background


Change Log

> SigGen Change Log


Thanks

All props to the original creator(s) of img.php

Info.png Note: Ripped from the readme of img.php
Code written by Tony Fontaine, aka Reolus, tonyfontaine@knightraven.net http://www.gnomishmarinecorps.com
Inspired by the WoWSigCreator by Ashenfield ( ashenfield@gmail.com ) http://www.dizzarian.com
Special Thanks To:
rubricsinger For his eXP bar and therefore making want to improve on img.php
zeth_russ Etag cacheing (lovin' the reduced server load!)
RossiRat Ideas on showing debug/error info
Getting the full path for fonts, directories
Shadow fonts
Saving images to a directory on the server
BlackCat83 For the original "avatar.php" using my code from "sig.php"
Jessy For making "av.php" just plug into "sig.php" - Very nice
Matt Miller Code from UniAdmin. Without it I couldn't of made the config page
Ahrtvuailla For help with re-designing the sigconfig page, and a way to delete uploaded images
Suirion For the great race-gender-class images, thanks!
nekromant esES localization
Harut frFR localization
ulminia Talent Spec Code

To everyone else that I haven't mentioned
And all those that have tested the previous versions; sig1.5 : sig2.0 : sig2.0-gamma : etc...


Requirements

WoWRoster v2.0.0 or higher
PHP 4.3.2 or better
GD2 with PNG and Freetype Support

Advanced functions in SigGen Config may not work if safe_mode is turned on in your PHP config file
SigGen absolutely requires that your PHP installation supports the GD2 library, and that GD2 has PNG Support and FreeType Support turned on
RosterDiag MUST SAY FreeType Support: yes for you to use SigGen

FreeType Linkage: with freetype is best although with TTF may work ok

If you have trouble with the signature generator, first check RosterDiag for information about how the GD2 library is configured (or not available) on your web server

If you DO NOT want SigGen, or if you cannot get GD2 to work on your server, you can un-install SigGen via RosterCP -> Addon Management, then delete the folder from the addons directory /addons/siggen/ and that will remove all traces of SigGen


File Structure

siggen/
 |_admin/
 |  |_index.php
 |_ava/ (default saved avatar folder)
 |_char/
 |  |_index.php
 |_img/
 |  |_background/
 |  |  |_defaultava/
 |  |  |  |_(*).png
 |  |  |_defaultsig/
 |  |  |  |_(*).png
 |  |  |_(Other Image Packs)/
 |  |_border/
 |  |  |_(*).png
 |  |_character/
 |  |  |_default/
 |  |  |  |_(*).png
 |  |  |_start/
 |  |  |  |_(*).png
 |  |  |_(Other Image Packs)/
 |  |  |  |_(*).png
 |  |_class/
 |  |  |_rounded/
 |  |  |  |_(*).png
 |  |  |_square/
 |  |  |  |_(*).png
 |  |  |_(Other Image Packs)/
 |  |  |  |_(*).png
 |  |_frame/
 |  |  |_(*).png
 |  |_level/
 |  |  |_(*).png
 |  |_members/ (default location for uploaded per-character images)
 |  |_pvp/
 |  |  |_default/
 |  |  |  |_(*).png
 |  |  |_(Other Image Packs)/
 |  |  |  |_(*).png
 |_inc/
 |  |_conf.php
 |  |_functions.inc
 |  |_install.def..php
 |  |_sql.inc
 |  |_update_hook.php (auto-save character image trigger file)
 |_locale/
 |  |_deDE.php
 |  |_enUS.php
 |  |_esES.php
 |  |_frFR.php
 |_sig/ (default saved signature folder)
 |_templates/
 |  |_(*).tpl
 |_changelog.txt
 |_index.php
 |_license.txt
 |_siggen.php (siggen generator code)
 |_style.css


Usage

After installing SigGen, you will find a SigGen button on the character panel that will preview the signature and avatar images for that character as well as provide dynamic link URLs for each.

So if your roster URL is http://www.yoursite.com/roster/

Dynamic links:

SEO - Friendly Links Mode:


To get the graphic for a character named "Bob", use:


Now suppose you host multiple guilds or characters across multiple realms and there are characters with the same name.
You need to therefore be able to specify the realm in the URL to get the character of choice as follows:


If you host multiple guilds on multiple realms in multiple regions and have characters/guilds/realms that have the same name.
Then you need to specify the region as well:


For example:
To get the graphic for a character named "Bob" on the US realm called "MyRealm", use:


Alternatively, you can link directly to the generated image if you have chosen to save them on the server. The default file format is .png however this can be changed to .jpg or .gif.


mod_rewrite

For another method, you can use mod_rewrite to re-write the path to the generator files

Allows you to use

http://www.site.com/roster/MODE/Name@US-Realm.EXT

Replace MODE with the config setting (IE. signature | avatar)
Replace Name@US-Realm with the character's name region and realm
Replace EXT with the extension (IE. png | gif | jpg)

To use the this method, you must have an Apache server with mod_rewrite turned on
Or IIS users need an ISAPI filter

This only allows for the signature and avatar SigGen config designs
If you added other designs, you have to add them in the mod rewrite file

RewriteRule ^/?(signature|avatar|anotherconfig|more|purple)/(.*)


Apache and htaccess

Edit WoWRoster's .htaccess file

After

	# ENABLE ENGINE
	RewriteEngine On

Add

	# SIGEN REWRITE
	RewriteRule ^/?(signature|avatar)/(.*)\.(.*)$ /index.php?p=util-siggen-$1&member=$2&format=$3

So the entire file looks something like this

# WoWRoster .htaccess file
# $Id: .htaccess 1254 2007-08-19 16:41:28Z Zanix $

# ONLY IF MOD_REWRITE IS INSTALLED
<IfModule mod_rewrite.c>
	# ENABLE ENGINE
	RewriteEngine On

	# SIGEN REWRITE
	RewriteRule ^/?(signature|avatar)/(.*)\.(.*)$ /index.php?p=util-siggen-$1&member=$2&format=$3

	# CONIDITIONS
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d

	# REWRITE RULES
	RewriteRule ^(.+) - [PT,L]
	RewriteRule ^(.*) index.php
</IfModule>


IIS and url-rewrite ISAPI filter

There is a way to mimic mod_rewrite on IIS using an ISAPI filter

One of these may work

You may need admin access to your IIS installation
I have not tested this, but I hear it does work

The original ISAPI filter I found some time ago has disappeared from the internet, so I have no clue how to configure these products.


Setup

Now that you are sure that GD2 works properly on your server, here is how to get SigGen working

Before you even start trying to access the signatures/avatars, you need to run the configuration page in RosterCP


Log into SigGen Config

First you will need to get to SigGen config

Go to RosterCP, then click SigGen from the Addon Config menu
Or go to /roster/index.php?rostercp-addon-siggen (SEO: roster/rostercp/addon/siggen.html)


Install / Upgrade / Un-Install

Use RosterCP->Addon Management to install, upgrade, or un-install SigGen


SigGen Settings

Info.png Note: A lot of the settings on the SigConfig page have tooltips breifly describing what each function does
It is a VERY good idea to click Save Settings after you are done on each page, but it is not required
Note: Some settings will automatically "click" the Save Settings button.


Advanced SigGen Options

The fine art of text placement

There are many options for adjusting the placement of the text within the image Here is a guide on how SigGen calculates where to draw the text


Alignment Horiz point Width of text Starts drawing Ends drawing
Left 200 50 200 250
0 30 0 30
395 10 395 405
Center 200 50 175 225
0 30 -15 15
350 10 345 355
Right 200 50 150 200
0 30 -30 0
350 10 340 350


Import / Export Settings

You can export and import your SigGen settings for backup or sharing with others

Export

When exporting, SigGen will only export that config mode
So if you are in Signature config mode, hitting Export will save the config settings for Signatures
The file saved will be siggen_signature.txt

Import

When importing, SigGen will only accept text files name like this

siggen_configname.txt

Where configname is the name of the config mode you are currently in

SigGen will also deny importing of newer DB version setting files
So if you saved from SigGen 0.2.5 (which is DB version 1.3) you cannot upload a saved config from this version to 0.2.0, which is DB version 1.2

Starting with SigGen 0.3.0, SigGen will accept a settings file with an older DB version


Image Packs

Image packs have a limited "themeing" ability in that you can specify code to handle how images are selected

Image packs are structured like so

  • img/
    • background/
      • pack1/
        • (image files)
      • pack2/
        • (image files)
    • character/
      • pack1/
        • char.inc
        • (image files)
      • pack2/
        • char.inc
        • (image files)
    • class/
      • pack1/
        • ext.inc
        • (image files)
      • pack2/
        • ext.inc
        • (image files)
    • pvp/
      • pack1/
        • ext.inc
        • (image files)
      • pack2/
        • ext.inc
        • (image files)
    • frame
      • (image files)
    • level
      • (image files)

Background image packs do not have a config file, there is no need for one since the Web config is already there


Class and PvP image packs have a file called ext.inc
In this file, you specify the image extension tha will be used, either .png, .gif, or .jpg/.jpeg


Character image packs have a file called char.inc
Now this is where is gets interesting
(Some future version of SigGen will have a web config for this part, but not right now)


The char.inc file allows you to make an if statement to tell siggen.php how to pick a character image

If you do not include this file with a pack, then the default code will pick an image like this if character has race and gender, get race-gender.png

$char_ext = '.png';
if( !empty($sig_race) )
{
	// Set race-gender based image
	if( !empty($sig_gender) )
	{
		// Set race-gender based image
		$im_user_file = $configData['image_dir'].$configData['char_dir'].$sig_race.'-'.$sig_gender.$char_ext;
	}
	// Set race only image
	else
	{
		$im_user_file = $configData['image_dir'].$configData['char_dir'].$sig_race.$char_ext;
	}
 
}	// Set default character image
else
{
	$im_user_file = $configData['image_dir'].$configData['char_dir'].$configData['charlogo_default_image'];
}

Image packs like the teir3 pack pick an image based on race-gender-class.png

<?php
 
if ( !defined('ROSTER_INSTALLED') )
{
    exit('Detected invalid access to this file!');
}
 
$char_ext = '.png';
 
if( !empty($sig_race) )
{
	// Set race-gender based image
	if( !empty($sig_gender) )
	{
		// Set race-gender-class based image
		if( !empty($sig_class) )
		{
			$im_user_file = $configData['image_dir'] . $configData['char_dir'] . $sig_race . '-' . $sig_gender . '-'
					. strtolower(getEnglishValue($sig_class,$sig_char_locale)) . $char_ext;
		}
		else
		{
			$im_user_file = $configData['image_dir'] . $configData['char_dir'] . $sig_race . '-' . $sig_gender . $char_ext;
		}
	}
	// Set race only image
	else
	{
		$im_user_file = $configData['image_dir'].$configData['char_dir'].$sig_race.$char_ext;
	}
 
}	// Set default character image
else
{
	$im_user_file = $configData['image_dir'].$configData['char_dir'].$configData['charlogo_default_image'];
}


siggen.php Direct Access and URL Switches

These are the URL arguments SigGen will accept


Custom Member Images

File:Addon siggen member-up-del.png
Custom Member Image Control

Upload

You can set custom images for each character for SigGen, and you can set a custom background as well

Getting images of characters
  1. Take a screenshot of your character in WoW
    Or even better, use WoW Model Viewer - http://www.wowmodelviewer.org
  2. Open your screenshot in your favorite image editor
  3. Edit out the background (make it transparent) and resize to fit inside the signature
    (With SigGen default settings, a good size is h-120px w-120px)
  4. Save it as .png, .gif, or .jpg format (24-bit .png with alpha transparency is best and recommended)
Uploading to SigGen Config

The images you upload can be in .png, .gif, or .jpg format (24-bit .png with alpha transparency is best and recommended)


Delete Member Images

This box will let you delete any currently uploaded images


Save Image Mode

File:Addon siggen savemode.png
SigGen Save Image Mode

This is how "Save Image Mode" works

When activated, every visit to SigGen when a name is specified, will generate the image and save it to the server as a static image

This mode is generally used in conjunction with the "Addon Update Trigger"


Accent Mapping

Accent Mapping
Accent À Á Â Ã Ä Å à á â ã ä å Ò Ó Ô Õ Ö Ø ò ó ô õ ö ø È É Ê Ë è é ê ë Ç ç Ì Í Î Ï ì í î ï Ù Ú Û Ü ù ú û ü ÿ Ñ ñ
Conversion A A A A A A a a a a a a O O O O O O o o o o o o E E E E e e e e C c I I I I i i i i U U U U u u u u y N n


Auto-Save Images

File:Addon siggen autosave.png
Auto-Save on Character Update
File:Addon siggen autosave-guild.png
Auto-Save on Guild Update


Character Update

Auto-Save images for signatures and avatars

Combining the powers of "Save Image Mode" and "Addon Update Triggers", images can be automaticaly generated and saved on the server everytime update.php is ran


Turning these on will generate and save an image to the server's disk when a player updates their data
Only turn these on after you have configured the signatures

The "Saved Images Directory" has to exist for this to work

To activate, turn on "Auto-save image on character update" on the Main Settings page


Guild Update

This "auto-save mode" can also run during a guild update, which generates an image for every guild memeber

To activate, turn on "Auto-save images on guild update" on the Main Settings page

Info.png Note: You must also enable "Addon Update Triggers" in RosterCP->Configure Main Roster to activate this mode
Warning.png WARNING: This can take a very long time.
Expect to wait up to 10 minutes, maybe even longer for larger amounts of characters when this is activated

An image is generated and placed on the update page for every member in the guild
Please wait for the page to fully finish downloading all the images to have all of them saved correctly


FAQ/Troubleshooting

File:Addon siggen backgdisabled.png
Background Config Disabled

Known bugs/weirdness




General FAQ

File:Addon siggen reset.png
Reset to Defaults
Personal tools
Namespaces
Variants
Actions
WoWRoster
Navigation
Toolbox