Country Flag User Edition

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

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
JT2010
Registered User
Posts: 8
Joined: Mon Feb 15, 2010 8:43 pm

Re: Country Flag User Edition

Post by JT2010 »

TO : modernist

Can you give me one copy to me ?
"Country Flag User Edition" for 3.0.7-pl1
User avatar
modernist
Registered User
Posts: 79
Joined: Mon Mar 15, 2010 9:13 pm
Location: Klopstokia

Re: Country Flag User Edition

Post by modernist »

I used the download on the first page: http://www.phpbb.com/mods/db/download/14325/

Are you sure you edited and copied all files according to the XML?
"It ain't a fit night out for man or beast."
User avatar
Steve
Registered User
Posts: 1092
Joined: Tue Apr 07, 2009 7:48 pm
Location: UK ,up north!!
Name: Steven Clark
Contact:

Re: Country Flag User Edition

Post by Steve »

Just tested this on version 3.0.7-PL1 fresh install, and enabled debug ,get the error below ,in viewtopic,memberslist,ucp.php etc etc

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1303: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1304: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4290: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4292: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4293: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4294: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

Re: Country Flag User Edition

Post by oddfish »

thanks modernist.
vectra-mods wrote:Just tested this on version 3.0.7-PL1 fresh install, and enabled debug ,get the error below ,in viewtopic,memberslist,ucp.php etc etc

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1303: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1304: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4290: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4292: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4293: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4294: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
argh!!. thanks vectra-mods. yes, the MOD team changed it for the release and I'd say they thought the path was to the config.php instead of the phpbb_config table set in the ACP. !!

please change the edit to includes/functions_display.php to the following :

Code: Select all

/**
* Get user country flag
*
* @param int $user_flag the current stored users country flag id
* @param string &$flag_country the country name will be stored here after execution
* @param string &$flag_code the country code will be stored here after execution
* @param string &$flag_img the country flag image as full img tag is stored here after execution
* @param string &$flag_img_src the country flag image source is stored here after execution
*
*/
function get_user_flag($user_flag, &$flag_country, &$flag_code, &$flag_img, &$flag_img_src)
{
    global $flags, $config;

    if (empty($flags))
    {
        global $cache;
        $flags = $cache->obtain_flags();
    }

    if (!empty($user_flag))
    {
        $flag_country = (isset($flags[$user_flag]['country'])) ? $flags[$user_flag]['country'] : '';
        $flag_code = (isset($flags[$user_flag]['code'])) ? $flags[$user_flag]['code'] : '';
        $flag_text = $flags[$user_flag]['country'] . ' (' . $flags[$user_flag]['code'] . ')';
        $flag_img = (!empty($flags[$user_flag]['image'])) ? '<img src="' . $config['flags_path'] . '/' . $flags[$user_flag]['image'] . '" alt="' . $flag_text . '" title="' . $flag_text . '" />' : '';
        $flag_img_src = (!empty($flags[$user_flag]['image'])) ? $config['flags_path'] . '/' . $flags[$user_flag]['image'] : '';
    }
} 
Last edited by oddfish on Wed Mar 17, 2010 5:28 pm, edited 3 times in total.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

Re: Country Flag User Edition

Post by oddfish »

Redy wrote:Oh God...this is a disaster ... the style revolution is not on version 3.0.6 and there is no update, so I choose a different style and set it on my MODs, etc., just for one MOD with the flags? This is not a way fix this bug otherwise? :shock:
You want this MOD changed for an outdated style?

That will not happen today.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
User avatar
Steve
Registered User
Posts: 1092
Joined: Tue Apr 07, 2009 7:48 pm
Location: UK ,up north!!
Name: Steven Clark
Contact:

Re: Country Flag User Edition

Post by Steve »

oddfish wrote:thanks modernist.


argh!!. thanks vectra-mods. yes, the MOD team changed it for the release and I'd say they thought the path was to the config.php instead of the phpbb_config table set in the ACP. !!

please change the edit to includes/functions_display.php to the following :

Code: Select all

/**
* Get user country flag
*
* @param int $user_flag the current stored users country flag id
* @param string &$flag_country the country name will be stored here after execution
* @param string &$flag_code the country code will be stored here after execution
* @param string &$flag_img the country flag image as full img tag is stored here after execution
* @param string &$flag_img_src the country flag image source is stored here after execution
*
*/
function get_user_flag($user_flag, &$flag_country, &$flag_code, &$flag_img, &$flag_img_src)
{
    global $flags, $config;

    if (empty($flags))
    {
        global $cache;
        $flags = $cache->obtain_flags();
    }

    if (!empty($user_flag))
    {
        $flag_country = (isset($flags[$user_flag]['country'])) ? $flags[$user_flag]['country'] : '';
        $flag_code = (isset($flags[$user_flag]['code'])) ? $flags[$user_flag]['code'] : '';
        $flag_text = $flags[$user_flag]['country'] . ' (' . $flags[$user_flag]['code'] . ')';
        $flag_img = (!empty($flags[$user_flag]['image'])) ? '<img src="' . $phpbb_root_path . $config['flags_path'] . '/' . $flags[$user_flag]['image'] . '" alt="' . $flag_text . '" title="' . $flag_text . '" />' : '';
        $flag_img_src = (!empty($flags[$user_flag]['image'])) ? $phpbb_root_path . $config['flags_path'] . '/' . $flags[$user_flag]['image'] : '';
    }
} 
still the same debug error with that new peice of code.
azzurri
Registered User
Posts: 909
Joined: Fri Jul 21, 2006 7:48 pm

