News:

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

Main Menu

CountryFlags

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

Previous topic - Next topic

BaghdadGhost

Quote from: BaghdadGhost on December 20, 2011, 02:56:00 PM
2.0.1 and yes it is not showing at all and forgot to mention that without it I was able to register a new user.


don't know if others also experiencing the same problem?

great job,


I just installed the new version and it solved the above referred problem.


thanks again

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vinzbomb

Quote from: vbgamer45 on December 22, 2011, 11:29:13 PM
Updates:
12/23/2011 v2.0
!Fixed for SMF 2.0 selecting flag on registration was not saving.
!Added some alt tags for SMF 2.0 version

ok thanks works great now
vbgamer your are the best   ;)

smitch6

i just deleted the old version and tried to upload and install the new one
i'm using the latest V of smf and bang my whole site went down
i gather this new package doesn't like the latest version of smf?????

or do i have to manually edit files to get this to work?

thanks
Friendly, reliable web hosting at affordable prices
www.normanboatforum.co.uk l www.PatTesterSuffolk.co.uk

BaghdadGhost

Quote from: smitch6 on December 24, 2011, 07:10:07 PM
i just deleted the old version and tried to upload and install the new one
i'm using the latest V of smf and bang my whole site went down
i gather this new package doesn't like the latest version of smf?????

or do i have to manually edit files to get this to work?

thanks

was there any errors during installation?

smitch6

i managed to get it working with no errors now
but........

now everyone has 2 flags on their profile lol :) oops

how do i remove that pls?
Friendly, reliable web hosting at affordable prices
www.normanboatforum.co.uk l www.PatTesterSuffolk.co.uk

BaghdadGhost

it means you have two of the same code.

if the duplication in profile then in ./Themes/default/Profile.template.php you should find and delete


         // Always fun - select boxes!
         elseif ($field['type'] == 'select')
         {
            if ($key == 'country_flag')
            {
               echo '
                        <script type="text/javascript" language="JavaScript">
                           function show_country_flags()
                           {
                              document.images.flags.src = document.forms.creator.country_flag.options[document.forms.creator.country_flag.selectedIndex].value != \'\' ? \'' . $settings['images_url'] . '/flags/\' + document.forms.creator.country_flag.options[document.forms.creator.country_flag.selectedIndex].value + \'.png\' : \'' . $settings['images_url'] . '/flags/blank.gif\';
                           }
                        </script>
                        <select name="', $key, '" id="', $key, '" onchange="show_country_flags()">';
                       
                     foreach ($field['options'] as $value => $name)
                        echo '
                           <option value="', $value, '" ', isset($context['member']['country_flag']) &&  $context['member']['country_flag'] == $value ? 'selected="selected"' : '', '>', $name, '</option>';
                     
                     echo '
                        </select>
                        <img id="flags" src="', $settings['images_url'], '/', isset($context['member']['country_flag']) && !empty($context['member']['country_flag']) ? 'flags/' . $context['member']['country_flag'] . '.png': 'blank.gif', '" width="25" height="15" alt="" align="top" />';   
            }
            else
            {
               echo '
                     <select name="', $key, '" id="', $key, '">';

            if (isset($field['options']))
            {
               // Is this some code to generate the options?
               if (!is_array($field['options']))
                  $field['options'] = eval($field['options']);
               // Assuming we now have some!
               if (is_array($field['options']))
                  foreach ($field['options'] as $value => $name)
                     echo '
                        <option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
            }

            echo '
                     </select>';
         }
         }



if the duplication in mini profile near the avatar then in ./Themes/default/Display.template.php look for and delete



// Show the country they hail from!
if (isset($message['member']['country_flag']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['country_flag']))
{
$flags = country_flags();
echo '
<li class="gender">', $txt['country_flag'], ': <img src="', $settings['images_url'], '/flags/', $message['member']['country_flag'], '.png" alt="', $message['member']['country_flag'], '" title="', $flags[$message['member']['country_flag']], '" /></li>';
}

smitch6

kool thanks Bag :)
worked a treat i'm back to 1 flag again now

lets wait and see when a new member joins now wether they have a flag on their profile now

thanks again
Friendly, reliable web hosting at affordable prices
www.normanboatforum.co.uk l www.PatTesterSuffolk.co.uk

BaghdadGhost

I already watched some new members and it does show their flag.  :)



Ventic

Quote from: BaghdadGhost on December 25, 2011, 07:03:44 PM
I already watched some new members and it does show their flag.  :)
yes it works :D

ddabcd277

#1030
Hello,

I have installed the latest version of country flags 2.0 but the problem with Undefined index: country_flag_ask still appears in forum errors log. Here what I have:

Quotehttp://www.myforum.bg/index.php?action=register
8: Undefined index: country_flag_ask
File: /home/www/myforum.com/www/Themes/default/GenericControls.template.php (eval?)
Line: 212

QuoteType of error: Undefined

I have attached the GenericControls.template.php

tank_fv101

Hello all,

I hope you can help with an error I have on my forum with this mod.  I'm using 2.0.2.

When members have had a look at the selection of flags in their profile, but decided not to choose one, it would come up with "Country" under their avatar and a broken picture called 00.png   So, as a temporary measure to make it look nicer I created a 00.png which is transparent and uploaded (as the file didn't even exist).  I'm not sure why choosing a blank option should select a picture?

Can anyone help with the "Couuntry" not appearing, and also the picture not appearing as well.

Thanks for your time.

BaghdadGhost

I have had this problem before and uploaded an image of my own. it should make sense to other using this one cuz they did not want to declare their country of origin.


see attachment.


tank_fv101

Thanks BaghdadGhost.  I've already sorted the image out for myself, but what I would like is for the 'Country' to disappear from the info area - under the users avatar - if a user doesn't select a country.  It seems silly to have to have it there if somebody doesn't select anything. :-\  I can understand it if a forum wants to force users to declare their country, but my forum doesn't want to do that.   :laugh:

BaghdadGhost

btw, what version of the mod did you install? was it the most updated one

tank_fv101


ApplianceJunk

When I try to uninstall CountryFlags 1.1.2 so I can install 1.1.3 I see this...

Quote3.   Execute Modification   ./Sources/ManageSettings.php   Test failed

I'm running SMF 2.0.2

BaghdadGhost

Quote from: ApplianceJunk on December 31, 2011, 11:54:47 PM
When I try to uninstall CountryFlags 1.1.2 so I can install 1.1.3 I see this...

Quote3.   Execute Modification   ./Sources/ManageSettings.php   Test failed

I'm running SMF 2.0.2

its because you installed another mod after this one.


in the same file try to find



'',
// Show flags
array('select', 'country_flag_ask', array($txt['country_flag_disabled'], $txt['country_flag_profile'], $txt['country_flag_registration'], $txt['country_flag_both'])),
array('check', 'country_flag_required'),
array('check', 'country_flag_show'),


and remove it manually



mikedijital

I installed this on 2.0.2 and all the code is right were it should be. the admin features, and selection drop down in profiles works fine.... no flags show up on the mini profile in posts....  the code is there... just not translating from back end to front... can someone help

Zuća

Please change "Serbia and Montenegro" to "Serbia" and change images

Advertisement: