So I did.
I did this in two places: 1) Within the character view itself and 2) in the index listings (i.e., the front, "Stats", and "Honor" pages). I just did this quick and dirty--no configurable options, no alternate languages. If you want it, here you go. If you don't, don't do it. There's your configuration. :rabbit2:
NOTE: This was written around Roster 1.7.2, but may work with any Roster 1.7.x version.
To add links to the armory in character profiles
(demo here)
Edit memberdetails.php
Find the following around line 112:
- Code: Select all
echo $menu_cell.$url.'&action=character">'.$wordings[$roster_conf['roster_lang']]['character'].' Stats</a></td>'."\n";
After add:
- Code: Select all
echo $menu_cell.'<a href="http://armory.worldofwarcraft.com/character-sheet.xml?r='.$server.'&n='.$name.'" target="_blank">Armory</a></td>'."\n";
To add links to the armory in member listings
(demo here)
Edit memberslist.php
Find the following around line 426:
- Code: Select all
function name_value ( $row )
{
global $wordings, $roster_conf, $guildFaction;
After add:
- Code: Select all
$armorylink = $roster_conf['interface_url'].'Interface/Icons/INV_Box_01.'.$roster_conf['img_suffix'];
$armorylink = '<img class="membersRowimg" width="'.$roster_conf['index_iconsize'].'" height="'.$roster_conf['index_iconsize'].'" src="'.$armorylink.'" alt="Armory Profile">';
$armorylink = '<a href="http://armory.worldofwarcraft.com/character-sheet.xml?r='.$roster_conf['server_name'].'&n='.$row['name'].'" target="_blank">'.$armorylink.'</a> ';
Find the following around line 453:
- Code: Select all
return $tooltip.'<a href="char.php?name='.$row['name'].'&server='.$row['server'].'">'.$row['name'].'</a></div>';
Change to:
- Code: Select all
return $tooltip.$armorylink.'<a href="char.php?name='.$row['name'].'&server='.$row['server'].'">'.$row['name'].'</a></div>';
Find the following around line 457:
- Code: Select all
return $tooltip.$row['name'].'</div>';
Change to:
- Code: Select all
return $tooltip.$armorylink.$row['name'].'</div>';
Find the following around line 464:
- Code: Select all
return '<a href="char.php?name='.$row['name'].'&server='.$row['server'].'">'.$row['name'].'</a>';
Change to:
- Code: Select all
return $armorylink.'<a href="char.php?name='.$row['name'].'&server='.$row['server'].'">'.$row['name'].'</a>';
Find the following around line 468:
- Code: Select all
return $row['name'];
Change to:
- Code: Select all
return $armorylink.$row['name'];
That's it!
FAQ
Q: Does my code suck?
A: Yes
Q: Should you laugh at my php skills?
A: Sure