| Important note: When you edit this page, you agree to release your contribution into the public domain. If you don't want this or can't do this because of license restrictions, please don't edit. |
| Languages: |
English |
Contents
|
Signature/Avatar Generator AddOn for Roster
Download -> http://www.wowroster.net/Downloads/details/id=20.html
Support -> http://www.wowroster.net/Forums/viewforum/f=38.html
Current version: 0.3.2.409
Documentation is for 0.3.0 and higher
Updated: 01:26, 18 November 2008 (CST)
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
All props to the original creator(s) of img.php
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
| 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...
WoWRoster.net Roster 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 ifsafe_modeis turnedonin your PHP config file
SigGenabsolutely requires that your PHP installation supports the GD2 library, and that GD2 hasPNG SupportandFreeType Supportturned on
RosterDiag MUST SAYFreeType Support: yesfor you to use SigGen
FreeType Linkage: with freetypeis best althoughwith TTFmay 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
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 -->
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
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.
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)/(.*)
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 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>
There is a way to mimic mod_rewrite on IIS using an ISAPI filter
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
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
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
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)
Use RosterCP->Addon Management to install, upgrade, or un-install SigGen
Important Note
Alot of the settings on the SigConfig page have tooltips breifly describing what each function does
It's a VERY good idea to clickSave Settingsafter you are done on each page, but it is not required
Note: Some settings will automatically "click" theSave Settingsbutton
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 |
You can export and import your SigGen settings for backup or sharing with others
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
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 have a limited "themeing" ability in that you can specify code to handle how images are selected
Image packs are structured like so
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']; }
These are the URL arguments SigGen will accept
You can set custom images for each character for SigGen, and you can set a custom background as well
The images you upload can be in .png, .gif, or .jpg format (24-bit .png with alpha transparency is best and recommended)
This box will let you delete any currently uploaded images
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 | À | Á | Â | Ã | Ä | Å | à | á | â | ã | ä | å | Ò | Ó | Ô | Õ | Ö | Ø | ò | ó | ô | õ | ö | ø | È | É | Ê | Ë | è | é | ê | ë | Ç | ç | Ì | Í | Î | Ï | ì | í | î | ï | Ù | Ú | Û | Ü | ù | ú | û | ü | ÿ | Ñ | ñ |
| 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 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
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
Important Note
You must also enable "Addon Update Triggers" in RosterCP->Configure Main Roster to activate this mode
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