Page 4 of 14

Re: [Beta] Country Flag User Edition

Posted: Fri Jan 23, 2009 2:24 pm
by hww
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?

Re: [Beta] Country Flag User Edition

Posted: Thu Jan 29, 2009 7:29 pm
by Shakall
same problem here whit cf_install.php
i cant make my sql :(

Re: [Beta] Country Flag User Edition

Posted: Thu Jan 29, 2009 7:50 pm
by Gremlinn
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...

Re: [Beta] Country Flag User Edition

Posted: Thu Jan 29, 2009 11:05 pm
by Shakall
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 ?

Re: [Beta] Country Flag User Edition

Posted: Wed Feb 11, 2009 12:25 pm
by Gremlinn
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).

Re: [Beta] Country Flag User Edition

Posted: Sat Feb 14, 2009 11:46 am
by naushadhassam
hey great mod again :)

wanted to know if all working well on 3.4
Thanks

Re: [Beta] Country Flag User Edition

Posted: Sat Feb 14, 2009 2:33 pm
by platinum_2007
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

Re: [Beta] Country Flag User Edition

Posted: Mon Feb 16, 2009 1:02 pm
by HCP
[ 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]

Re: [Beta] Country Flag User Edition

Posted: Mon Feb 16, 2009 2:01 pm
by Gremlinn
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).

Re: [Beta] Country Flag User Edition

Posted: Mon Feb 16, 2009 2:11 pm
by HCP
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:

Re: [Beta] Country Flag User Edition

Posted: Mon Feb 16, 2009 2:27 pm
by Gremlinn
Ah! That's why I didn't find it in my code. Glad to hear it's working now.

Re: [Beta] Country Flag User Edition

Posted: Fri Feb 27, 2009 1:20 pm
by rime
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

Re: [Beta] Country Flag User Edition

Posted: Fri Feb 27, 2009 5:51 pm
by Gremlinn
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?

Re: [Beta] Country Flag User Edition

Posted: Fri Feb 27, 2009 7:29 pm
by rime
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.

Re: [Beta] Country Flag User Edition

Posted: Fri Feb 27, 2009 7:53 pm
by Gremlinn
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.