Linking items to Allakhazam

Categorizes items in your guildbank(s)

Moderator: Mathos

Linking items to Allakhazam

Postby cyomega » Wed Jul 19, 2006 10:23 am

I noticed a bit of an annoyance when trying to use Allakhazam as the item links in GuildBank. Our guild uses AK median prices to determine item points, and I wanted a click on an item in GB to link to Alla, not Thott. Cue my PHP & Perl background -- I came up with a regexp that modifies the link search text. This basically removes the "of the XX", "of Sta/Int/Agi", etc. from the item name when used in the search link to Alla:

Code: Select all
preg_replace('/\sof\s(the|)(\s|)(Frozen|Arcane|Fiery|Nature|Healing|Holy|Shadow|Spirit|Intellect|Strength|Stamina|Agility|Eagle|Whale|Owl|Monkey|Bear|Falcon|Wolf|Tiger|Gorilla|Boar|Power|Marksmanship|Defense|Concentration|Regeneration|(.*Resistance)).*$/','',$row['item_name'])


Place that code on line 148 of guildbank.php (it replaces the $row['item_name'] bit), so the file will read:

Code: Select all
    // Item texture and quantity column
    
echo '    <td class="'.$stripe_class.'"><div class="item">'."\n";

    
$itmlinktext preg_replace('/\sof\s(the|)(\s|)(Frozen|Arcane|Fiery|Nature|Healing|Holy|Shadow|Spirit|Intellect|Strength|Stamina|Agility|Eagle|Whale|Owl|Monkey|Bear|Falcon|Wolf|Tiger|Gorilla|Boar|Power|Marksmanship|Defense|Concentration|Regeneration|(.*Resistance)).*$/','',$row['item_name']);
    echo 
'<a href="'.$itemlink[$roster_conf['roster_lang']].urlencode(utf8_decode($itmlinktext)).'" target="_itemlink">'."\n".
        
'      <img src="'.$roster_conf['interface_url'].$item_texture.'.'.$roster_conf['img_suffix'].'" class="icon"'.' alt="'.utf8_decode($row['item_name']).'" /></a>';
    if( (
$row['total_quantity'] > 1) && ($itemRow['item_parent'] != 'bags') )
            echo 
'<span class="quant">'.$row['total_quantity'].'</span>';
 


Hopefully the developers will find a way to integrate this into the next release =)
cyomega
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Sun Jul 16, 2006 5:32 am

Linking items to Allakhazam

Postby zanix » Thu Jul 20, 2006 3:41 am

This would need to be non-locale dependant to work well, or we'd have to keep a list of all these names in the locale files, which is a pain to keep updated
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: Linking items to Allakhazam

Postby Mathos » Sat Jul 22, 2006 6:07 am

Err,

Look in the <roster>/addons/guildbank/conf.php file. You can just flip a bit, and searches go to Alakazaam.

Code: Select all
////// ItemLink Site
// 1=Thottbot,
// 2=Allakhazam for 'enUS' and blasc.de for 'deDE'.
$searchtype = 1;
User avatar
Mathos
Gimpy Developer
Gimpy Developer
 
Posts: 117
Joined: Wed Jul 05, 2006 11:00 am

Linking items to Allakhazam

Postby bohni » Sat Oct 14, 2006 5:46 pm

Hello, I think, the link should no longer go on the items name and the search-function of the called site.

There is the items id, which is unique. This could be used for linking directly to the item:
http://www.buffed.de/?i=12031
and
http://wow.allakhazam.com/db/item.html?witem=12031
leads to the same icon - german and english...

In the database is the entry
12031:0:1110:1755127302

So the first number before the ":" should be used.

However, it seems, Thottbot uses different ids :-(

Greets,
Bohni
Last edited by bohni on Sat Oct 14, 2006 6:23 pm, edited 1 time in total.
bohni
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sat Oct 14, 2006 4:46 pm


Return to Categorized Guild Bank

Who is online

Users browsing this forum: No registered users and 0 guests

cron