Specifying Image URL for Looty

Miscellaneous code snippets and examples that members have posted

Specifying Image URL for Looty

Postby Cognatus » Sat Jul 22, 2006 9:11 pm

When trying to run Looty, an alternative to the bank mod within Roster, I found that I couldnt just specify the image folder in the config file. The problem was that the LUA file that you import to your roster database from WoW, includes "Interface\\Icons\\" in the item_texture field of the wowroster_items table. So if you had your config set to "/wow/images" Looty would by default look for your icons in "/wow/images/Interface/Icons/". The fix is pretty simple, replace line 230 of index.php with the following code:

Code: Select all
$item['icon'] = substr_replace($item['item_texture'], ''018); 


This will clip the first 18 characters of the $item['item_texture'] variable ("Interface\\Icons\\") so that your image url for bank item icons will be whatever you entered for the image folder in the config file, plus the actual file name of the icon.
Cognatus
WR.net Apprentice
WR.net Apprentice
 
Posts: 9
Joined: Mon Jul 17, 2006 5:25 am
Location: Canada

Return to Code Cache

Who is online

Users browsing this forum: No registered users and 0 guests

cron