Additional Info
Type
Package ID
Violat3r:AdvancedXFireField
First Created
April 10, 2008, 11:57:47 PM
Last Updated
February 08, 2009, 05:48:28 PM

Advanced XFire Field v2.0 v2.0

Adds a cool way to display your members' XFire information.
Compatible With 1.1.4, 1.1.5, 1.1.7, 1.1.8
Latest version v2.0
Downloads 20,236
Reviews 0
Rating 0/5
Subscribers 10
License (View License)
Author(s)
Advanced XFire Field Mod v2.0
by
Violat3r | Support | Link to Mod


Compatibility: This should work fine on SMF 1.1.4 through 1.1.7. But its only been tested on those so im not sure how well it will work with anything lower nor do i know about compatibility with 2.x Beta at this time.

Info: This mod will add an "XFire" field to your members' profile page, a little image in their posts, xfire information in the member list, and xfire info in the "Who's Online" page. Unlike the other xfire mods i've encountered, this one doesn't just display your xfire name and a link to your xfire profile. It shows your xfire information using the mini-profile Banners from the Xfire website. The small icon which appears on the member list, posts, and who's online list will change if their online, offline, or playing a game. If the game has an icon that XFire has setup, it will show that icon, if however your playing a game that XFire doesnt have an icon for but still recognizes the game, it will show the normal icon as well as what game their playing when you mouseover the icon.

Upgrading: If your upgrading from the 1.x versions, please, PLEASE delete ALL codes added with the xfire mod and COMPLETELY un-install it. Your database will keep the members' information so upon installation of the new versions, everything should work ok. If it doesnt...then well i guess they've got to reenter there information, sorry. The main reason for such deletion is almost ALL the code has been tweaked in some way. After this has been done, just follow the following installation instructions and you should be up and running in no time!

Installation: First off just Download the mod and then go to "Admin > Packages > Download Packages" then browse for the mod zip and click "Upload". Once thats done, click "Install Mod" then click "Apply Mod". It may pause for a few seconds but eventually you should get a successful installation. Kerblam! Its done, just go to "Profile Information" and enter your xfire Username. Your other option is to search for it in the package servers, but i dont much care for them so i prefer the manual installation method.

For Custom themes that have a Custom "Profile.template.php" and "Display.template.php", it wont be quite as simple:

You will need some kind of text editor or coding program to open the php files needed; If your theme has both a custom Profile.template.php and Display.template.php then please follow both instructions carefully, if your theme has only 1 of those custom-built please just follow the instructions for just that one (in most cases, custom themes dont have a custom Profile.template.php, but you MUST be sure else it wont work right).



FOR THE Profile.template.php:

Open Profile.template.php and locate the following code:
<td>', $context['member']['yim']['link_text'], '</td>

position your cursor directly after that code and then PASTE this next code:
</tr><tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr><tr><td><b>', $txt['xfire'], ': </b></td>
<td>', !empty($context['member']['options']['xfire']) ? '<a href="http://www.xfire.com/profile/' . $context['member']['options']['xfire'] . '/" target="_blank"><img src="http://miniprofile.xfire.com/bg/sh/type/1/' . $context['member']['options']['xfire'] . '.png" /></a><br /><div class="smalltext"><a href="xfire:add_friend?user=' . $context['member']['options']['xfire'] . '">' . $txt['xfire_add'] . '</a> | ' . $txt['xfire_dont'] . ' <a href="http://www.xfire.com/download/" target="_blank">' . $txt['xfire_download'] . '</a></div>'  : '', '</td><tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>


Now in the same file, located the following code:
<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>

Once again, exactly after that code paste this:
</tr><tr><td><b>', $txt['xfire'], ': </b><div class="smalltext">', $txt['xfire_username'], '. </div></td>
<td><input type="text" name="default_options[xfire]" maxlength="25" size="24" value="', @$context['member']['options']['xfire'], '" /><br /><div class="smalltext">' . $txt['xfire_dont'] . ' <a href="http://www.xfire.com/download/" target="_blank">' . $txt['xfire_download'] . '</a></div></td>


Save the file and upload it to your theme directory. And your done with the Profile.template.php!! YAY!!



FOR THE Display.template.php:

Open Display.template.php and locate this code:
', $message['member']['yim']['link'],

Directly after that paste this code:

!empty($message['member']['options']['xfire']) ? '<a href="http://www.xfire.com/profile/' . $message['member']['options']['xfire'] . '/" target="_blank"><img src="http://miniprofile.xfire.com/bg/bg/type/4/' . $message['member']['options']['xfire'] . '.gif" width="16" height="16" alt="' . $message['member']['options']['xfire'] . '" title="' . $txt['xfire'] . ' :: '.$message['member']['options']['xfire'].'" /></a>' : '',

