News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

CountryFlags

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

Previous topic - Next topic

TrueSatan

 Thanks...answer given on that link. BTW it would probably have been as well to have asked here as it isn't really a new mod you are requesting.

ajg

thanks for the reply truesatan.  fyi, i just made an official request at smfhelper.info

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

cheers!

samames

#362
please see attached image for a screen shot of the issue I am facing.
For some reason, when I use the the 'Apollo BB' theme, the "Country" title (on the profile summary page) before the ":" is not visible. Please can somebody tell me what I need to change to fix this issue? And Which file it's in?
Thank you in advance :)
Firefox 3 user. Mac user. Pc user.

samames

Okay, I decided to re-install the mod, so i uninstalled, deleted and then installed the latest version. However this had no affect on the issue I am facing. Though now when i go into my original theme where it was previously working fine i get a load of errors at the top (see screen shot).
please tell me how to make this mod properly functional on my board [as it was previously]
thanks :)
sam
Firefox 3 user. Mac user. Pc user.

TrueSatan

The problem is in your Modifications.english.php in your theme language directory (or if your theme does not have that file it will use the file from the SMF Default theme.)

The file must have ?>...once only and at the end of the file on a line of its own.

Your file appears to have that code before the lines that show at the top of your scren and not at the end...move it to make the placement correct and all should be well.

samames

Thanks for the quick response, that's helped me fix the issue on my original theme where the error was appearing at the top. :)
However I am still facing the first issue I posted about:
Quote from: samames on October 06, 2007, 08:21:33 PM
please see attached image for a screen shot of the issue I am facing.
For some reason, when I use the the 'Apollo BB' theme, the "Country" title (on the profile summary page) before the ":" is not visible. Please can somebody tell me what I need to change to fix this issue? And Which file it's in?
Thank you in advance :)
Please help :).
Firefox 3 user. Mac user. Pc user.

TrueSatan

Oh how I hate custom themes! It looks like your custom theme's Modifications.english.php file lacks at least one of the lines the mod seeks to add...specifically $txt['country_flag'] = 'Country';

perro88

how about make a countryflag appear at the memberlist page and a option search by country on the memberlist too.?
that would be dificult?

Jade Elizabeth

there is such a thing
check the mod list
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

perro88

Quote from: Alundra on October 21, 2007, 02:34:55 AM
there is such a thing
check the mod list
well I think the mod is about location and not country. probably will be easy to change that code to show the country flag and not the location. And the search would be nice too :D

mickyjanny

i cant download the mode why?

can any one tell me what can i do to download any mod from this site

TrueSatan

Firstly this would appear to be a query that is off topic...it isn't specific to this mod. Secondly you don't say if you are trying to go to the mods pages with your browser or using your forum system for the download...in any event please post to the correct area and somebody may resolve the matter for you.

perro88

What code I need to change to delete a country option and his flag, and to add a new country and his flag? thanks

TrueSatan

You would need to edit the array this mod adds to Subs.php and to add the new flag to the flags directory.

Sincere

Hello Jay,

During the installation, the mod gives a warning about possible big problem, simply because it cannot find the file
./Themes/babylon/Display.template.php


which is very understandable if you deleted the Babylon style and don't want it.


The mod must querry the DB first to see which styles are installed ;)
Do you need a special mod for your smf forums? contact me for a quote.

TrueSatan

#375
@ Sincere

With Jay's agreement I've taken over this mod.

The database doesn't need to be queried and you seem to be misunderstanding the normal install process of mods. The errors this mod reports if the Babylon theme is deleted is perfectly proper and correct...the mod is doing as it should. If you deleted the Babylon theme you should expect to see errors from mods that try to install into it...this isn't the only mod that will throw such errors and they are a normal consequence of deletion of the Babylon or Classic theme from an installation.

ajg

hi truesatan,

is it possible to hide the country name.  i only want to display the flag in the profile and post area.

tia

TrueSatan

@ alving

Yes, certainly Tia...

In Profile.template.php find:

</tr><tr>
<td><b>', $txt[227], ':</b></td>
<td>', $context['member']['location'], '</td>
</tr><tr>
<td><b>', $txt['country_flag'], ':</b></td>
<td>';

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

echo '
</td>
</tr><tr>


...and change it to:

</tr><tr>
<td><b>', $txt[227], ':</b></td>
<td>', $context['member']['location'], '</td>
</tr><tr>
<td><b>', $txt['country_flag'], ':</b></td>
<td>';

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

echo '
</td>
</tr><tr>
<td><b>', $txt['local_time'], ':</b></td>
<td>', $context['member']['local_time'], '</td>
</tr><tr>';


In Display.template.php find:


// 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 />';
}


...and change it 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'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']], '<br /><br />';
}


Those changes should do as you requested.

Sincere

oops.

yes, I learned something new today  ::)

I appreciate the shared information about how the mod is supposed to work.

I still believe the error message should not be as strong as it is right now when it has no negative effect whatsoever neither on the correct installation and fuction of the mod, nor on the core script or its DB
Do you need a special mod for your smf forums? contact me for a quote.

ajg


Advertisement: