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

Country Flags [Deleted]

Cal

Well-known member
#22
Login to your Control Panel and access phpMyAdmin. Find your XenForo database and locate the table called "xf_custom_fields". Execute the following SQL code:
I'm in PHPMYADMIN and I have no such directory called xf_custom_fields. What should I do???
 

Adam Howard

Well-known member
#26
If XenForo has a hook some place for interacting in user profile fields, so that a modification can make it's own (generate its own), without the user having to manually impute it directly .... I'm not finding one.

(Although I admit to never needing to generate on through a modification, so I could be missing it)

I can now see why now you did it the way you did.

I have it installed, but it doesn't seem to be fully displayed correctly....

www.sociallyuncensored.eu 2012-6-19 4:17:10.png

I can see part of the flag I picked and some others from the sprite (see screen shot).

If you need to see this for yourself, please use the following log-in

PHP:
 User name:  Test-VB
Password: test-this-please
 

Stimo

Active member
#30
You need access to your phpMyAdmin panel. If you do not have access then you can ask your hosting provider to do it for you.
Sure I have access and i am on the page xf_user_field, but i get stuck here as i dont know how to execute something? im noob at this stuff!
 

John L.

Well-known member
#31
There is a tab that says "SQL", click on it and it will have a box with some text in it. Replace all that copy with the code I supplied and hit "GO" in the lower right-hand corner. When you get a green success message you're done.
 

Stimo

Active member
#32
There is a tab that says "SQL", click on it and it will have a box with some text in it. Replace all that copy with the code I supplied and hit "GO" in the lower right-hand corner. When you get a green success message you're done.
Sure i tried this before but i get this message ''#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1''
 

John L.

Well-known member
#33
Sure i tried this before but i get this message ''#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1''
Sorry, but that is the process and worked perfectly fine for me. I'm not sure about your installation or perhaps you didn't name your field id "country"?
 

Lone Wolf

Well-known member
#36
This looks like a fantastic new feature, should be default imho.

Is there any way that I can display the flag by itself and nothing else?
 

John L.

Well-known member
#37
This looks like a fantastic new feature, should be default imho.

Is there any way that I can display the flag by itself and nothing else?
Sure, for the Value HTML, use this:
HTML:
<img src="/styles/default/xenforo/clear.png" class="flag flag-{$choice}" alt="{$value}" />
 

LPH

Well-known member
#40
The drop down for country shows in the profile details page, but when I check "Show custom user fields" then it doesn't show up under the avatar.

Any thoughts?

Update: Working. I did not have the "Viewable in message user info" checked. This is found under the Users -> Custom User Fields -> Country -> General Options.