Page 2 of 5

Re: [BETA] Country Flags

Posted: Sun Nov 01, 2009 4:37 am
by rageracer
Getting this error and cant understand why

Code: Select all

Parse error: syntax error, unexpected T_IF, expecting ')' in /home/*********/public_html/includes/ucp/ucp_profile.php on line 339
I have gone over the page and everything is copied spot on. The flags show in ACP and can be configured.
Its going into the profile area that caused the error.

Any ideas?

Edit
Problem Solved!
HA HA...so much for spot on. Was getting into the swing of things with the after the preceding line(s) that I missed one of the before the preceding line(s) :lol:
Overall I'm impressed :D Awesome mod!

Re: [BETA] Country Flags

Posted: Mon Nov 02, 2009 5:20 am
by rageracer
OK now I have it working I would like to know how to move the new flags I added up in the list so there are in order. For example I added Scotland to have it stay after Zimbabwe.
Anyone know how to do this?

In the meantime i'll try and figure this out.

**************************************************
Edit: Found it!

To list the flags in ACP by flag name

Open includes/acp/acp_flags.php

Find:

Code: Select all

		$sql = 'SELECT *
			FROM ' . FLAGS_DATA_TABLE . '
			ORDER BY flag_id ASC';
		$result = $db->sql_query($sql);

Replace with:

Code: Select all

		$sql = 'SELECT *
			FROM ' . FLAGS_DATA_TABLE . '
			ORDER BY flag_name ASC';
		$result = $db->sql_query($sql);


To list the flags in the dropdown box in UCP by flag name

Open includes/functions_flag.php

Find:

Code: Select all

	$sql = 'SELECT flag_id, flag_name
		FROM ' . FLAGS_DATA_TABLE . '
		ORDER BY flag_id';
	$result = $db->sql_query($sql);


Replace with:

Code: Select all

	$sql = 'SELECT flag_id, flag_name
		FROM ' . FLAGS_DATA_TABLE . '
		ORDER BY flag_name';
	$result = $db->sql_query($sql);
Hope that helps someone else out :)

Re: [BETA] Country Flags

Posted: Thu Nov 19, 2009 7:49 am
by rageracer
Just tried installing this on a subsilver2 based theme (Element) and noticed that the template install is for Mood Swings :?:

I want to get this one working, can anyone help :?:

Re: [BETA] Country Flags

Posted: Sat Nov 28, 2009 12:41 am
by rageracer
As no one helped me with this :cry: I figured it out.

Open memberlist_view.html

Find:

Code: Select all

<tr>
	<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_LOCATION}: </td>
	<td><!-- IF LOCATION --><b class="genmed">{LOCATION}</b><!-- ENDIF --></td>
</tr>
Add after:

Code: Select all

<tr>
	<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_FLAG}: </td>
	<td><!-- IF USER_FLAG --><b class="genmed">{USER_FLAG}</b><!-- ENDIF --></td>
</tr>


Open ucp_profile_profile_info.html

Find:

Code: Select all

<tr> 
	<td class="row1" width="35%"><b class="genmed">{L_INTERESTS}: </b></td>
	<td class="row2"><textarea class="post" name="interests" rows="3" cols="30">{INTERESTS}</textarea></td>
</tr>
Add after:

Code: Select all

<!-- IF S_FLAGS_ENABLED -->
<tr> 
	<td class="row1" width="35%"><b class="genmed">{L_FLAG}: </b><br /><span class="gensmall">{L_FLAG_EXPLAIN}</span></td>
	<td class="row2">{S_FLAG_OPTIONS}</select>
	</td>
</tr>
<!-- ENDIF -->


Open viewtopic_body.html

Find:

Code: Select all

<!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
Add after:

Code: Select all

<!-- IF postrow.POSTER_FLAG --><br /><b>{L_FLAG}:</b> {postrow.POSTER_FLAG}<!-- ENDIF -->
I have this working well on my forum now. Hopefully the above edits will be helpful to anyone wanting this great MOD.
I cant believe I am the only one who wanted this MOD on a subsilver2 based theme. :!:

Re: [BETA] Country Flags

Posted: Sat Nov 28, 2009 6:20 am
by Joshuaxiong1
Not Found

The requested URL /CountryFlags.zip was not found on this server.

Re: [BETA] Country Flags

Posted: Sat Nov 28, 2009 9:57 am
by rageracer
Joshuaxiong1 wrote:Not Found

The requested URL /CountryFlags.zip was not found on this server.
Here you go:

Code: Select all

Please go to the start of this topic :) 
I have included a couple of text files which have the changes I posted here.

Re: [BETA] Country Flags

Posted: Mon Dec 14, 2009 9:25 pm
by brades
I installed this, go into my profile settings and select my country flag, click save. When i go back there is no flag option selected it just shows the blank box. Any ideas what is wrong?

Re: [BETA] Country Flags

Posted: Sat Dec 26, 2009 10:04 am
by anybloodyid
Updated, now uses animated flags.

Re: [BETA] Country Flags

Posted: Sat Dec 26, 2009 11:22 am
by puabase
The user choice or its generated automatic by user ip?

Re: [BETA] Country Flags

Posted: Sat Dec 26, 2009 4:57 pm
by anybloodyid
User Choice if they want a flag or not.

Re: [BETA] Country Flags

Posted: Sun Jan 31, 2010 10:16 am
by jmaraujo
Excellent mod! 8-) Thank you very much, anybloodyid! ;)

Can I make a small request, tho? If it's not too much to ask, can you make this mod "more compatible" with multilingual forums?

I want my users to have the possibility to choose the flags in their own language. For example, "United States" for users using english language, or "Estados Unidos" for users with spanish language.

Thanks in advance!!! :D

Re: [BETA] Country Flags

Posted: Sun Jan 31, 2010 3:18 pm
by anybloodyid
Hi jmaraujo

Unfortunately what you ask would take a lot of work.
and I don't have the skill for it.
Why not just have the flag image only showing instead of the flag image and flag name?

Re: [BETA] Country Flags

Posted: Sun Jan 31, 2010 7:02 pm
by jmaraujo
No problem, anybloodyid. ;) It's a very nice mod. :D

Re: [BETA] Country Flags

Posted: Mon Feb 01, 2010 10:49 pm
by jmaraujo
I think I found a little bug: When I change some other user profile on the ACP, the default selected flag on the dropdown menu it's mine (the flag I have selected on my profile - I think it's using my user_id), instead of the user's selection. This happens even if the user has already set a flag or not.

It's not a big deal, just an aesthetic minor mistake. :D

Re: [BETA] Country Flags

Posted: Tue Feb 02, 2010 10:01 am
by anybloodyid
Hi jmaraujo

You're right it does do that I'll look in to it. ;)