adding xfire
i've seen a number of calls for the addition of xfire to the postbit alongside the other four major IM services, and i wanted it myself.
result: a quick template hack. this will get you a nice little icon on that row in postbit, linking to the user's xfire profile (i couldn't find a send-message protocol). step 1: go to admin panel, create a new one-line editable profile entry for the xfire username. step 2: note the name of the field you've created (mine's field5, for example). i'll use fieldX in place of that value, you'll need to replace it with your own (in two places. lines 1 and 2 of my code) step 3: open postbit (or postbit legacy, woo) template. find: HTML Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] HTML Code:
<if condition="$post['fieldX']"> i won't provide you with my image, because i'm hazy on copyright/trademark laws regarding that kind of thing... but you make your own by using the ICO plugin from http://www.telegraphix.com.au and simply pulling the xfire program icon into photoshop. name it im_xfire.png and upload it to forum/images/misc/ demo: i have this all installed on my own board, of course, at http://comms.planetsidesyndicate.com comments, suggestions, improvements, optimizations, ... heck, anything you say is welcome. hope this helps somebody. -martyr |
To have this show up in a user's profile, do this:
(make sure to replace fieldx with the field number that you created for xFire username) Code:
In MEMBERINFO template find: |
is there a way to add the xfire IM logo into the User Profile Contact Info block? I tried the hack applied in the first post above and that's not working. See my example:
http://www.doomsdaywarriors.com/imag...re_profile.jpg |
Search for this phrase $vbphrase[instant_messaging] in the getinfo and you could move it there. I do suggest you use the small one instead of the normal big one.
|
That worked great! Thanks! :)
Only problem now is - the link only takes you to the XFIRE public profile page, rather than open a popup that allows you to IM or add this user from within vB - like you can with the other IM clients. Can someone coding experience and some spare time create a quick IM_XFIRE and IM_SEND_XFIRE template? ;) How much of this code is IM client specific? Could I just duplicate and rename one of the existing templates for XFIRE? |
Quote:
|
Making progress...
I am working with an XFIRE modder (gammast) who wrote a XFIRE PLUS module that will allow people to add people to their buddy list via: xfireb://<nickname> The plugin works great - so here's what I want to do: 1) Use the add buddy feature provided by this plugin and 2) drop the messaging feature and offer a download link for this plugin instead Here's what I've done so far: took a copy of the im_aim template, made a new template called im_xfire and modified the code as follows: Code:
<a href="#" onclick="return imwindow('xfire', '$userinfo[userid]', 400, 200)"><img src="$stylevar[imgdir_misc]/im_xfire.gif" alt="<phrase 1="$userinfo[username]">$vbphrase[send_message_via_xfire_to_x]</phrase>" border="0" /></a> Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> from: Code:
<fieldset class="fieldset"> Code:
<fieldset class="fieldset"> all looks good - but it does not seem to use the im_xfire or im_send_xfire templates like I planned. Instead it pulls up a MSN popup window. Where do I need to add a template for this new XFIRE popup? update: found some arrary entries I needed to add in /forums/sendmessage.php and /forums/online.php where I needed to insert im_xfire and im_send_xfire - but I still can't get it to pull up the proper XFIRE popup.... update2: did a search for all the im_aim references in the vB build using textpad and found these results: announcement.php(34): 'im_aim', member.php(37): 'im_aim', memberlist.php(40): 'im_aim', online.php(34): 'im_aim', private.php(55): 'im_aim', showpost.php(34): 'im_aim', showthread.php(37): 'im_aim', usernote.php(39): 'im_aim', includes\functions_showthread.php(47): eval('$userinfo[\'aimicon\'] = "' . fetch_template('im_aim') . '";'); in these files I added a 'im_xfire', entry into all the pages that had arrays defined for the im_xxx templates the only one that gave me trouble was the one in the includes folder (functions_showthread.php) Here is is listing entries for each IM - using AIM as an example: Code:
if ($userinfo['aim'] != '' AND ($vboptions['showimicons'] OR $ignore_off_setting)) Code:
if ($userinfo['field5'] != '' AND ($vboptions['showimicons'] OR $ignore_off_setting)) Code:
$userinfo['field5'] = true; I'm not very good at php coding - what should this be changed to so it fetches the im_xfire template properly? All it really needs to do is check for a field5 value and if its present, fetch the template right? |
I have found where you need to make changes for this to work :)
In sendmessage.php you added the array, but you didn't add the case to tell it what to do when it requests an IM to 'xfire' and thus it defaults to MSN. Code:
// ############################### start im message ############################### Code:
case 'aim': Code:
case 'xfire': |
Hey thanks - that took me another step closer. But the puzzle isn't quite complete yet. Now when I click the xfire link, the popup brings up a vBulletin message that states:
<username> has not specified contact details for this medium. Any idea where those need to be "specifed"? I'm almost convinced that this has something directly to do with how the template is supposed to be called in the /forums/includes/functions_showthread.php file (see my update2 post above). Also - where is the language.xml file stored? I can't seem to find it... |
Quote:
To get the X logo with the rest of the messenging icons what exactly do you put where? I'm not the best with this stuff, but i did manage to get everything done from post 1!! Would be nice to have it in the Instant Messaging area too. Thanks! |
All times are GMT. The time now is 06:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|