[2.0.21] Country Flags MOD

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
26
57%
Very Good
8
17%
Good
5
11%
Fair
2
4%
Poor
5
11%
 
Total votes: 46

User avatar
drn
Registered User
Posts: 83
Joined: Tue Dec 05, 2006 11:32 am

Re: [2.0.21] Country Flags MOD

Post by drn »

I put in the feature, if works fine in the forum, but when I go to the administration panel, it isn't working in my user administration, there is only a blank spot, there where the flag should be, and in the text area, it says : can you tell me what I did wrong, or wich file I didn't get to alter right please..

I think it is the admin/admin_users.php file, because when I alter that one, I cant see the administrator menue

Oh I found out, and got it to work... in the admin_user.php
it says that this part:

// Country/Location Flags
// Query to get the list of flags
$sql = "SELECT *
FROM " . FLAG_TABLE . "
ORDER BY flag_name";
if(!$flags_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain flags information.", "", __LINE__, __FILE__, $sql);
}

// Build the html select statement
$flag_start_image = 'blank.gif';
$flag_select = '<select name="user_flag" onChange="document.images[\'user_flag\'].src = \'../images/flags/\' + this.value;">';
$flag_select .= '<option value="blank.gif">' . $lang['Select_country'] . '</option>';
while ( $flag_row = $db->sql_fetchrow($flags_result) )
{
$flag_name = $flag_row['flag_name'];
$flag_image = $flag_row['flag_image'];
$selected = ( $user_flag == $flag_image ) ? ' selected="selected"' : '';
$flag_select .= '&nbsp;&nbsp;&nbsp;<option value="' . $flag_image . '"' . $selected . '">' . $flag_name . '</option>';
if ( isset( $user_flag) && ($user_flag == $flag_image))
{
$flag_start_image = $flag_image;
}
}
$flag_select .= '</select>';

should be added after this: $form_enctype = ( !@$ini_val('file_uploads')

But when I do so it do not work, but if I put it in before that part, then it works fine...
Last edited by drn on Fri Sep 21, 2007 9:11 am, edited 4 times in total.
abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: [2.0.21] Country Flags MOD

Post by abs8 »

i got this error from my ACP when i clicked "flags"

Couldn't obtain flags data

DEBUG MODE

SQL Error : 1146 Table 'myforum_phpb2.FLAG_TABLE' doesn't exist

SELECT * FROM FLAG_TABLE ORDER BY flag_name

Line : 233
File : admin_flags.php

i dont know where to go since im new with this one. i dont understand this much. i followed this instructions but still didnt able to work...

ALTER TABLE phpbb_users ADD user_from_flag VARCHAR(25) NULL;

CREATE TABLE phpbb_flags (
flag_id INTEGER(10) NOT NULL AUTO_INCREMENT,
flag_name VARCHAR(50),
flag_image VARCHAR(25),
PRIMARY KEY (flag_id)


Thanks in advance for the help
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Re: [2.0.21] Country Flags MOD

Post by ycl6 »

Hi abs8,

Double check your changes for includes/constants.php mentioned in the install_en.txt file

~Mac
abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: [2.0.21] Country Flags MOD

Post by abs8 »

Hi Mac

I double checked the includes/constants.php and i got it right but the flags are in red x in my ACP...

what solution will i make with this one?

thanks
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Re: [2.0.21] Country Flags MOD

Post by ycl6 »

abs8 wrote:but the flags are in red x in my ACP...
Did the images showed up correctly in other pages, e.g. viewtopic, etc?

~Mac
abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: [2.0.21] Country Flags MOD

Post by abs8 »

no, its not on their profiles...its not everywhere except on my ACP but all the images are red "x"....
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Re: [2.0.21] Country Flags MOD

Post by ycl6 »

Please check you have uploaded the images to the right place.
What's the URL of your broken image? I think you can still copy the URL if you right click on it

~Mac
abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: [2.0.21] Country Flags MOD

Post by abs8 »

I messed up my forum with the mods that I have installed including this mod and cant upload avatar now...I get this error:



Warning: move_uploaded_file(./images/avatars/142141613146ffea7d00c00.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/mysite/public_html/mysite/includes/usercp_avatar.php on line 288

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phplhplq0' to './images/avatars/142141613146ffea7d00c00.jpg' in /home/mysite/public_html/mysite/includes/usercp_avatar.php on line 288

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/mysite/includes/usercp_avatar.php:288) in /home/mysite/public_html/mysite/includes/page_header.php on line 483

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/mysite/includes/usercp_avatar.php:288) in /home/mysite/public_html/mysite/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/mysite/includes/usercp_avatar.php:288) in /home/mysite/public_html/mysite/includes/page_header.php on line 486


Does anybody can help me how to fix this? Thanks alot.
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Re: [2.0.21] Country Flags MOD

Post by ycl6 »

Check your server's folder permission for ./images/avatars/
Should chmod it too 777

Please go to the Support forum for help

~Mac
abs8
Registered User
Posts: 27
Joined: Fri Jun 15, 2007 2:25 am

Re: [2.0.21] Country Flags MOD

Post by abs8 »

Thank you so much Mac :)
n00bstorm
Registered User
Posts: 481
Joined: Sun Jan 30, 2005 7:52 pm

Re: [2.0.21] Country Flags MOD

Post by n00bstorm »

How can I make a extra page where it will show how many members of each nation there is? Or like the top 10 nations with most users? Thx
:ugeek:
User avatar
B.W. Behling
Registered User
Posts: 84
Joined: Tue Dec 02, 2003 5:41 am
Location: Lenore, ID USA

Re: [2.0.21] Country Flags MOD

Post by B.W. Behling »

Any plans for a 3.0 version of this?
chery
Registered User
Posts: 95
Joined: Wed Mar 22, 2006 7:30 pm
Location: terra australia
Contact:

Re: [2.0.21] Country Flags MOD

Post by chery »

n00bstorm wrote:How can I make a extra page where it will show how many members of each nation there is? Or like the top 10 nations with most users? Thx
:ugeek:
Hey now that's a cute idea :)
Algazoth
Registered User
Posts: 1
Joined: Mon Mar 31, 2008 1:33 pm

Re: [2.0.21] Country Flags MOD

Post by Algazoth »

Hi, I really need some help...

This is the story; changed servers, copied the database, copied the forum, had to do some major fixing, got the forum working again. Except for one thing: the flagmod somehow isn't.

This is what I get when trying to view my profile:

Code: Select all

Couldn't obtain flags information.

DEBUG MODE

SQL Error : 1146 Table 'rexunited_com.phpbb_flags' doesn't exist

SELECT * FROM phpbb_flags ORDER BY flag_id

Line : 923
File : usercp_register.php
What do I do? Please help.
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Re: [2.0.21] Country Flags MOD

Post by ycl6 »

Check if the required database tables exist, or reapply the SQL queries if tables are missing

~Mac
Post Reply

Return to “[2.0.x] MOD Database Releases”