[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
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Sat Jun 02, 2007 3:53 pm

Hi again Mac,

It works normally on my localhost, everything is ok, but only in my forum I get the error I described you.

Maybe it's because of my viewtopic.php (shall I send it to you) ? i don't think so, or maybe because I've got other MODs?

BTW, I've dropped all the changes, I will re-try again tomorrow. I don't think it's going to work but don't know, I will give it another try.

Oh wait, I didn't upload all the flags since my upload connection is slow, does it matter? maybe because of that?
No more spambots for phpBB2 and phpBB3.

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

Re: [2.0.21] Country Flags MOD

Post by ycl6 » Sun Jun 03, 2007 7:50 am

I'm not sure what could be the problem, but of course, make sure the images are uploaded correctly ;)

And, does your local demo version have similar database content?

I doubt sending me the file will help because it works on your localhost. If the DB aren't the same, you might want to try using same DB on your localhost too and check if the MOD works.

~Mac

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Sun Jun 03, 2007 11:43 am

ycl6 wrote:And, does your local demo version have similar database content?
In my forum, I've only updated the installation script manually, I've renamed le.gif to lb.gif and didn't upload all the flags, apart from that everything else is the same. I will try the DB on my localhost and tell you what will happen.
No more spambots for phpBB2 and phpBB3.

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Sun Jun 03, 2007 3:12 pm

Hi Mac,

Forget about restoring the backup, it didn't work so I've decided to give it another final try on my locahost, I've created a new database and forum and set everything. I've run first db_update_en.php, then manually I've updated the files, expect the admin related files and viewtopic)

Now, I've updated viewtopic.php, strange but now I get the error I told you about! ("No posts exist for this topic" will appear if a topic at least contains one post made by a user who hasn't selected his or her country).

Then, I've dropped all the SQL updates and re run db_update_en.php and now it works normally!

Maybe it's strange, but you could try it by yourself!

I will tomorrow do the same steps on my forum, hope this time it's going to work! 8-).
No more spambots for phpBB2 and phpBB3.

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Mon Jun 04, 2007 1:20 pm

Didn't work! Same error!

I think I will not install this MOD anymore :(.

regards,

jalal
No more spambots for phpBB2 and phpBB3.

User avatar
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 » Tue Jun 05, 2007 3:45 pm

ycl6 wrote:
chery wrote:The update files work for the profile but somehow stuff up my memberlist so that it shows only one member per page?
Okey, I found the problem

OPEN

memberlist.php

FIND

Code: Select all

		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'No_such_flag');
		}

		if ( $flagrow = $db->sql_fetchrow($result) )
REPLACE WITH

Code: Select all

		if ( !($flagresult = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'No_such_flag');
		}

		if ( $flagrow = $db->sql_fetchrow($flagresult) )
~Mac
Thank you SO much - perfect fix !!!

junks2001
Registered User
Posts: 16
Joined: Sun Sep 12, 2004 8:04 am

Re: [2.0.21] Country Flags MOD

Post by junks2001 » Wed Jun 27, 2007 5:39 am

I'm getting this error when I go into admin. :shock:

Code: Select all

Parse error: parse error, unexpected T_VARIABLE in /phpBB2/admin/admin_users.php on line 2243
Here's the code on that line.

Code: Select all

$sql = "SELECT *
This is the full snippet.

Code: Select all

		// 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>';

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Re: [2.0.21] Country Flags MOD

Post by Quuipo » Tue Jul 03, 2007 4:56 pm

is it possible to display the name of the country next to the flag instead of just the flag image?

if so, how? :)

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Tue Jul 03, 2007 5:03 pm

Quuipo wrote:is it possible to display the name of the country next to the flag instead of just the flag image?

if so, how? :)
ycl6 wrote:
chery wrote::?: I would like to change the mouseover text from the flag_image to the flag_name - is this possible and what files would I have to edit please?
The new version hasn't made it to the MODDB, but is available on sourceforge

Code: Select all

## MOD Version: 2.3.3

##   2006-09-24 - Version 2.3.3
##	- Display country name instead of flag name when hover over flag image
~Mac
No more spambots for phpBB2 and phpBB3.

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Re: [2.0.21] Country Flags MOD

Post by Quuipo » Tue Jul 03, 2007 5:20 pm

jalaln wrote:
Quuipo wrote:is it possible to display the name of the country next to the flag instead of just the flag image?

if so, how? :)
ycl6 wrote:
chery wrote::?: I would like to change the mouseover text from the flag_image to the flag_name - is this possible and what files would I have to edit please?
The new version hasn't made it to the MODDB, but is available on sourceforge

