2.7.1 errors - broken image links

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

2.7.1 errors - broken image links

Postby AnthonyB » Thu May 14, 2009 8:28 am

All the icons used in the 'Log' column are broken for me. It seems to be looking for /<roster>/img/note.gif which does not exist.

Rendered code: <td id="as_status_log_5" class="membersRowCell"><img src="/roster/img/note.gif"onmouseover="return...

Also, the table collapse control icon in the top tight corner has a broken image link. It seems to be looking for /<roster>/img/minus.gif which does not exist
(same with /<roster>/img/plus.gif when the table is collapsed)

Rendered code: <img src="/roster/img/minus.gif" style="float:right;cursor:pointer;" id="update_details_img" onclick="toggleStatus();" alt="" />

Image
Roster 2.0.2 svn [latest] latest trunk SVN svn [latest] running on IIS7/Windows Server 2008 SP2 | MySQL 5.0.85 | PHP 5.2.10 | Yes, Roster and PHP rocks on IIS! Even run as FastCGI extension!
User avatar
AnthonyB
Gimpy Developer
Gimpy Developer
 
Posts: 346
Joined: Tue Jul 04, 2006 2:44 pm
Location: Sydney, Australia

Re: 2.7.1 errors - broken image links

Postby Ulminia » Thu May 14, 2009 12:21 pm

this was the default path for the images in roster 2.0.1 ial have to find out where zanix moved them in 2.0.2
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: 2.7.1 errors - broken image links

Postby AnthonyB » Thu May 14, 2009 12:37 pm

Ahh OK.. Found them.

roster\templates\default\images
Roster 2.0.2 svn [latest] latest trunk SVN svn [latest] running on IIS7/Windows Server 2008 SP2 | MySQL 5.0.85 | PHP 5.2.10 | Yes, Roster and PHP rocks on IIS! Even run as FastCGI extension!
User avatar
AnthonyB
Gimpy Developer
Gimpy Developer
 
Posts: 346
Joined: Tue Jul 04, 2006 2:44 pm
Location: Sydney, Australia

Re: 2.7.1 errors - broken image links

Postby AnthonyB » Fri May 15, 2009 2:02 pm

Fix is

armorysyncjob.class.php
Line 584
Code: Select all
$icon = ROSTER_PATH. ( $status == 'ON' ? 'img/plus.gif' : 'img/minus.gif' );

to
Code: Select all
$icon = ROSTER_PATH. ( $status == 'ON' ? 'templates/default/images/plus.gif' : 'templates/default/images/minus.gif' );


Line 678-682
Code: Select all
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/note.gif\"". makeOverlib( $member['log'] , $roster->locale->act['update_log'] , '' ,0 , '' , ',WRAP' ). " alt=\"\" />";
            } elseif( $member['log'] ) {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/note.gif\"". makeOverlib( "<div style=\"height:300px;width:500px;overflow:auto;\">". $member['log']. "</div>", $roster->locale->act['update_log'] , '' ,0 , '' , ',STICKY, WRAP, CLOSECLICK' ). " alt=\"\" />";
            } else {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/no_note.gif\" alt=\"\" />";

to
Code: Select all
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "templates/default/images/note.gif\"". makeOverlib( $member['log'] , $roster->locale->act['update_log'] , '' ,0 , '' , ',WRAP' ). " alt=\"\" />";
            } elseif( $member['log'] ) {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "templates/default/images/note.gif\"". makeOverlib( "<div style=\"height:300px;width:500px;overflow:auto;\">". $member['log']. "</div>", $roster->locale->act['update_log'] , '' ,0 , '' , ',STICKY, WRAP, CLOSECLICK' ). " alt=\"\" />";
            } else {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "templates/default/images/no_note.gif\" alt=\"\" />";


and armorysync.js
Line 18
Code: Select all
showHide('update_details','update_details_img','img/minus.gif','img/plus.gif');

to
Code: Select all
showHide('update_details','update_details_img','templates/default/images/minus.gif','templates/default/images/plus.gif');


Only bit still broken is that if you click on the minus.gif to collapse the table the plus.gif link is broken as is the minus.gif link if you then click on what would've been the plus.gif. The toggle works, but the image path is still stuffed and I can't find where in the code I've missed.
Roster 2.0.2 svn [latest] latest trunk SVN svn [latest] running on IIS7/Windows Server 2008 SP2 | MySQL 5.0.85 | PHP 5.2.10 | Yes, Roster and PHP rocks on IIS! Even run as FastCGI extension!
User avatar
AnthonyB
Gimpy Developer
Gimpy Developer
 
Posts: 346
Joined: Tue Jul 04, 2006 2:44 pm
Location: Sydney, Australia

Re: 2.7.1 errors - broken image links

Postby zanix » Fri May 15, 2009 8:27 pm

It would be better to use the theme path variables so that if the use uses a different theme, the correct images will show from that theme

armorysyncjob.class.php
Line 584
Code: Select all
$icon = ROSTER_PATH. ( $status == 'ON' ? 'img/plus.gif' : 'img/minus.gif' );

to
Code: Select all
$icon = ROSTER_PATH. ( $status == 'ON' ? $roster->config['theme_path'] . '/images/plus.gif' : 'templates/default/images/minus.gif' );


Line 678-682
Code: Select all
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/note.gif\"". makeOverlib( $member['log'] , $roster->locale->act['update_log'] , '' ,0 , '' , ',WRAP' ). " alt=\"\" />";
            } elseif( $member['log'] ) {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/note.gif\"". makeOverlib( "<div style=\"height:300px;width:500px;overflow:auto;\">". $member['log']. "</div>", $roster->locale->act['update_log'] , '' ,0 , '' , ',STICKY, WRAP, CLOSECLICK' ). " alt=\"\" />";
            } else {
                $array['LOG'] = "<img src=\"". ROSTER_PATH. "img/no_note.gif\" alt=\"\" />";

to
Code: Select all
                $array['LOG'] = "<img src=\"". $roster->config['theme_path'] . "/images/note.gif\"". makeOverlib( $member['log'] , $roster->locale->act['update_log'] , '' ,0 , '' , ',WRAP' ). " alt=\"\" />";
            } elseif( $member['log'] ) {
                $array['LOG'] = "<img src=\"". $roster->config['theme_path'] . "/images/note.gif\"". makeOverlib( "<div style=\"height:300px;width:500px;overflow:auto;\">". $member['log']. "</div>", $roster->locale->act['update_log'] , '' ,0 , '' , ',STICKY, WRAP, CLOSECLICK' ). " alt=\"\" />";
            } else {
                $array['LOG'] = "<img src=\"". $roster->config['theme_path'] . "/images/no_note.gif\" alt=\"\" />";


and armorysync.js
Line 18
Code: Select all
showHide('update_details','update_details_img','img/minus.gif','img/plus.gif');

to
Code: Select all
showHide('update_details','update_details_img',$roster->config['theme_path'] . '/images/minus.gif','templates/default/images/plus.gif');
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: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: 2.7.1 errors - broken image links

Postby Ulminia » Fri May 15, 2009 10:35 pm

ok ial make the changes
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: 2.7.1 errors - broken image links

Postby AnthonyB » Sat May 16, 2009 3:00 am

Hmmm... incorporating Zanix's changes broke everything for me again.

So with the code being:
Code: Select all
$roster->config['theme_path'] . 'images/minus.gif'

The resultant path of the broken image link became
Code: Select all
http://anthonyb.dyndns.org/roster//roster/templates/default/images/minus.gif


Seems the $roster->config['theme_path'] is not generating the right data - it's picking up an extra "/roster"
Roster 2.0.2 svn [latest] latest trunk SVN svn [latest] running on IIS7/Windows Server 2008 SP2 | MySQL 5.0.85 | PHP 5.2.10 | Yes, Roster and PHP rocks on IIS! Even run as FastCGI extension!
User avatar
AnthonyB
Gimpy Developer
Gimpy Developer
 
Posts: 346
Joined: Tue Jul 04, 2006 2:44 pm
Location: Sydney, Australia

Re: 2.7.1 errors - broken image links

Postby zanix » Sat May 16, 2009 7:16 am

Yeah, I didn't actually test it
I use the variable on what it was supposed to be, guess it's a buggy variable
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: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: 2.7.1 errors - broken image links

Postby AnthonyB » Sat May 16, 2009 12:29 pm

roster/lib/template.php

Code: Select all
$this->_tpldata['.'][0]['REQUEST_URI'] = str_replace('&', '&amp;', substr(request_uri(),strlen(ROSTER_PATH)));
$this->root = ROSTER_TPLDIR . $this->tpl;
$roster->config['theme_path'] = ROSTER_PATH . 'templates/' . $this->tpl;


roster/lib/constants.php

Code: Select all
define('ROSTER_TPLDIR',ROSTER_BASE . 'templates' . DIR_SEP);
Roster 2.0.2 svn [latest] latest trunk SVN svn [latest] running on IIS7/Windows Server 2008 SP2 | MySQL 5.0.85 | PHP 5.2.10 | Yes, Roster and PHP rocks on IIS! Even run as FastCGI extension!
User avatar
AnthonyB
Gimpy Developer
Gimpy Developer
 
Posts: 346
Joined: Tue Jul 04, 2006 2:44 pm
Location: Sydney, Australia

Re: 2.7.1 errors - broken image links

Postby zanix » Sat May 16, 2009 4:04 pm

Hmm, 'theme_path' looks right... :scratch:
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: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 0 guests

cron