I am working with Wowroster (http://www.wowroster.net) and I am just learning some PHP- not enough to amount to anything. I ran into a problem with this code- my server isn't parsing the image paths correctly. Instead of :
/img/Interface/PvPRankBadges/PvPRank01.jpg
it is parsing img/Interface//PvPRankBadges//PvPRank01.jpg and this is in multiple locations. I posted for help there but I don't understand PHP enough to implement the solution. Here's what I was told to do:
This is a problem with the db importer (lib/wowdb.php)
It doesn't remove those slashes properly and some server don't like those double slashes in a path and return nothing
There are many, many places in lib/wowdb.php that put this image info to the db
Pretty much you need to search for every place and image is prepared for insertion to the db
For example, a line that prepares an images would normally look like this
PHP:
$item['item_texture'] = $item_data['Texture'];
It needs to look like this
PHP:
$item['item_texture'] = preg_replace('|\\\\|','/', $item_data['Texture']);
There are muliple places there this needs to be done
Ok my problem is that I didn't find but a couple of places to do this and it isn't working... I think I probably need to do this where they do an addthis but I don't know what the syntax should be. I think probably in lines like this:
$this->add_value('texture', $data_talent_skill['Texture'] );
it should be added but I'm not sure how to implement that...you can see my issue at http://www.piratesofthecrown.com/roster
Thanks for all your help in advance!