Make sure that you start the above code on a new line but keep this code after the xfire one on the next line:   '<br />';
Basically your display.template.php should look like this:
// This shows the popular messaging icons.
echo '
', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'],
!empty($message['member']['options']['xfire']) ? '<a href="http://www.xfire.com/profile/' . $message['member']['options']['xfire'] . '/" target="_blank"><img src="http://miniprofile.xfire.com/bg/bg/type/4/' . $message['member']['options']['xfire'] . '.gif" width="16" height="16" alt="' . $message['member']['options']['xfire'] . '" title="' . $txt['xfire'] . ' :: '.$message['member']['options']['xfire'].'" /></a>' : '',
'<br />';

Notice that the '<br />'; is on its own line AFTER the xfire modification.

Save the file and upload it to your theme directory. And your done with the Display.template.php!! YAY!!


if your still having some problems understanding EXACTLY what to do, try going Here, it will help explain what to do probably better then i can.

Un-install: To un-install this mod, just go to "Admin > Packages" and click "un-install" then delete if you just want to get rid of it completely. If its a custom theme that you made MANUAL changes to, just locate the codes i told you to paste above, and then delete them, CAREFULLY. You dont want to accidentally delete an important part of your forum. In this case you might consider making a copy of each of the template.php files BEFORE modifying them so that maybe at a later date you can just re-upload them as if nothing was installed to begin with.

IMPORTANT: ALWAYS, and i mean ALWAYS make a back of your forum, files, and database before installing any kind of mod.

Support: Please look for help and support in the mod's post in the SMF Community forums which you can find here. My website is currently non-operational, so you will not be able to contact me through there.

Future Releases:

  • I will first be working on getting it running on SMF v2.x series.
  • I will be working on a way to allow the member to choose a different banner from some kind of a dropdown list.
  • Since tsviewer.com's release of similar types of banners, im looking into making a mod similar to this one for the teamspeak banner.

Credits: Huge Credits go to InsaneBoarder234 for his great XFire Field mod that led to the eventual construction of this one. I would also like to thank winrules for his Custom Profile Field mod which gave me the idea of making something like this. And finally i would like to thank ccbtimewiz from the Community forums for finding such a simple mistake on my part and correcting it for me as well as providing a lot of help and support to my mod-users, especially when i was absent for months on end, Thanx!

Changelog:


  • April 19th: v1.0
      
    • Initial Release.

  • April 24th: v1.1
      
    • Added Support for several languages (and their UTF-8 equivalents):
              *Portuguese/Brazilian - Thanx joomlamz
              *British English
              *Spanish - Thanx Agustin
    • Added Support for the custom theme "Aa_New_Damage" by m3talc0re.
    • Added Support for the 2 other original SMF themes besides the default (i.e. Babylon and classic).
    • Moved the xfire image around to allow for a more "direct" extraction/installation.
    • Added a link to add them as a friend (it will open using XFire).

  • May 20th: v1.2
      
    • Added Support for the "Who's Online" List. For custom themes' users: This update changes none of the original code, so just un-install and delete, then upload and install v1.2 and your good to go.

  • December 17th: v2.0
      
    • Theres been a lot of code changed as well as additions and deletions so i decided to go ahead and bump this up to a v2.0 of the mod.
    • I've deleted all the theme support for the mod since it was just annoying clutter really.
    • There's no more xfire image on the post display; i've included the FULL code for the XFire's mini-profile information. Which grabs the image from xfire.com itself.
    • Made the "Add as Friend?" link use the "smalltext" css code so its smaller and looks better in contrast with the Banner.
    • Added text "Dont Have XFire? Get it Here!" that will link you to the XFire download page if you dont have it and are interested. It also adds the same text right
      under the field where you enter your XFire username in the edit profile area.
    • Added a "languages.xml" file so i could keep things organized by having the main modifications done in one area, and the text strings and translated text strings in a separate file, to be able to easily modify and or add new language translations. So if your looking to translate it into another language for me, just look in there!
    • Added Support for another language (and its UTF-8 equivalent):
              *Dutch - Thanx mrgekkie
    • FIX - The most annoying bug that i somehow completely overlooked on v1.x was the xfire field appearing no matter if you had an xfire username set up or not. I found this had happened because of the way i included the "Add as Friend?" link, this HAS been fixed and the XFire info panel will now ONLY appear when one has entered their username.
    • One of my original plans was to allow people to have a dropdown of where they can choose WHICH of the XFire mini-profile banners they want to show, but since is still currently beyond my coding abilities it will have to wait for a future release. As a consolation prize, i will be putting a small guide on the community forums in this mods' section on how to change it to the one you want.
  • December 28th: v2.0a
      
    • I quickly tossed up this version for those of you who use Nascar's Memberlist Xrevolution Mod for 1.1.7. Now he coded it very well and i got no errors when the regular version of this was installed along with the memberlist mod, so you'll only need to install this version if you want the XFire icon to show up in the new memberlist. Please make sure that you first un-install all previous versions of this mod (including the new 2.0 verson) before installing this one.
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: