The Item Icons (in the char.php) Capitalization problem

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

Moderators: Ulminia, poetter

The Item Icons (in the char.php) Capitalization problem

Postby Stigg » Fri Mar 30, 2007 7:20 am

I've been seeing a few cases here and there about capitalization mismatching between the files we have under img/interface/icons/ and the files that are being called from the char.php view.

One of my members reported it fixing itself after he uploaded the method CharacterProfiler (as opposed to the Armory sync that I kick off from time to time)

An example member with the graphic problem is here:
Sarlack

The image linked is here:
Broken
Spelled incorrectly as:
INV_Mace_1h_Stratholme_D_01.jpg

The correct spelling is:
INV_Mace_1H_Stratholme_D_01.jpg

(Note the H in 1H)

-Stigg
Stigg
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Thu Mar 22, 2007 7:55 am

The Item Icons (in the char.php) Capitalization problem

Postby Ulminia » Fri Mar 30, 2007 7:33 am

this is only a problem on linux servers because thay are case sensative where as windows is not lol
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

The Item Icons (in the char.php) Capitalization problem

Postby zanix » Fri Mar 30, 2007 7:41 am

This will be fixed in Roster 1.8
On import, roster will convert all interface image names to lower case and replace spaces with underscores

Unfortunately, this means everyone will need to re-download the image pack
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

Re: The Item Icons (in the char.php) Capitalization problem

Postby fewyn » Sat Mar 31, 2007 12:08 am

zanix wrote:This will be fixed in Roster 1.8
On import, roster will convert all interface image names to lower case and replace spaces with underscores

Unfortunately, this means everyone will need to re-download the image pack


Wooooo! I've been having this issue for awhile :( Any timeline for this fix or a temporary one I can put in?
User avatar
fewyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Wed Jul 05, 2006 8:38 am

The Item Icons (in the char.php) Capitalization problem

Postby zanix » Sat Mar 31, 2007 8:08 am

Not really, this requires quite a massive change in Roster
There are many, many places that need to be changed to handle the icons this way
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

Re: The Item Icons (in the char.php) Capitalization problem

Postby fewyn » Sat Mar 31, 2007 11:52 am

zanix wrote:Not really, this requires quite a massive change in Roster
There are many, many places that need to be changed to handle the icons this way


Ah can't wait to see 1.8 then.
User avatar
fewyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Wed Jul 05, 2006 8:38 am

Re: The Item Icons (in the char.php) Capitalization problem

Postby Kristoff22 » Sat Mar 31, 2007 7:26 pm

fewyn wrote:
zanix wrote:This will be fixed in Roster 1.8
On import, roster will convert all interface image names to lower case and replace spaces with underscores

Unfortunately, this means everyone will need to re-download the image pack


Wooooo! I've been having this issue for awhile :( Any timeline for this fix or a temporary one I can put in?


I actually noted this as a bug in the original ArmorySynch post. In the file functions.general.php there is a function called getItemIcon. Unfortunately the fixes need to be done one at a time. If you can post the fix, I'll add it to that file.
Kristoff22
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

The Item Icons (in the char.php) Capitalization problem

Postby zanix » Sun Apr 01, 2007 3:36 am

lib/wowdb.php will convert each icon during the character import process
Each field that has an icon will pass through a function
Code: Select all
function fix_icon($icon_name)
{
    return 
strtolower(str_replace(' ','_',$icon_name));


Example of use in wowdb.php
Code: Select all
    /**
     * Formats item data to be inserted into the db
     *
     * @param array $item_data
     * @param int $memberId
     * @param string $parent
     * @param string $slot_name
     * @return array
     */
    
function make_item$item_data$memberId$parent$slot_name )
    {
        
$item = array();
        
$item['member_id'] = $memberId;
        
$item['item_name'] = $item_data['Name'];
        
$item['item_parent'] = $parent;
        
$item['item_slot'] = $slot_name;
        
$item['item_color'] = $item_data['Color'];
        
$item['item_id'] = $item_data['Item'];
        
$item['item_texture'] = $this->fix_icon($item_data['Icon']);

        if( isset( 
$item_data['Quantity'] ) )
            
$item['item_quantity'] = $item_data['Quantity'];
        else
            
$item['item_quantity'] = 1;

        if( !empty(
$item_data['Tooltip']) )
            
$item['item_tooltip'] = $this->tooltip$item_data['Tooltip'] );
        else
            
$item['item_tooltip'] = $item_data['Name'];

        return 
$item;
    } 
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 ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 1 guest

cron