News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Advanced XFire Field v2.0

Started by Violat3r, April 19, 2008, 07:23:35 PM

Previous topic - Next topic

ruckstande

So far so good. Can you post what changed so I can correct this if I ever have to reinstall the site?

ccbtimewiz

Compare the old file with the new one. XD

All I did was remove the empty() check and fixed the <tr></td></td></tr> issues. :)

ruckstande

Quote from: ccbtimewiz on June 23, 2008, 03:31:31 PM
Compare the old file with the new one. XD

All I did was remove the empty() check and fixed the <tr></td></td></tr> issues. :)
Terrific. Thank you.

threepwood

#43
Hi,

I've installed this great mod on my forum (SMF 1.1.5 with TinyPortal 0.9.8) but the xfire description doesn't appear before the image. I only get the " : " character.

Is this because of the custom theme size? I've edited the display.template.php as instructed, don't have the profile.template file.

Here's a pic of what happens:

hxxp:img255.imageshack.us/my.php?image=xfnv2.jpg [nonactive]

hxxp:img120.imageshack.us/my.php?image=xf2ix7.jpg [nonactive]


ruckstande

Hey me again. I'm getting even more errors now but only from "Guest".

Guest       Today at 01:38:08 AM
8: Undefined index: xfire
File: /home/content/r/u/c/ruckstande/html/pbl2/Themes/default/Profile.template.php (eval?)
Line: 450

ccbtimewiz

Quote from: ruckstande on June 24, 2008, 07:42:24 AM
Hey me again. I'm getting even more errors now but only from "Guest".

Guest       Today at 01:38:08 AM
8: Undefined index: xfire
File: /home/content/r/u/c/ruckstande/html/pbl2/Themes/default/Profile.template.php (eval?)
Line: 450

Simply disable guests from viewing profiles.

threepwood, make sure you have the strings in modifications.english.php that this mod puts in.

ruckstande

Quote from: ccbtimewiz on June 24, 2008, 10:49:24 AM
Quote from: ruckstande on June 24, 2008, 07:42:24 AM
Hey me again. I'm getting even more errors now but only from "Guest".

Guest       Today at 01:38:08 AM
8: Undefined index: xfire
File: /home/content/r/u/c/ruckstande/html/pbl2/Themes/default/Profile.template.php (eval?)
Line: 450

Simply disable guests from viewing profiles.

threepwood, make sure you have the strings in modifications.english.php that this mod puts in.
Oh that simple. Thank you.

threepwood

Quote from: ccbtimewiz on June 24, 2008, 10:49:24 AMthreepwood, make sure you have the strings in modifications.english.php that this mod puts in.

Thanks, that nailed it down, perfect now :)

gamerhookup

Ok, after an hour or so and trying all the ideas in this posting. Nothing and I mean nothing other than deleting the mode all together.. I get the same errors.

I am running SMF 1.1.5, TP 1.05b and this happens on two different sites, one with default theme and 50 mods, and the other with only 12 mods.

Basically on both sites I get this exact same errors. there are no other errors on either site.

MYUSERNAME   Today at 10:48:36 PM 
0.0.0.0     0d74204f944039610dcf2db7f26a9555 
http://www.mydomain.net/index.php?action=profile;u=2 [nofollow] 
8: Undefined index: xfire
File: /hermes/web07/b2331/pow.MYDOMAIN/htdocs/Themes/default/languages/TPShout.english.php (eval?)
Line: 230

In that Tpshout file, ther eis no line 230, there are only 20 lines in there.

Again, i have tried all the ideas in here and nothing has worked for either site.

Now this error only happens when any one whether is be guest or a member views a profile, and it does not have an xfire name in it, then it creates this error. Those with an xfire name works 100 percent!

Short of not using this mod Advanced Xfire 1.2 any other ideas ????

ccbtimewiz

Quote from: gamerhookup on August 13, 2008, 10:53:54 PM
Ok, after an hour or so and trying all the ideas in this posting. Nothing and I mean nothing other than deleting the mode all together.. I get the same errors.

I am running SMF 1.1.5, TP 1.05b and this happens on two different sites, one with default theme and 50 mods, and the other with only 12 mods.

Basically on both sites I get this exact same errors. there are no other errors on either site.

MYUSERNAME   Today at 10:48:36 PM 
0.0.0.0     0d74204f944039610dcf2db7f26a9555 
http://www.mydomain.net/index.php?action=profile;u=2 
8: Undefined index: xfire
File: /hermes/web07/b2331/pow.MYDOMAIN/htdocs/Themes/default/languages/TPShout.english.php (eval?)
Line: 230

In that Tpshout file, ther eis no line 230, there are only 20 lines in there.

Again, i have tried all the ideas in here and nothing has worked for either site.

Now this error only happens when any one whether is be guest or a member views a profile, and it does not have an xfire name in it, then it creates this error. Those with an xfire name works 100 percent!

Short of not using this mod Advanced Xfire 1.2 any other ideas ????


There is no line line 230 on that file because you have eval enabled.

In order to actually see where this error is coming from, you need to disable eval. Please open your phpmyadmin, and type this following command:

INSERT INTO smf_settings VALUES ('disableTemplateEval', 1);

Then paste to us the errors that come up.

Then reactivate eval once you finish by doing:

DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';

gamerhookup

Ok did all that and here are the errors, as well as my profile template php file if you need to look at it.

These are the errors on the one website. Fugre we can fix this and theother should be easy.

USERNAME   Today at 08:46:26 PM 
0.0.0.0     ded83cea674dae4b7189cc0f940db034 
http://www.mydomainname.com/index.php?action=profile;u=4 [nofollow] 
8: Undefined index: xfire
File: /home/content/n/t/h/nthrbiz/html/MYDOMAINNAME/Themes/default/Profile.template.php
Line: 305

USERNAME   Today at 08:46:26 PM 
0.0.0.0     ded83cea674dae4b7189cc0f940db034 
http://www.mydomainname.com/index.php?action=profile;u=4 [nofollow] 
8: Undefined index: xfire
File: /home/content/n/t/h/nthrbiz/html/MYDOMAINNAME/Themes/default/Profile.template.php
Line: 304

USERNAME Today at 08:46:26 PM 
0.0.0.0     ded83cea674dae4b7189cc0f940db034 
http://www.mydomainname.com/index.php?action=profile;u=4 [nofollow] 
8: Undefined index: xfire
File: /home/content/n/t/h/nthrbiz/html/MYDOMAINNAME/Themes/default/Profile.template.php
Line: 304


Sure hope that helps.... FYI, if I leave that error EVAL thing on, will that hurt anything. I like the way it give me the errors....

Let me know if oyu need anything else from me to figure this thig out..
THANKS!

ccbtimewiz


gamerhookup

Ok, well that did not help, now it has the same errors only this time it says lines 608 and 610 of the same  file...

Not sure if this will help. Here are the files in RAR that I have directly from server with your new profile.template.php

Hopefully you can see in these files if I screwed up anything. But to be real honest, until your xfire mod, everything has been automatic and no other errors till people without an xfire name views the profile page, then I get 3 errors for each view.

I am pretty good with code but this one stumps me.

ccbtimewiz

#53
Display.template.php

Find:
', $message['member']['yim']['link'],
<br />';


Replace with:
', $message['member']['yim']['link'], '
<br />';


Also, I edited your profile.template.php file like so:
</tr>';


// ccbtimewiz
# !!! Do these $txt[] validate correctly? If they are empty for some reason, we need to fill them!
if( $txt['xfire'] == '' ) $txt['xfire'] = 'XFire';
if( $txt['xfire_add'] == '' ) $txt['xfire_add'] = 'Add as Friend?';

// # Update to fix this bug. If guests view a profile, they can't view the xfire field!
if( ( $context['user']['is_logged']) && ( !$context['user']['is_guest'] ) ) {
echo '
<tr>
<td><b>', $txt['xfire'], ': </b></td>
<td><a href="http://profile.xfire.com/' . $context['member']['options']['xfire'] . '" target="_blank"><img src="http://miniprofile.xfire.com/bg/sh/type/1/', $context['member']['options']['xfire'] ,'.png" /></a>

<br /><a href="xfire:add_friend?user=' . $context['member']['options']['xfire'] . '">', $txt['xfire_add'], '</a></td>
</tr>'; }
// -------------------

echo '<tr>


Download the attached and see if that helps.

gamerhookup

Nope, now I get same 3 errors but on lines 613 and 615

Not sure if this helps, but I noticed in the profile.template.php  you stated guest view.. But I am logged in as a member and viewing and it give these errors. or any member that logs in and view a profile other than those that actually have an xfire.

I appreciate the work, I know how hard it is these days to get things working, I know there has to be a simple fix, well sorta...

Any other ideas>?

ccbtimewiz

Quote from: gamerhookup on August 14, 2008, 12:48:47 AM
Nope, now I get same 3 errors but on lines 613 and 615

Not sure if this helps, but I noticed in the profile.template.php  you stated guest view.. But I am logged in as a member and viewing and it give these errors. or any member that logs in and view a profile other than those that actually have an xfire.

I appreciate the work, I know how hard it is these days to get things working, I know there has to be a simple fix, well sorta...

Any other ideas>?

In your server configuration settings in the admin panel, are you set to using English and NOT utf8-english?

gamerhookup

yes i am using english only..

Also, there are no errors when a guest views it, only when a member views it.. I just checked.

ccbtimewiz

Quote from: gamerhookup on August 14, 2008, 12:53:08 AM
yes i am using english only..

Also, there are no errors when a guest views it, only when a member views it.. I just checked.

Then I have no clue.

Though you're showing me the profile.template.php of the theme you're using, yes? (If your theme doesn't have that file, then you show me the one located in the default theme).

gamerhookup

:)  Dang... That is the default theme... I am using the default theme and only changed the style.css file and the Tp.css file for colors...

But now on this other site, we are using the Diable 3 theme and it does the same exact thing.

I hate to stop using it because, our clan group wants it in the profiles..  ????

ccbtimewiz

The error is a php warning about a undefined index, which *should* be defined in the /languages directory.

Maybe the author of the mod will know more information about this. I'll attempt to write a patch for it in the mean time.

Advertisement: