[RC] Country Flag User Edition

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!
Scam Warning
User avatar
hww
Registered User
Posts: 177
Joined: Tue Sep 30, 2008 2:52 pm
Location: Wollongong, N.S.W., Australia

Re: [Beta] Country Flag User Edition

Post by hww » Fri Jan 23, 2009 2:24 pm

Hi Gremlinn and Oddfish,

Is there any (simple) way to have certain countries listed at the top of the dropdown box?

The majority of my members come from the United States, the United Kingdom, Canada, France, Germany, South Africa, Australia, and New Zealand.

What I'd like to have is for the dropdown box to say:

Select your country flag
United States (us)
United Kingdom (uk)
Canada (ca)
France (fr)
Germany (de)
South Africa (za)
Australia (au)
New Zealand (nz)
----------
Afghanistan (af)
Aland Islands (ax)
Albania (al)
etc.
etc.

In other words, I'd like the most common countries (on my particular board) to appear at the top of the list, out of alphabetical order.

Would this be difficult to achieve?
Sorry for my English, but I am Australian. Forgive me please.

Shakall
Registered User
Posts: 21
Joined: Mon Jan 26, 2009 10:04 am

Re: [Beta] Country Flag User Edition

Post by Shakall » Thu Jan 29, 2009 7:29 pm

same problem here whit cf_install.php
i cant make my sql :(
Image

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Thu Jan 29, 2009 7:50 pm

Well, that rules out any fixes that oddfish and I have put in ;)

is the cf_install.php in a folder called install/ located at the forum root?

Let's see if I can find the raw SQL update...

Shakall
Registered User
Posts: 21
Joined: Mon Jan 26, 2009 10:04 am

Re: [Beta] Country Flag User Edition

Post by Shakall » Thu Jan 29, 2009 11:05 pm

Now its going but the next problem is when the users want to register they is a Dropdown menu for the flags but no one flag is there.
What can be the error ?
Image

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Wed Feb 11, 2009 12:25 pm

1) are the flag images in the correct place?
2) check the ACP flag modules and see if the flags are setup (install should have set them up).

naushadhassam
Registered User
Posts: 506
Joined: Wed Aug 15, 2007 9:57 pm
Contact:

Re: [Beta] Country Flag User Edition

Post by naushadhassam » Sat Feb 14, 2009 11:46 am

hey great mod again :)

wanted to know if all working well on 3.4
Thanks
Free Hosting - Here
Sports Entertainment Online ( A PS3 Online Gaming Community ) - Here
FREE UNLIMITED HOSTING FOR PHPBB MOD MAKERS - PM ME FOR MORE INFO ( MY WAY ON DONATING TO PHPBB )

platinum_2007
Registered User
Posts: 1101
Joined: Tue Jul 22, 2008 2:47 am
Location: Nova Scotia, Canada

Re: [Beta] Country Flag User Edition

Post by platinum_2007 » Sat Feb 14, 2009 2:33 pm

Wondering if you guys would tell me how to add this to another page? I wrote a mod and i think this would look great on it( i also use this on my forum) but i cant get it to work, i tried using the code from memberlist.php but had no luck.

Thanks :D

User avatar
HCP
Registered User
Posts: 172
Joined: Wed Jun 22, 2005 8:10 am
Location: Australia
Contact:

Re: [Beta] Country Flag User Edition

Post by HCP » Mon Feb 16, 2009 1:02 pm

[ Issue resolved, so just ignore this post ]

After installing nedka's Country Flags 1.0.1 mod, users who haven't selected a country flag and try to update other profile fields encounter the following error:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_profile.php on line 338: Undefined index: FLAG_ERROR
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3765: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3767: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3768: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3769: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184
So I tried to "fix" the error by removing the group flag edits according to the User Edition mod. Through the same process I first mentioned, I still get the same error. I haven't gone through the mod edits in UE's yet, but I think I recall you saying that the UE mod was the same as nedka's, but without the group flags feature.

I have purged the cache and checked for any blank lines before the PHP tags, but the error message still insists showing up. How do I get rid of it and fix the bug?[/color]
Last edited by HCP on Mon Feb 16, 2009 2:13 pm, edited 1 time in total.

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Mon Feb 16, 2009 2:01 pm

naushadhassam: Yes it works fine with 3.0.4

platinum_2007:
Here are some of the things you may need on your other page. You will need to include includes/functions_display.php to get the get_user_flag function.

Used these in viewtopic.php

Code: Select all

// Grab country flags
$flags = $cache->obtain_flags();


			get_user_flag($row['user_flag'], $user_cache[$poster_id]['flag_country'], $user_cache[$poster_id]['flag_code'], $user_cache[$poster_id]['flag_img'], $user_cache[$poster_id]['flag_img_src']);


		'FLAG_COUNTRY'		=> $user_cache[$poster_id]['flag_country'],
		'FLAG_CODE'			=> $user_cache[$poster_id]['flag_code'],
		'FLAG_IMG'			=> $user_cache[$poster_id]['flag_img'],
		'FLAG_IMG_SRC'		=> $user_cache[$poster_id]['flag_img_src'],
This displays the flag in the viewtopic_body.html

Code: Select all

		<!-- IF postrow.FLAG_IMG --><dd><strong>{L_COUNTRY}:</strong> {postrow.FLAG_IMG}</dd><!-- ENDIF -->
You can simplify things if you select the user's data from the database and then supply the arguments for get_user_flag without the cache information. But, beware of database performance if you are hitting the database a lot.

HCP: It mentions an undefined index "FLAG_ERROR". And, I can't see that in the any phpbb code (including Country Flag).

User avatar
HCP
Registered User
Posts: 172
Joined: Wed Jun 22, 2005 8:10 am
Location: Australia
Contact:

Re: [Beta] Country Flag User Edition

Post by HCP » Mon Feb 16, 2009 2:11 pm

Gremlinn wrote:HCP: It mentions an undefined index "FLAG_ERROR". And, I can't see that in the any phpbb code (including Country Flag).
I have fixed the error. There may have been a bug in one of nedka's mod edits, but I looked through yours and found out that FLAG_ERROR was supposed to be replaced with TOO_SHORT_FLAG in includes/ucp/ucp_profile.php.

In other words, just ignore what I posted. Thanks! :lol:

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Mon Feb 16, 2009 2:27 pm

Ah! That's why I didn't find it in my code. Glad to hear it's working now.

User avatar
rime
Registered User
Posts: 17
Joined: Wed Nov 19, 2008 5:15 pm
Location: Poland
Contact:

Re: [Beta] Country Flag User Edition

Post by rime » Fri Feb 27, 2009 1:20 pm

phpBB 3.0.4
PHP 5.2.8
MySQLi 5.0.67

installed mods:
Prime Warnings
phpBB3 Chat MOD 0.2.1
Country Flags user edition

default style: bo2soft
prosilver i subsilver2 deactivated

Hi, At first Ive installed country flags 1.0 mod, but chosen flag at user refistration is not sending to database. So users have to manually set flag in user control panel. Then i prepare files to install CFUE 1.0.1, sended all to server, run installation -> it changed data type in column users->flags varchar 30 to varchar 2. But, after that, anyone can access ACP and chosen flag in registration still doesnt work. All CF moduls in ACP are enabled. Whats the problem ?

Image
Image
my cfue files http://www4.zippyshare.com/v/72996587/file.html

PS. Sorry for my english :x

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Fri Feb 27, 2009 5:51 pm

The column width was unnecessarily large. The values stored in the field were only two character country abbreviations. User's being able to access the ACP is strange. Have you cleared the site cache and refreshed the style?

Did you remove the original country flag mod before adding this one or did you follow update instructions? Did you upload the files from this mod and replace any from the original mod?

User avatar
rime
Registered User
Posts: 17
Joined: Wed Nov 19, 2008 5:15 pm
Location: Poland
Contact:

Re: [Beta] Country Flag User Edition

Post by rime » Fri Feb 27, 2009 7:29 pm

Gremlinn wrote:Have you cleared the site cache and refreshed the style?
yep, and "Recompile stale style components:" is ON
Gremlinn wrote:Did you remove the original country flag mod before adding this one or did you follow update instructions?
I did CFUE installation on "clear" phpbb3 & bo2soft style files. and then...
Gremlinn wrote:Did you upload the files from this mod and replace any from the original mod?
...uploaded it + cf_install.php run

Now I'm really confused, so I decide to try it on new,clear phpbb + bo2soft installation.

User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Re: [Beta] Country Flag User Edition

Post by Gremlinn » Fri Feb 27, 2009 7:53 pm

Let me know if it works the second time. Be careful to add before or after as instructed. About the only thing I can suggest at the moment.

If oddfish is around, maybe he might have another thought.

Locked

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