• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Country Flags [Deleted]

John L.

Well-known member
#1
LP-John submitted a new resource:

Country Flags (version 1.0) - Easily add country flags to your users profile and messages with small SQL mod.

This tutorial will help you add a "Country" field to your forum so your users can easily select their country of origin and have a flag show in their profile and messages.



** BACK UP YOUR SQL DATABASE NOW **

Step 1: Download resource and upload the files to the root of your forum installation.

Step 2: Login to your Admin CP and find the "Extra.css" template. Add...
Read more about this resource...
 

Adam Howard

Well-known member
#2
In Step 4, you require people to manually update their database using that query

Wouldn't it be possible to update this through AdminCP and just run Rebuild User Caches ?

I'm just trying to understand what you have done in this, that would require a manual database update?!
 

John L.

Well-known member
#3
In Step 4, you require people to manually update their database using that query

Wouldn't it be possible to update this through AdminCP and just run Rebuild User Caches ?

I'm just trying to understand what you have done in this, that would require a manual database update?!
The SQL code is used to add the the country fields to the custom user field you created. There is no easy way to mass add field options. So this is a SQL query that inserts it for you. Saves quite a bit of time.
 

Adam Howard

Well-known member
#4
The SQL code is used to add the the country fields to the custom user field you created. There is no easy way to mass add field options. So this is a SQL query that inserts it for you. Saves quite a bit of time.
I see now... Your download doesn't include any modification, only the flag photos.

huh :confused:

I like the concept, will have no problem installing this, but do wonder if this could be made easier for those less confident or tech aware (noobs).

I'm going to play around with this (if you don't mind)
 

John L.

Well-known member
#5
I see now... Your download doesn't include any modification, only the flag photos.

huh :confused:

I like the concept, will have no problem installing this, but do wonder if this could be made easier for those less confident or tech aware (noobs).

I'm going to play around with this (if you don't mind)
Well I did put it in the code modification section, not an addon haha. No there is no addon to install or anything like that. Sure, go ahead if you want to.
 

Adam Howard

Well-known member
#6
Well I did put it in the code modification section, not an addon haha. No there is no addon to install or anything like that. Sure, go ahead if you want to.
You're right. Sorry about my oversight.

Please do not mistake my inquire or me thinking "out loud" as negative criticism or any sign of disrespect.

I think you've done a wonderful job at what you have accomplished and I have the highest respect toward anyone who offers a free resources to the community here. :cool:
 

John L.

Well-known member
#8
Hi, followed the steps exactly but unable to see flag...

About


Gender:
Male
Birthday:
Dec 29, 1977 (Age: 34)
Home page:
Location:
17D Pkt 3, Mayur Vihar Phase I, Delhi - 91
Occupation:
Techno Freek
Country:
India
Make sure that you can access the img paths. Always test the path the code generates. If your default style exists somewhere else then it will not load.
 
#11
Not just that, the clear.png file. It appears your link is broken. Mote than likely because you have a custom style. Simply change the path in the Value HTML for the field.
Sorry, it is still not working :(

In Extra.css changed (what you actually told):
From:
Code:
/* START FLAGS */
.flag{background:url(@imagePath/xenforo/flags/flags.png) no-repeat;height:11px;width:16px;}
To:
Code:
/* START FLAGS */
.flag{background:url(https://www.fixmystuff.in/FMS_Forum/styles/default/xenforo/flags/flags.png) no-repeat;height:11px;width:16px;}
Value Display HTML changed (what you actually wrote):
From:
Code:
<img src="/styles/default/xenforo/clear.png" class="flag flag-{$choice}" alt="{$value}" /> {$value}
To:
Code:
<img src="https://www.fixmystuff.in/FMS_Forum/styles/default/xenforo/clear.png" class="flag flag-{$choice}" alt="{$value}" /> {$value}
 
#20
Extremely sorry, issue cracked. Absolutely nothing wrong in your code...There was some problem in TMS, it was not applying the modification. I deleted the earlier and created a new template modification and changed the executing order, it worked like a charm. Thanks for all support. Sorry, as i should not have bothered you before checking this at my end.