[MODDB] Country Flags

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: [BETA] Country Flags

Post by jmaraujo »

It seems to work just by making a small fix in the includes/acp/acp_users.php file. Search this:

Code: Select all

                    //Begin: CountryFlag
                    'S_FLAG_OPTIONS'        => list_all_flags($user->data['user_id']),
                    //End: CountryFlag     
...and replace with:

Code: Select all

                    //Begin: CountryFlag
                    'S_FLAG_OPTIONS'        => list_all_flags($user_id),
                    //End: CountryFlag     
Is this correct? :oops:
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Hi Jamaraujo,

Yes that seems to fix that problem I'll update the Mod to reflect the change.

Nice One ! ;)
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Updated to version 1.0.1
Added contributions made by rageracer and jmaraujo, whose names have been added to the mod.

Anyone else wanting to add, edit or make this mod better than it already is then please feel free.
slh550
Registered User
Posts: 6
Joined: Mon Mar 09, 2009 12:45 pm

Re: [BETA] Country Flags

Post by slh550 »

Having an issue getting into the ucp profile tab after install , it shows a blank page with following error.

Code: Select all

Fatal error: Call to undefined function list_all_flags() in \includes\ucp\ucp_profile.php on line 507
line 507 is

Code: Select all

$s_flag_options = list_all_flags($user->data['user_id']);
I have tried to install this twice , redoing all the edits to try to check it was not me.

install.php was run and no errors where shown, i have all the flags showing in the acp, i just cannot open the profile tab in the user control panel.

Any ideas, many thanks in advance.
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

If you zip up all the files you've edited for the flags, I'll go through them for you, the line the error refers to is correct and as it should be.
Just give me a link to the zipped files, you can send the link in a PM or Email if you don't want it public.
You might want to check the edits n the UCP some are placed before and some are placed after the code to find, Just a thought.
slh550
Registered User
Posts: 6
Joined: Mon Mar 09, 2009 12:45 pm

Re: [BETA] Country Flags

Post by slh550 »

anybloodyid wrote:If you zip up all the files you've edited for the flags, I'll go through them for you, the line the error refers to is correct and as it should be.
Just give me a link to the zipped files, you can send the link in a PM or Email if you don't want it public.
You might want to check the edits n the UCP some are placed before and some are placed after the code to find, Just a thought.

Cheers buddy, I will zip them up just now and send you an email.
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [BETA] Country Flags

Post by Neuropass »

Hi there , great mod.

i just love it.

i wanted to ask you something.

I want to have the flag only on topic page. If i skip the edits for the memberlist.php and memberlist_view.html

files, should i be ok? or it will create conflict?



Another thing, How can it be added on registration page? that would be cool..



thanks in advance...
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Hi

Glad that you like the Mod and that it works for you.

I'm not a coder, I just adapted another mod to do what I wanted it to do with Country Flags.
So miss out the edits and see what happens, you can always go back if it doesn't work.

Have it on the registration page, yes it would be a good idea but you would have to get some one who knows more about coding and phpBB than i do. ;)
User avatar
Neuropass
Registered User
Posts: 1162
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [BETA] Country Flags

Post by Neuropass »

Cool thanks for your reply. i see if can set it up in registration page.

I was thinking it would be nice to have statistic kinda thing.. Like top 5 or something with the flags and the numbers of users under that specific country..

just food for thoughts . :P
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Nice ideas Neuro, as I've said anybody who wants to add to it please go ahead. ;) ;)
Khamosh-Saya
Registered User
Posts: 871
Joined: Fri Nov 23, 2007 6:46 am
Location: UAE
Name: Jamshed Ansari
Contact:

Re: [BETA] Country Flags

Post by Khamosh-Saya »

hi
i installed this mod
i m fcing the problem that i cant see the country flag in view topic
i can see in UCP
I can manage In Board Feature
i can Change flag in Uaer and Groupe
But i cant see in viewtopic not in memberlist
i check mine edited file 2 times
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Hi

Zip up the files that you have changed and let me have the link so that I can download them and I'll take a look at them. ;)

All working ;)

Glad to have been of help.
User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: [BETA] Country Flags

Post by jmaraujo »

Neuropass wrote:I was thinking it would be nice to have statistic kinda thing.. Like top 5 or something with the flags and the numbers of users under that specific country..
I did that modification, though I'm not a Coder so I'm not sure if my code is secure. It caches the results every 24 hours; also with a simple edit you can make it Top 5, Top 10, Top 20 or whatever number you want... ;)

I will PM Graham later with all the files and edits... In fact, is only one edit and two files (a php and a template). You have to upload a new thumbnail flags set to the images\flags\thumb folder.

My modification has a downside: It uses flag_id as flags filename (i.e. 1.jpg, 2.jpg, 3.jpg...) instead of any other recognizable name. Maybe Graham can help me with that... :oops:

Image

I use them on my index and portal sidebars (screenshot above), but you can put them wherever you want; below your who's online (screenshot below) or forum birthdays, for example.

Image
plamko
Registered User
Posts: 2
Joined: Wed Mar 24, 2010 7:49 pm
Name: Plamen Ruskov

Re: [BETA] Country Flags

Post by plamko »

Hello, is it possible to make a second box to choose? - Example: Favorite Country
User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Hi

At the moment the Mod is being considered for validation by the Mod team if successful I will see about adding new features in the next release. ;)
Locked

Return to “[3.0.x] MODs in Development”