News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

CountryFlags

Started by SMFHacks.com Team, August 14, 2006, 01:07:43 PM

Previous topic - Next topic

Gary

Your theme probably has its own Display.template.php

-AwwLilMaggie
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

mforum

Quote from: AwwLilMaggie on August 20, 2006, 06:41:18 AM
Your theme probably has its own Display.template.php

-AwwLilMaggie

My theme is the Default theme of 1.1.rc2    :o

Assistance

uninstall then re install

maybe something didnt take
~playing poker~

mforum

this is the part of my Display.template.php

// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($context['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';
}

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';


it should work, i just dont get it  ???  ::)  :-\

Assistance

yours

// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($context['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';
}



from the install file
// Did they select a flag?
if(isset($context['member']['options']['country']))
{
$flags = CountryFlag();
echo
$flags[$context['member']['options']['country']] . ' <img src="', $settings['default_theme_url'], '/images/flags/', $context['member']['options']['country'], '.png" alt="Country" />';
}



try the above see if that works
~playing poker~

ArkServer

Quote from: K_4_kelly on August 19, 2006, 04:00:12 AM
to be honest, I almost installed all the mods been created and shared by you... hehe I like your mods very much, cos it always have a very good and systematic setting/contro panel

Agree, he can create nice mods  :P

mforum

Quote from: Assistance on August 20, 2006, 07:34:29 AM
yours

// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($context['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';
}



from the install file
// Did they select a flag?
if(isset($context['member']['options']['country']))
{
$flags = CountryFlag();
echo
$flags[$context['member']['options']['country']] . ' <img src="', $settings['default_theme_url'], '/images/flags/', $context['member']['options']['country'], '.png" alt="Country" />';
}



try the above see if that works

I used your code but didnt work, same thing still dont show on post  :(

i ckecked install file it changes the code i had in the first place  ???  :(  ::)

JayBachatero

mforum use the code that you had to beguin with.  The last code will give an error if users select blank as their flag.  Did you check the settings in Admin > Features and Options > Last one.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Assistance

#48
so the installer is wrong?

here is my error now with the above code
( been having problems with this mod actually so i turned it off )

Fatal error: Call to undefined function: countryflag() in
/public_html/smf/Sources/Load.php(1614) : eval()'d code on line 1463

Ask for country flag on: Profile
Require a member to select a location? unchecked
Show flags on Display page (Where posts are shown). checked
~playing poker~

JayBachatero

You are missing the changes on Subs.php.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Assistance

~playing poker~

mforum

Quote from: Jay The Code Monkey on August 20, 2006, 09:39:18 AM
mforum use the code that you had to beguin with.  The last code will give an error if users select blank as their flag.  Did you check the settings in Admin > Features and Options > Last one.

Yes, to show in posts is checked  :'(

JayBachatero

Umm do you have any errors in error log?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

mforum


JayBachatero

Umm can you please PM me a test admin account?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

mforum


JayBachatero

#56
Fixed. 

For those of you that have this problem just change

if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($context['member']['options']['country']))

to

if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['options']['country']))
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

mforum

I did that with no lack  :'(  :'(  :'(

JayBachatero

Meh I had it fixed on your board.  Should be good now.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

mforum

YES its perfect now, THANKS  :)

Advertisement: