Incorrect URL when Saved Image Setting is selected

A signature and avatar generator addon

Moderator: zanix

Incorrect URL when Saved Image Setting is selected

Postby Lightfeather » Thu Jan 18, 2007 7:25 pm

To help my bandwidth issue I have selected these settings in siggen:

Save images to server: Yes
Suppress Image Output: Yes
Saved images directory: saved/
Saved images format: jpeg
Saved Images Suffix: av and sig respectivly
Auto-save image on character update: Yes
Auto-save images on guild update: No
UniUploader Fix: Yes

In Roster I enabled the signature and avatar to be viewable on the Character page, however, when someone mouses over the signature or avatar, they are instructed to use this url:

http://www.mywebsiteurl.com/roster/addo ... ractername

and

http://www.mywebsiteurl.com/roster/addo ... ractername

Though because I have images supressed in an attempt to save bandwidth, if people use that url to link to their signatures or avatars it displays a broken link.

The correct address would be:

http://www.mywebsiteurl.com/roster/addo ... amesig.jpg

and

http://www.mywebsiteurl.com/roster/addo ... nameav.jpg

What file can I edit so the mouseover tips give the correct information to my users? I've had to tell people that the link in the mouseover is not the correct one to use. And to use the saved jpg link that I posted in a thread on my forum.

Is there a way to make it so that when image output is supressed and saved images is turned on, that the mouseover will display the correct link?

I had to turn off the images on the character pages due to the confusion it's caused but I'd like to re-enable them.
Last edited by Lightfeather on Thu Jan 18, 2007 7:37 pm, edited 4 times in total.
Image
User avatar
Lightfeather
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Aug 17, 2006 7:29 am

Incorrect URL when Saved Image Setting is selected

Postby Lightfeather » Thu Jan 18, 2007 10:48 pm

I fixed it. In memberdetails.php (in the roster directory) I changed this code:

Code: Select all
if($roster_conf['show_signature'])
   print "<img onmouseover=\"return overlib('To access this signature use: ".$roster_conf['roster_dir']."/addons/siggen/sig.php?name=".urlencode(utf8_decode($name))."',CAPTION,'Signature Access',RIGHT);\" onmouseout=\"return nd();\" ".
      "src=\"".$roster_conf['roster_dir']."/addons/siggen/sig.php?name=".urlencode(utf8_decode($name))."&amp;saveonly=0\" alt=\"Signature Image for $name\" /> \n";

if($roster_conf['show_avatar'])
   print "<img onmouseover=\"return overlib('To access this avatar use: ".$roster_conf['roster_dir']."/addons/siggen/av.php?name=".urlencode(utf8_decode($name))."',CAPTION,'Avatar Access');\" onmouseout=\"return nd();\" ".
      "src=\"".$roster_conf['roster_dir']."/addons/siggen/av.php?name=".urlencode(utf8_decode($name))."&amp;saveonly=0\" alt=\"Avatar Image for $name\" />\n";


to this code:

Code: Select all
if($roster_conf['show_signature'])
   print "<img onmouseover=\"return overlib('To access this signature use: ".$roster_conf['roster_dir']."/addons/siggen/saved/".urlencode(utf8_decode($name))."sig.jpg',CAPTION,'Signature Access',RIGHT);\" onmouseout=\"return nd();\" ".
      "src=\"".$roster_conf['roster_dir']."/addons/siggen/saved/".urlencode(utf8_decode($name))."sig.jpg\" alt=\"Signature Image for $name\" /> \n";

if($roster_conf['show_avatar'])
   print "<img onmouseover=\"return overlib('To access this avatar use: ".$roster_conf['roster_dir']."/addons/siggen/saved/".urlencode(utf8_decode($name))."av.jpg',CAPTION,'Avatar Access');\" onmouseout=\"return nd();\" ".
      "src=\"".$roster_conf['roster_dir']."/addons/siggen/saved/".urlencode(utf8_decode($name))."av.jpg\" alt=\"Avatar Image for $name\" />\n";


It's a hardcoded change set to my particular save directory because I don't know enough to tell it to fetch the selected save directory from the database. =/
Last edited by Lightfeather on Thu Jan 18, 2007 10:49 pm, edited 1 time in total.
Image
User avatar
Lightfeather
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Aug 17, 2006 7:29 am

Incorrect URL when Saved Image Setting is selected

Postby zanix » Thu Jan 18, 2007 11:18 pm

The code in memberdetails.php is a leftover from the original signature generator img.php
(which is still included with Roster, I keep it updated for historical reasons, it works just fine by the way :) )

When I started to develop SigGen, it was included with Roster (not an addon) so the links were changed to SigGen
When the Roster Addon Framework was introduced (Roster 1.6.0), SigGen was converted to an AddOn, but the links in memberdetails.php stayed since most users wanted this feature
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to SigGen

Who is online

Users browsing this forum: No registered users and 1 guest

cron