Code: Select all

## MOD Version: 2.3.3

##   2006-09-24 - Version 2.3.3
##	- Display country name instead of flag name when hover over flag image
~Mac
thank you, but i don't mean on mouse over but as text next to the flag image.

so it shows the flag, and next to it written the country name. i don't know how to retreive that from the database and have it displayed in viewtopic.

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [2.0.21] Country Flags MOD

Post by jalaln » Tue Jul 03, 2007 5:23 pm

Are you using 2.3.3 or 2.3.2?
No more spambots for phpBB2 and phpBB3.

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Re: [2.0.21] Country Flags MOD

Post by Quuipo » Tue Jul 03, 2007 5:30 pm

actually i'm using the logos! adaptation from this by Renegade88 , but i can't find the topic neither the mod anymore :/

i have looked in the new flag code and i saw it uses the alt text, so i can make it so it displays as normal text (right?)

but i don't have much use for that right now since the logo mod uses other code for that :/

the logo mod query in viewtopic.php is this:

Code: Select all

$poster_logo = ( $postrow[$i]['user_logo'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? "<img src=\"" . $phpbb_root_path . "images/logos/" . $postrow[$i]['user_logo'] . "\" border=\"0\"  width=\"23 \" height=\"16\"  />" : "<img src=\"" . $phpbb_root_path . "images/logos/default.gif\" border=\"0\" width=\"23 \" height=\"16\" />";
i tried this

Code: Select all

$poster_logo_name = ( $postrow[$i]['user_logo_name'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? $lang['logo_name'] . ': ' . $postrow[$i]['user_logo_name'] : '';
but i have actually no clue ;p

the logo_name is in there somewhere because it puts it in the database and the user selects it when selecting their image, but it only displays the image and not the name.

INSERT INTO phpbb_logos (logo_id, logo_name, logo_image) VALUES ('','NFL: Arizona Cardinals', 'ari.gif');

i know this is the wrong topic, but i hope someone can help me :D

User avatar
DvGamer
Registered User
Posts: 18
Joined: Mon Jan 06, 2003 1:12 am
Location: Canada
Contact:

Re: [2.0.21] Country Flags MOD

Post by DvGamer » Sun Jul 08, 2007 3:02 pm

Hey I need some help with this MOD

I installed it using Easymod, it says everything went well, now I come to this page:

Code: Select all

'Do it yourself' instructions need to be executed by you manually, EasyMOD can not perform these actions

    * Method 1: Copy root/install/db_update_en.php to install/db_update_en.php. Execute and delete after it has been run
    * Method 2: Use EasyMOD to run contrib/install/db_update_en.txt
    * Method 3: Copy the SQL query from contrib/install/db_update_en.txt and execute it manually
1- When I open the MOD and look int the root directory, it doesn't have an install folder, it only has Admin, Images, Templates
2- How do I run contrib/instal/db_update_en.txt on Easymod?

Now, I seem to get these errors:

Code: Select all

Could not obtain post/user information.

DEBUG MODE

SQL Error : 1054 Unknown column 'u.user_from_flag' in 'field list'

SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_from_flag, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid FROM phpbb_posts p, phpbb_users u, phpbb_posts_text pt WHERE p.topic_id = 67 AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time ASC LIMIT 0, 15

Line : 400
File : viewtopic.php
And when I click on USER CP

Code: Select all

Couldn't obtain flags information.

DEBUG MODE

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

SELECT * FROM phpbb_flags ORDER BY flag_name

Line : 952
File : usercp_register.php
 
Help is appreciated, I've never worked with a MOD before, thanks. :!:
Image

User avatar
DvGamer
Registered User
Posts: 18
Joined: Mon Jan 06, 2003 1:12 am
Location: Canada
Contact:

Re: [2.0.21] Country Flags MOD

Post by DvGamer » Sun Jul 08, 2007 4:27 pm

Bump, anyone?
Image

User avatar
DvGamer
Registered User
Posts: 18
Joined: Mon Jan 06, 2003 1:12 am
Location: Canada
Contact:

Re: [2.0.21] Country Flags MOD

Post by DvGamer » Sun Jul 08, 2007 5:43 pm

Ok I got it to work:)

Now, I also installed the CPanel Mini which gives the USER CP a different look.. but when you go to it, you cant select your country, only when you register
How do I add this?
Image

Post Reply

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

Who is online

Users browsing this forum: No registered users and 12 guests