Make Character Names Armory Links on 1.7.3

Miscellaneous code snippets and examples that members have posted

Make Character Names Armory Links on 1.7.3

Postby TurnX » Tue Oct 23, 2007 12:56 am

Seleleth provided the forum with a great mod for WoW Roster that put a Armory link before each guild members name, check it out here. I wanted to take that 1 step forward and just make each members name a direct link to their Armory page. You do lose a little info compared to the user uploaded data, like for example a members known crafting recipe, but from my experience most members are too lazy or just don't care enough to update their info, so this is a great way to take care of that.

NOTE: This was tested and works on version 1.7.3 but my work on any 1.7.x version.

NOTE: Original credit goes to Seleleth for creating the Armory link inside of Roster

Install:

1) Open memberdetails.php

2) Go to line 442, and you should see the following code:

Code: Select all
        if ( $row['server'] )
        {
            return 
$tooltip.'<a href="char.php?name='.$row['name'].'&amp;server='.$row['server'].'">'.$row['name'].'</a></div>';
        }
        else
        {
            return 
$tooltip.$row['name'].'</div>';
        }
    }
    else
    {
        if ( 
$row['server'] )
        {
            return 
'<a href="char.php?name='.$row['name'].'&amp;server='.$row['server'].'">'.$row['name'].'</a>';
        }
        else
        {
            return 
$row['name'];
        }
    }


Replace that code with:
Note: Replace www.wowarmory.com with eu.wowarmory.com for European Servers
Code: Select all
        return $tooltip.'<a href="http://www.wowarmory.com/character-sheet.xml?r='.$roster_conf['server_name'].'&amp;n='.$row['name'].'" target="_blank">'.$row['name'].'</a></div>';
    }
    else
    {
        return 
'<a href="http://www.wowarmory.com/character-sheet.xml?r='.$roster_conf['server_name'].'&amp;n='.$row['name'].'" target="_blank">'.$row['name'].'</a>';
    }


See it working HERE

Is this the best way to do it? Probably not, but it does work. But for those of you who are sick of lazy members who don't update their info, this is a good fix.

MOD EDIT: Simplified the replacement code since you don't need to check for server when making links to the armory
Also added a note about the EU armory
Last edited by TurnX on Tue Oct 23, 2007 2:31 am, edited 1 time in total.
TurnX
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Sat Jul 08, 2006 7:55 am

Re: Make Character Names Armory Links on 1.7.3

Postby mdeshane » Tue Oct 23, 2007 11:51 pm

This is an excellent mod! Also, just to let you know, a few of us originally wrote this mod a month before Seleleth HERE. We pretty much found there are a few different ways to have it, with the name as a link, with a link infront of the name, and both. I recommend looking through all the threads on this mod to find the one that suits your guild best!

Thanks TurnX and Seleleth for your continued work on this mod and to the others that also pioneered this mod.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US


Return to Code Cache

Who is online

Users browsing this forum: No registered users and 0 guests

cron