Re: Country Flag User Edition

Post by azzurri »

I find the code thing a bit annoying. I remove flags to put in team logos instead and I have a couple of hundred logos. Since the "code" is only 2 characters I can go up to 99 and then I have to use various combinations like a1, a2, a3 and so on. Hard to keep track because if you add two of the same codes it will mess up your logos. It would be much, much better if the codes where 3 or 4 characters so I could go up to at least 999.
azdolfan
Registered User
Posts: 98
Joined: Thu Sep 03, 2009 5:24 am

Re: Country Flag User Edition

Post by azdolfan »

Oddfish - will you program this mod so it can save mankind and bring back our social security checks? :lol:
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

Re: Country Flag User Edition

Post by oddfish »

azzurri wrote:I find the code thing a bit annoying. I remove flags to put in team logos instead and I have a couple of hundred logos. Since the "code" is only 2 characters I can go up to 99 and then I have to use various combinations like a1, a2, a3 and so on. Hard to keep track because if you add two of the same codes it will mess up your logos. It would be much, much better if the codes where 3 or 4 characters so I could go up to at least 999.
nice. you can adjust it yourself with accesss to your database and one edit.
mysql:

Code: Select all

ALTER TABLE `phpbb_flags` CHANGE `flag_code` `flag_code` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
ALTER TABLE `phpbb_users` CHANGE `user_flag` `user_flag` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
Open adm/style/acp_flags.html
FIND

Code: Select all

<dd><input name="flag_code" type="text" id="flag_code" value="{FLAG_CODE}" maxlength="2" /></dd>
change maxlength="2" to maxlength="32" and refresh.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

Re: Country Flag User Edition

Post by oddfish »

vectra-mods wrote:... still the same debug error with that new peice of code.
Sorry, I can't reproduce the error with the code change.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
cisco007
Translator
Posts: 129
Joined: Mon Jul 14, 2008 1:49 am
Contact:

Re: Country Flag User Edition

Post by cisco007 »

i am or was having the same problem tried the fix above but nothing, so i went back to the instructions for 1.2.0 RC and replaced the functions_display.php code with this:

Code: Select all

/**
* Get user country flag
*
* @param int $user_flag the current stored users country flag id
* @param string &$flag_country the country name will be stored here after execution
* @param string &$flag_code the country code will be stored here after execution
* @param string &$flag_img the country flag image as full img tag is stored here after execution
* @param string &$flag_img_src the country flag image source is stored here after execution
*
*/
function get_user_flag($user_flag, &$flag_country, &$flag_code, &$flag_img, &$flag_img_src)
{
	global $flags, $config;

	if (empty($flags))
	{
		global $cache;
		$flags = $cache->obtain_flags();
	}

	if (!empty($user_flag))
	{
		$flag_country = (isset($flags[$user_flag]['country'])) ? $flags[$user_flag]['country'] : '';
		$flag_code = (isset($flags[$user_flag]['code'])) ? $flags[$user_flag]['code'] : '';
		$flag_text = $flags[$user_flag]['country'] . ' (' . $flags[$user_flag]['code'] . ')';
		$flag_img = (!empty($flags[$user_flag]['image'])) ? '<img src="' . $config['flags_path'] . '/' . $flags[$user_flag]['image'] . '" alt="' . $flag_text . '" title="' . $flag_text . '" />' : '';
		$flag_img_src = (!empty($flags[$user_flag]['image'])) ? $config['flags_path'] . '/' . $flags[$user_flag]['image'] : '';
	}
}
and no more errors, the error was the this part of the code:

Code: Select all

$phpbb_root_path
don't exactly know if i should of replaced it but if it worked for the previous version, seems to be working here!
Image
User avatar
oddfish
Registered User
Posts: 839
Joined: Mon Mar 19, 2007 8:45 pm
Location: Testing 3.1
Contact:

Re: Country Flag User Edition

Post by oddfish »

cisco007 wrote: ... don't exactly know if i should of replaced it but if it worked for the previous version, seems to be working here!
Somebody slap me ! :oops: replacing the same code with the same code does not work :roll:

That is correct cisco007 and is what was changed in the release - the above code has been corrected.
Country Flag User Edition Clickable Post Count Link

... another record broken without breaking any records ...
Testing phpBB3.1 dark style based on prosilver ... http://www.oddmods.net
cisco007
Translator
Posts: 129
Joined: Mon Jul 14, 2008 1:49 am
Contact:

Re: Country Flag User Edition

Post by cisco007 »

no problem, i am glad that is all there was, i really love this mod, i couldn't live without it working correctly! :ugeek:
Image
User avatar
Steve
Registered User
Posts: 1092
Joined: Tue Apr 07, 2009 7:48 pm
Location: UK ,up north!!
Name: Steven Clark
Contact:

Re: Country Flag User Edition

Post by Steve »

nice mod fixed thanks ,and thanks dis007 kid :ugeek:
Redy
Registered User
Posts: 102
Joined: Sun Feb 07, 2010 5:37 pm

Re: Country Flag User Edition

Post by Redy »

Redy wrote:God damn it...I uninstall this MOD, edit all files back, clear cache and users names still isnt in his place :roll: how can i fix it plssss??
pls pls :oops:
Locked

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