[MODDB] Country Flags

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: [BETA] Country Flags

Post 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!
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: [BETA] Country Flags

Post 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 :)
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: [BETA] Country Flags

Post 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 :?:
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: [BETA] Country Flags

Post 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. :!:
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

Joshuaxiong1
Registered User
Posts: 87
Joined: Sun Nov 22, 2009 2:01 am
Location: Fresno, California

Re: [BETA] Country Flags

Post by Joshuaxiong1 »

Not Found

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

User avatar
rageracer
Registered User
Posts: 59
Joined: Sun Jul 08, 2007 4:36 am
Location: NZ

Re: [BETA] Country Flags

Post 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.
Last edited by rageracer on Sat Feb 06, 2010 7:47 pm, edited 1 time in total.
Windows is now a 64 bit tweak of a 32 bit extension to a 16 bit user interface for an 8 bit operating system based on a 4 bit architecture from a 2 bit company that can't stand 1 bit of competition

brades
Registered User
Posts: 1
Joined: Mon Dec 14, 2009 9:24 pm

Re: [BETA] Country Flags

Post 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?

User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Updated, now uses animated flags.

User avatar
puabase
Registered User
Posts: 34
Joined: Fri Sep 04, 2009 2:55 am
Contact:

Re: [BETA] Country Flags

Post by puabase »

The user choice or its generated automatic by user ip?
Meu Fórum: PUA - PUAS - Sedução

User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

User Choice if they want a flag or not.

User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: [BETA] Country Flags

Post 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

User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post 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?

User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: [BETA] Country Flags

Post by jmaraujo »

No problem, anybloodyid. ;) It's a very nice mod. :D

User avatar
jmaraujo
Registered User
Posts: 240
Joined: Fri Jun 01, 2007 9:48 pm
Location: Rivera - Uruguay
Name: Juan

Re: [BETA] Country Flags

Post 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

User avatar
anybloodyid
Registered User
Posts: 276
Joined: Thu Mar 06, 2008 7:24 pm

Re: [BETA] Country Flags

Post by anybloodyid »

Hi jmaraujo

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

Locked

Return to “[3.0.x] MODs in Development”