Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: Kodiak_Ice - syyskuu 16, 2006, 11:18:58 AP

Otsikko: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 11:18:58 AP
Looking for a working xfire mod for RC3, I have done a search on the forums and found a couple but they were both for RC2.  The xfire mod is basically just like your msn, yahoo, and ICQ field in your profile and also gives a little pic that people can click on to see your xfire profile.  With gaming getting bigger and bigger each day alot of people are using xfire strickly for IM.  So if anyone has a mod or is going to build one for RC3 i'm very interested in it.

Thanks Kody
Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 16, 2006, 12:05:15 IP
The Xfire mod should work on RC3 aswell.
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 12:22:31 IP
I keep getting an error,

LainaaSome of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders.

which I logged in and changed all the files so you could write to them and I still get the error!!  So I don't know if it is something i'm missing or if it just don't work with RC3, any Idea's would be greatly appreciated!!!

Thanks Again, Kody
Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 16, 2006, 12:30:54 IP
Try going to the package manager -> options and setting it to all files are writable. If that doesnt work try creating a new directory called temp inside the packages directory and try again.
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 02:31:43 IP
When I go to change the file permissions to all writeable it takes me to an FTP screen which I can not use because in order to FTP in to my website it has to be through a secure FTP program like FileZilla.  So everytime I change it it goes back to default, I'll see if I can get my buddy who hosts the site to get it to work.  Thanks for your help!!

Thanks Kody
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 04:57:08 IP
OK, I went in and manually installed it but it did not work like I wanted it to.  After looking around at some of the files I want to add it like the other messenger programs are added.  You basically have a list of 4 messengers: MSN, Yahoo, ICQ, and AOL that is where I want the Xfire to go in with that line up.  In the mod it shows up under website and doesn't display in your post like the other messengers do.  So if anyone can help with the coding to put it in like the other messengers are it would be greatly apprecieated.  The files it had me working with were the Profile.template.php and the Display.template.php.

This is the Display.template.php line 332 were I believe some of the code should go.
// This shows the popular messaging icons.
echo '
', $message['member']['icq']['link'], '
', $message['member']['msn']['link'], '
', $message['member']['aim']['link'], '
', $message['member']['yim']['link'], '<br />';


And, this is the Profile.template.php line 1422
// All the messenger type contact info.
echo '
<tr>
<td width="40%"><b>', $txt[513], ': </b><div class="smalltext">', $txt[600], '</div></td>
<td><input type="text" name="ICQ" size="24" value="', $context['member']['icq']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[603], ': </b><div class="smalltext">', $txt[601], '</div></td>
<td><input type="text" name="AIM" maxlength="16" size="24" value="', $context['member']['aim']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['MSN'], ': </b><div class="smalltext">', $txt['smf237'], '.</div></td>
<td><input type="text" name="MSN" size="24" value="', $context['member']['msn']['name'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt[604], ': </b><div class="smalltext">', $txt[602], '</div></td>
<td><input type="text" name="YIM" maxlength="32" size="24" value="', $context['member']['yim']['name'], '" /></td>
</tr><tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr>';


I'm going to try and see if I can get something to work but am not very good with coding so like I said any help would be greatly appreciated.

Thank Kody



Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 16, 2006, 05:19:05 IP
To get it to manually work

Profile.template.php

Find
<td><input type="text" name="websiteUrl" size="50" value="', $context['member']['website']['url'], '" /></td>

Add After
</tr><tr>
<td><b>XFire: </b></td> <td><input type="text" name="default_options[xfire]" size="50" value="', @$context['member']['options']['xfire'], '" /></td>


Find

<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>

Add After

</tr><tr>
', !empty($context['member']['options']['xfire']) ? '</tr><tr> <td><b>XFire: </b></td> <td>' . $context['member']['options']['xfire'] . '</td>' : '', '


Display.template.php

Find
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';


Add After
if (!empty($message['member']['options']['xfire'])) echo '<a href="http://profile.xfire.com/', $message['member']['options']['xfire'], '" target="_blank"><img border="0" src="' . $settings['images_url'] . '/xfire.gif"></a>';

And upload the image attached to the themes images directory
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 06:28:03 IP
I have been doing some editing in 6 of the php files and I have the block and text where I want it but when i go to input my info it doesn't save it and nothing really happens.  I have added the following code to these files:

These are in the smf/Themes/Default folders:

index.english.php: this is on line 274

$txt[605] = 'XFIRE';


Profile.english.php: this is on line 42
$txt[607] = 'This is your X-Fire nickname.';

Profile.template.php: this is on line 224, 1441
<td><b>', $txt[605], ': </b></td>
<td>', $context['member']['xfire']['link_text'], '</td>
</tr><tr>


<td width="40%"><b>', $txt[605], ': </b><div class="smalltext">', $txt[607], '</div></td>
<td><input type="text" name="XFIRE" maxlength="32" size="24" value="', $context['member']['xfire']['name'], '" /></td>
</tr><tr>


Display.template.php: this is on line 338
', $message['member']['xfire']['link'], '<br />';

I also did this in the current theme I am using which is the helios_multi11rc2 and it does not work.  I have the block directly under the yahoo one where I want it but it will not keep any of the input that you put in there and the image does not work.  I will try your code see if that works.

Thanks Kody
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 16, 2006, 06:51:16 IP
Tried your code and on the profile side it seems to work but the gif does not show up on the posts side.  I put the gif in the all the image files that I have in the themes directory and it still does not show up.  Any suggestions?
Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 17, 2006, 06:50:21 AP
When your viewing a topic hightlight the users profile data and see what image the forums trying to request by viewing the source/selection source
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 17, 2006, 12:10:43 IP
Ok, I opened up the forums so guests can look around.  I don't see it trying to put up any image anywhere?
Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 17, 2006, 04:43:21 IP
Hm try this. In the Display.template of your theme find the previous code you entered for the xfire mod and replace it with this.


if (!empty($message['member']['options']['xfire'])) echo '<a href="http://profile.xfire.com/', $message['member']['options']['xfire'], '" target="_blank"><img border="0" src="
http://www.daplatoon.com/smf/Themes/helios_multi11rc2/images/xfire.gif"></a>';
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - syyskuu 17, 2006, 05:19:51 IP
Works now, I only put the code in the default theme not the current theme so now it shows up.  Thanks for your help Alan I really appreciate it.

Thanks Kody
Otsikko: Re: X-Fire Mod
Kirjoitti: Alan S - syyskuu 17, 2006, 05:23:10 IP
No problem , glad it works.
Otsikko: Re: X-Fire Mod
Kirjoitti: gmt2001 - syyskuu 18, 2006, 11:54:39 IP
after upgradeing RC2 to RC3 and then reinstalling all mods to make sure the upgrades replaced files are set up for the mdos again it works perfectly with no manual coding needed
Otsikko: Re: X-Fire Mod
Kirjoitti: Saiboogu - huhtikuu 22, 2007, 11:13:36 IP
Lainaus käyttäjältä: Alan S - syyskuu 16, 2006, 05:19:05 IP
Display.template.php

Find
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';


Add After
if (!empty($message['member']['options']['xfire'])) echo '<a href="http://profile.xfire.com/', $message['member']['options']['xfire'], '" target="_blank"><img border="0" src="' . $settings['images_url'] . '/xfire.gif"></a>';

Suggested change to that:

// XFire Mod
if (!empty($message['member']['options']['xfire'])) echo '<a href="http://profile.xfire.com/', $message['member']['options']['xfire'], '" target="_blank"><img border="0" height=16 width=16 src="http://miniprofile.xfire.com/bg/bg/type/4/', $message['member']['options']['xfire'], '.gif"></a>';


This retrieves an icon from the XFire site that changes to the game icon of the game you are currently playing. No need to download and store the XFire icon on your site, either.
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - heinäkuu 26, 2007, 12:58:05 IP
Saiboogu, you are the man this is awesome, sorry it took so long to see this haven't looked at this thread in a long time!!!!!!  Works Great!!!!
Otsikko: Re: X-Fire Mod
Kirjoitti: Kodiak_Ice - heinäkuu 26, 2007, 07:32:46 IP
Okay, so this works pretty good how about getting something to show up on the members list like the other messenger programs?  Below is something I tried but on the memberslist page all that show up is position not xfire?

LainaaMemberlist.template.php
         <td class="windowbg2">', $member['icq']['link'], '</td>
         <td class="windowbg2">', $member['aim']['link'], '</td>
         <td class="windowbg2">', $member['yim']['link'], '</td>
         <td class="windowbg2">', $member['msn']['link'], '</td>
         <td class="windowbg2">', $member['xfire']['link'], '</td>
Otsikko: Re: X-Fire Mod
Kirjoitti: arihantjain - heinäkuu 27, 2007, 11:25:08 AP
Kodiak_Ice: is X-Fire ur site? How did you made it? i mean the gaming softwaree.