CountryFlags

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

Previous topic - Next topic

Matthew Schenker

True Satan,
OK, I'll see you over in SMF Helper!  I thought I'd ask here first, where the modification is posted.  But I should have known that SMF Helper is the place to go!!
Thanks again,
Matt

TrueSatan

OK Matthew...the following link is the support topic there for the mod with the development code shown in postings there.

http://www.smfhelper.info/forum/index.php?topic=2121.0

Sabre™

Hi mate. :)

If I wanted to make one flag a gif, what would I need to add/change?
Or would it be easier just to make them all gif images?

Thank You
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


lonrot

Hi, I'm using Tiny Portal, and SMF 1.4

The mod installs fine, but then, after setting up the:
"Show flags on Display page (Where posts are shown)."

I realize that the flags won't show up as expected.
Any ideas?

Basie

Thanks a lot for this mod, I love it.

But in the next version PLEASE include an option to disable the country names! (so it only shows the flag). :)

brianjw

I uploaded the package to my SMF installation and get the message saying it's corrupt or something. Then, when I try to manually install via the Package Parser, that also says it's corrupt. Does anyone have a working version of the mod that is the latest version and works with 1.1.4?

Sabre™

#406
Hey there brian.

Yea mate, mine works fine without a hitch.
I have TP installed also, and have it workin ok on a custom theme.
I've found that I've had to re-grab the file a couple of times with different mods.
The file becomes corrupt through transfer.
Try grabbin it again if you havent already :)

Quote from: Sabre™ on February 24, 2008, 02:36:57 PMHi mate.
If I wanted to make one flag a gif, what would I need to add/change?
Or would it be easier just to make them all gif images?
Thank You

Any Ideas peeps?? :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


brianjw

Just thought I would point out with personal experience with tar.gz files and zip files. I have found zip files to be the best. For those having the same problem as me, use the zip file attached to this post instead of the tar.gz file. (the mod in the zip hasn't changed at all)

Sabre™

Anyone know how you could move the Country name to display beneath the flag, instead of along side it??
I have added animated gif images, and the names would sit better underneath them.

Thank You in advance :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


TrueSatan

Please see post #392 where I had already provided a newer version of the mod having taken it over with kind permission of original developer...redistributing old versions is not helpful! N.B. the new version nis also already in .zip format.

@ionrot...TP shouldn't affect this mod.

@sabre...it's better to leave all the images as .png files.

@seek2501...I've already given details of how to do what you want (though not from the ACP) in an earlier posting.


Sabre™

#410
Quote from: TrueSatan on March 05, 2008, 11:03:28 AM
@sabre...it's better to leave all the images as .png files.

Hi buddy.
May I ask why?
To me, the flags are basically a  "looks good"  thing. Visual flavour if you will.
And to me, this


looks alot better than this


But I know there is a good reason why youve stated the above, so could you enlighten a dull rag :)

Either way, do you see how I could put the country name under the flag.
It looks cleaner than out to the side.  imo

Thank You mate :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)



No.Body


Great mod. I love it!

Sabre™

To display the Country name beneath the flag, instead of beside it, change this code in your   display.template.php

// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['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 />';
}


To

// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.gif" alt="', $flags[$message['member']['options']['country']], '" /><br />
                        ', $flags[$message['member']['options']['country']], '<br />';
}
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


cellax

#414
I prefer this change:

On Display.template.php look for:
// Did they select a flag?
                        if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['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 />';
}


replace with:
// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['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']], '" title="', $flags[$message['member']['options']['country']], '" /><br /><br />';
}


as you can see, now the country name is showed as a tooltip when you go on with the mouse. I like this solution.

thx for this mod

Sabre™

Sounds good.
Do you have a link to where we can see/test it please. :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


cellax


Sabre™

#417
Hi cellax  :)
What is it Im looking for?
This is what Im seeing..

EDIT!!!
Scratch that, for some reason it didnt work for me. But then a simple refresh remedied the event lol

Looks great!!
Thank You for the share :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


FragaCampos

Hello there, and thank you a lot for this mod :)
I translated it to portuguese, and there are some countries that stayed out of order, ie, the list is not sorted due to the differences between the two languages, of course.
Question: is there a way to sort them out editing the files?

perplexed

Quote from: FragaCampos on April 20, 2008, 08:48:14 AM
Hello there, and thank you a lot for this mod :)
I translated it to portuguese, and there are some countries that stayed out of order, ie, the list is not sorted due to the differences between the two languages, of course.
Question: is there a way to sort them out editing the files?

if you have a look in the sources/ subs.php file you will find the list of countries there, and you can add or move some around

Advertisement: