View Full Version : Profile Enhancements - Flags - Country and Region
Carpe
08-13-2007, 10:00 PM
I took the code from the flag mods on older vB versions and combined the country and region flags.
Instructions for installing only the country flags without the region flags is also included.
1.01 Changes:
Corrected the spelling of california
Corrected the spelling of newfoundland
Added the flag of england to the country flags list
cairocairo
08-14-2007, 04:50 PM
The amendment is very bad because it is confined to a limited number of States did not include any state from the Middle East, and I do not know why I hope that includes all nations, if that happens it will already magnificence
applyimage
08-14-2007, 05:11 PM
Hi, I havn't installed yet, is it possible just to have the nations flag appear and not americans states? I highly doubt it will include the English countys for example.
Looks like a nice little mod though.
Carpe
08-14-2007, 05:29 PM
The amendment is very bad because it is confined to a limited number of States did not include any state from the Middle East, and I do not know why I hope that includes all nations, if that happens it will already magnificence
When you say state I am assuming you mean country. I have updated the zip file to include every country I had. Hope yours is in there.
Carpe
08-14-2007, 05:35 PM
Hi, I havn't installed yet, is it possible just to have the nations flag appear and not americans states? I highly doubt it will include the English countys for example.
Looks like a nice little mod though.
If the users don't select a state/region flag one wont appear. You will only see the country flag. If you don't want the state flags at all use the attached instructions.
ahmedeldeep
08-14-2007, 05:58 PM
thank you
but can i find a 3D flag pics ??
applyimage
08-14-2007, 06:29 PM
If the users don't select a state/region flag one wont appear. You will only see the country flag. If you don't want the state flags at all use the attached instructions.
I see! very good mod, thanks.
Carpe
08-14-2007, 08:04 PM
thank you
but can i find a 3D flag pics ??
I dont know of any, but if you find some all you have to do is replace the flags currently in the flags folder making sure the names are the same.
Magnumutz
08-14-2007, 08:11 PM
I see you updated the mod... what's up?
iogames
08-14-2007, 08:11 PM
So there's the option to display just Countries?
jluerken
08-14-2007, 11:25 PM
So there's the option to display just Countries?
Yes, simply edit the template!
Carpe
08-14-2007, 11:35 PM
I see you updated the mod... what's up?
Due to the way people around the world view the word state (it can mean country as a previous poster used it) I repackaged the mod using the word and folder named region instead. Trying to avoid confusion. I also put instructions on installing only the country flags into the zip file.
iogames
08-15-2007, 12:13 AM
You have empty profile fields that are required to be filled in. Please visit your profile page to update these fields.
???
I see the problem but giving me big headaches :P
Khalid-B
08-15-2007, 12:54 AM
nice little mod.
Installed and working great
Thanks
yaoren
08-15-2007, 01:48 AM
**Installed**
But... I only get the text "usa" instead of the "usa flag"
Same with the state flag too.
Carpe
08-15-2007, 02:34 AM
???
I see the problem but giving me big headaches :P
When you created your profile fields you changed the Field Required setting to yes. Go back into your profile field and change it to no.
Carpe
08-15-2007, 02:37 AM
**Installed**
But... I only get the text "usa" instead of the "usa flag"
Same with the state flag too.
Hmmm, im not sure what is going on. Look at the directions again and make sure you have everything set up right.
yaoren
08-15-2007, 11:53 AM
oops, I inserted the "display order number" instead of the "field number"
All good now, thanks
Pirate45
08-15-2007, 06:52 PM
I did the same thing as yaoren. Very easy to make this mistake! And, you have to do it twice on each line for a total of four times.
This is explained, but someone going too fast (like me) will miss this if not paying attention.
Carpe
08-15-2007, 06:52 PM
So far, me too. :(
I uploaded the images to
/images/flags
/images/regions
But, nothing showing. :(
Double check the directions and make sure you did everything correctly.
Endurer
08-15-2007, 09:09 PM
Thanks, Installed. :)
I'd like to replace the location field with this one, will it work if I just changed the location field to show country flags instead? Or do I have to empty the contents of location field of all members first?
Carpe
08-16-2007, 12:20 AM
Thanks, Installed. :)
I'd like to replace the location field with this one, will it work if I just changed the location field to show country flags instead? Or do I have to empty the contents of location field of all members first?
The location field is a single-line text box and the flag field is a single-selection menu. There is no way I know of to change a field without deleting and recreating it. More advanced vB users may have more info on this. I have only been using vB for a week.:D
yahoooh
08-16-2007, 06:10 AM
how to make it appear only in the user profile?
Pirate45
08-16-2007, 08:37 AM
Carpe,
A couple of issues...
California was misspelled in the selection menu (calafornia) and a user told me it did not work. I did not confirm that but I changed it to "california" (proper spelling) and then he said it worked.
The Canadian province of Newfoundland is mis-spelled as "new foundland" in your menu. It should be one word.
A user has asked for the addition of the flag of England, which is not the same as the flag of the United Kingdom (he says).Also, would it be possible to release a version with the proper capitalization?
I'm not complaining. It's just that USA looks better than "usa", etc.
It's an awesome mod and my users love it so far.
Thanks.
Carpe
08-16-2007, 12:45 PM
how to make it appear only in the user profile?
No idea, I created the mod because I wanted it in the postbit. Im sure you can search for adding things to the user profile and then use the provided code.
Carpe
08-16-2007, 12:50 PM
Carpe,
A couple of issues...
California was misspelled in the selection menu (calafornia) and a user told me it did not work. I did not confirm that but I changed it to "california" (proper spelling) and then he said it worked.
The Canadian province of Newfoundland is mis-spelled as "new foundland" in your menu. It should be one word.
A user has asked for the addition of the flag of England, which is not the same as the flag of the United Kingdom (he says).Also, would it be possible to release a version with the proper capitalization?
I'm not complaining. It's just that USA looks better than "usa", etc.
It's an awesome mod and my users love it so far.
Thanks.
Corrected california and newfoundland. The flag of england was in the region list, I added it to the country list and folder.
The list of country/region names has to match the name of the image associated with it. This means if I change the list to be properly capitalized I have to change every single flag name as well. I agree with you that it would look better, but I don't currently have the desire to change that many names, sorry. You could easily do it if you have the time. Just make sure the text you insert into the profile field matches the flag names exactly.
Tom_S
08-20-2007, 02:35 AM
Very nice job!
Digital Jedi
08-22-2007, 04:50 AM
I don't know if anyone will find this useful, but I took the country flag list and ran it through Microsoft Word. They've got a capitalization feature that not too many people know about. And I did a batch rename of the images folder so that all the names would match up. There were a handful of spelling errors in a few country names, so I made sure to correct those and match up the text file with the images. Everything should be formated and matched properly, but if it isn't let me know.
Like I said, I don't know if you'll find it useful, but since someone mentioned it, I'd thought I'd share what I did for my forum with you. I intend to do the regions folder next, just didn't have the time tonight. I'll post it when it's done.
Reflect
08-22-2007, 12:59 PM
I installed this and it works for me.
But for some reason only admins can see the flags and not registered users. When they select there country i can see their flags, but they cant see their own or mine. Anyone know whats wrong?
tutusinghsohi
08-22-2007, 02:29 PM
springfield va.....lol....
so close dude...
i'm in fairfax va...:p......
anyways..
very nice hack....installed and loving it :D..
I've installed it on my site, and used this code:
<!-- / flags start -->
<div>
<if condition="$post[field5]"><img src="images/flags/$post[field5].gif"></if>
<if condition="$post[field6]"><img src="images/region/$post[field6].gif"></if>
</div>
<!-- / flags end -->
but is it only display TEXT instead of the FLAGS
the fields name are correct!
<dt class="smallfont"><strong>Country Flag</strong>:</dt>
<dd class="smallfont">brazil</dd>
<dt class="smallfont"><strong>State/Region Flag</strong>:</dt>
<dd class="smallfont">au west australia</dd>
that is the output I am getting
can someone help me with it?
I've uploaded a screen shot just to confirm that I am doing things properly
Pirate45
09-08-2007, 10:38 AM
You are probably making the mistake that a lot of us made in looking at the wrong numbers there. Check it again.
Battle_Ring
09-09-2007, 08:36 PM
Word Country doesnt show up
http://www.sportscardforum.com/showthread.php?t=359957
vitrag24
09-15-2007, 02:24 PM
Will It Work On Vb 3.6.4?
masterweb
09-17-2007, 07:12 PM
Installed :D
djrichards
09-18-2007, 04:03 PM
You are probably making the mistake that a lot of us made in looking at the wrong numbers there. Check it again.
I don't get it. His field numbers and order numbers are the same (5 and 6 respectively). What else are you saying that he needs to look at?
I'm asking because I have the exact situation and none of my graphics display.
TIA,
DJ Richards
djrichards
09-18-2007, 04:53 PM
Wasn't using postbit_legacy.
Doh!
I don't get it. His field numbers and order numbers are the same (5 and 6 respectively). What else are you saying that he needs to look at?
I'm asking because I have the exact situation and none of my graphics display.
TIA,
DJ Richards
Mine doesn't display either and I am putting the code in postbit_legacy.
tiredoff
10-12-2007, 05:17 AM
Hi
Admincp > etc.......... it is ok
Options - [copy and paste list of countries in country_flags_list.txt to this option field] But where i can find it?
thank you
Arrogant-One
10-12-2007, 08:09 AM
I don't get it. His field numbers and order numbers are the same (5 and 6 respectively). What else are you saying that he needs to look at?
I'm asking because I have the exact situation and none of my graphics display.
TIA,
DJ Richards
Help!!!!
I spent about an hour on this stupid Hack and it doesn't seem to be working at all. What have I done wrong?
AO
vitrag24
10-12-2007, 03:04 PM
anyone can tell whether it will work on vb 3.6.4?
Arrogant-One
10-17-2007, 01:22 AM
anyone can tell whether it will work on vb 3.6.4?
Don't know. I had a professional install it for me on 3.6.7 and it works fine. You select your flag in EDIT PROFILE under USER CP in the navbar.
AO
Digital Jedi
10-19-2007, 02:25 AM
I don't know if anyone will find this useful, but I took the country flag list and ran it through Microsoft Word. They've got a capitalization feature that not too many people know about. And I did a batch rename of the images folder so that all the names would match up. There were a handful of spelling errors in a few country names, so I made sure to correct those and match up the text file with the images. Everything should be formatted and matched properly, but if it isn't let me know.
Like I said, I don't know if you'll find it useful, but since someone mentioned it, I'd thought I'd share what I did for my forum with you. I intend to do the regions folder next, just didn't have the time tonight. I'll post it when it's done.
Took me a while to get around to this. I updated my Regions folder with what I believe to be the correct names and spellings and capitalization. Thought I'd share it with you. Note, your users will have to reselect their flag, and until they do, a broken image will show up. I just went ahead and grouped them altogether.
This should work on any version of vB you have. It's just a template modification. For those having trouble with it, make sure your adding the modifications to the right template. Some of you are using postbit and some of you are using postbit_legacy. If you do the modification to one template, and your forum isn't using that layout, then, naturally, it's not going to show up.
sylar
10-20-2007, 08:15 AM
Nice and simple. Very good list of flags as well.
<<Installed>>
vitrag24
10-20-2007, 06:53 PM
Cool.
BTW i saw many sites and forums in which after registering countryflag is shown automatic ally.Will this mod work that way or not?
and registered users will need to select flag manually???
peterpigman
10-25-2007, 08:34 PM
Ok 3.68 here and working fine, how do you add flags?
Edit: nm figured it out.
Tarola
10-28-2007, 03:35 AM
Note:
- for different templates works:
1.Find:
<div class="info">$vbphrase[posts]: $post[posts]</div>
BELOW, ADD:
<!-- / flags start -->
<div>
<if condition="$post[fieldX]"><img src="images/flags/$post[fieldX].gif"></if>
</div>
<!-- / flags end -->
2.Find:
<div>
$vbphrase[posts]: $post[posts]
</div>
BELOW, ADD:
<!-- / flags start -->
<div>
<if condition="$post[fieldX]"><img src="images/flags/$post[fieldX].gif"></if>
</div>
<!-- / flags end -->
iogames
10-30-2007, 11:33 PM
Mine stopped working since I've installed another hack... why since this hack is very simple ???
BoneDust
11-20-2007, 06:06 AM
I do not see any images? It's probably something stupid as other seem to feel it's an easy install. Images are upload into their appropriate directory, paths are good, postbit legacy code entered etc etc and still no images after 2 hours of trying to see what I am doing wrong.
SNATCH3R
11-21-2007, 09:51 AM
thanks and installed............good work
BoneDust
11-21-2007, 06:01 PM
I do not see any images? It's probably something stupid as other seem to feel it's an easy install. Images are upload into their appropriate directory, paths are good, postbit legacy code entered etc etc and still no images after 2 hours of trying to see what I am doing wrong.
No suggestions? I'm using 3.6.8
BusaNation
11-27-2007, 08:35 PM
Hi, I am using your flag program on my global hayabusa site www.BusaNation.com board, it looks great, however, can you take it a step further? Can you take on creating a program that would now TALLEY how many Canadians, americains, UK, etc.... and creat a statistics so that users could see how many flags are represented on my site? asd a user clicks thier country of origin flag, a program would then tally it and show in flag icons so i can place it on my portal home page a visual of the flags and how many users i.e
USA=1000
Canada 55
UK= 2500
spain etc..... just shows the flag icon with a total? from the most to the least in that order, i think it would be awesome and i want to add this to my site? Duane tybal71@hotmail.com www.BusaNation.com:up:
BoneDust
11-27-2007, 08:59 PM
Still no images showing up. Anyone have any suggestions?
towermatt
11-27-2007, 10:50 PM
Went on great, thank you.
This is cool now that my site has gone kind of international. :D
vitrag24
11-27-2007, 11:01 PM
does this shows flags automatically of all users by detecting registration ip or otherway or users have to edit profile for something to display flag?
towermatt
11-28-2007, 12:48 AM
It creates a profile field that the user needs to fill in.
But its a drop down so pretty easy.
BoneDust
11-28-2007, 03:30 AM
What would cause the images to not show?
Here's what I posted in the postbit - legacy
<!-- / flags start -->
<div>
<if condition="$post[field8]"><img src="images/flags/$post[field8].gif"></if>
<if condition="$post[field9]"><img src="images/region/$post[field9].gif"></if>
</div>
My profile fields are 8 and 9
I uploaded the images to images/flags and images/region
Any thoughts? I've been trying to figure this out for some time and this is the first addon I've had a problem with.
BusaNation
11-28-2007, 11:38 AM
Any one know how to get a hold of the CODER? , I cant pM him and he is not taking emails? I want to talk to him about his flag program to do something for my site.
nyunyu
12-07-2007, 07:00 PM
Installed this hack but nothing happens? I suppose this hack shows a flag on postbit? Can anyone help me?
Look here.. http://www.animeheist.com/forum/showpost.php?p=1861&postcount=1
iogames
12-07-2007, 11:21 PM
It creates a profile field that the user needs to fill in.
But its a drop down so pretty easy.
Installed this hack but nothing happens? I suppose this hack shows a flag on postbit? Can anyone help me?
Look here.. http://www.animeheist.com/forum/showpost.php?p=1861&postcount=1
Profile Field is the problem ;)
nyunyu
12-08-2007, 09:12 AM
iogames, what do you mean by profile field problem? care to explain a little bit more? Thanks
serverguy84
12-23-2007, 11:19 AM
This mod shows up in the memberlist. Except it shows up as Canada USA , etc.
Is there any way instead of the writing it shows the flags instead
I have the same question please...:confused::confused:
Hi
Admincp > etc.......... it is ok
Options - [copy and paste list of countries in country_flags_list.txt to this option field] But where i can find it?
thank you
serverguy84
12-25-2007, 05:07 PM
If you go to Admin->User Profile Fields->Add New User Profile->Single Selection Menu>
In the box where it says
"Options
Enter the options that the user can choose from. Separate each option with a new-line (carriage return)."
That is where you put in all the flags list
Ok, now I understand it
Thanks;);)
sypherzone
01-20-2008, 03:46 AM
I tried installing it but it isn't showing? What could be the problem?
Digital Jedi
01-20-2008, 07:40 AM
I tried installing it but it isn't showing? What could be the problem?
Most common mistake is not putting it into the postbit template that you use for your forum.
postbit (Like on this forum, Avatar and User Info is on top of each post)
postbit_legacy (Avatar and User Info is on the side)
What would cause the images to not show?
Here's what I posted in the postbit - legacy
<!-- / flags start -->
<div>
<if condition="$post[field8]"><img src="images/flags/$post[field8].gif"></if>
<if condition="$post[field9]"><img src="images/region/$post[field9].gif"></if>
</div>
My profile fields are 8 and 9
I uploaded the images to images/flags and images/region
Any thoughts? I've been trying to figure this out for some time and this is the first addon I've had a problem with.
It should be showing up, unless your forum isn't using postbit_legacy. Are the images not showing at all, or are they broken images? If they're broken, then you might need to add the flags folders to your skin's images folder, and not the one in your forum root.
ashley53680
01-24-2008, 08:26 PM
Beautiful hack that worked perfectly for what I need. I sort of rewrote to meet my needs. I run a local forum so I don't need country flags but more of an area identifier.
I was wondering however, how would you make it a conditional on if the user wants it displayed in their postbit? The field is already something I had in the profile, but now I just added images to go along with the field to display on the postbit. I have some users who don't want it displayed and I am at a loss on how to accomplish that with your hack.
Thanks so much!!!!!
Ash
Digital Jedi
01-24-2008, 10:15 PM
The only way I can think of to do that would be to make the field optional. Then it will only show if the user has filled out the field.
ashley53680
01-24-2008, 11:54 PM
I thought of that, but I need this field to show in the profiles. It seems redundant to have them fill the information out twice.
I tried to look at the coding on the birthday/age field. There is an option on what of that to display or hide. So I thought I could possibly do it with this as well. I am not a coder, so I am sorry if this seems a bit dense. lol
Digital Jedi
01-26-2008, 03:26 PM
What I meant was, you can still change the existing fields you already have to an optional setting, and that way users who don't want it showing can, er, "unfill" the option in their User CP.
Then you can add an if conditional like if condition="$post[fieldX]" around the code, where X is the field ID. That way, if they fill it out, it shows, if they don't it doesn't.
ashley53680
01-26-2008, 03:48 PM
Yes that's what I thought you meant, however they *have* to have this filled in. I just want to give them the option to show it in their postbit or not.
Took me a while to get around to this. I updated my Regions folder with what I believe to be the correct names and spellings and capitalization. Thought I'd share it with you. Note, your users will have to reselect their flag, and until they do, a broken image will show up. I just went ahead and grouped them altogether.
This should work on any version of vB you have. It's just a template modification. For those having trouble with it, make sure your adding the modifications to the right template. Some of you are using postbit and some of you are using postbit_legacy. If you do the modification to one template, and your forum isn't using that layout, then, naturally, it's not going to show up.Installed! :up:
Digital Jedi
01-27-2008, 02:56 PM
Yes that's what I thought you meant, however they *have* to have this filled in. I just want to give them the option to show it in their postbit or not.
Ah, I see. Well, I just tried something on my forum, and it may work for you. Try this out if you like.
Create a new profile field with the question of whether they would like the flags to show in their profile. Make the field a multiple-selection check box, but only create one option: "Yes". Put in the instructions to leave it blank if they don't want it to show. Make sure to make it mandatory and to put it on the same page as the flag options, show during registration, etc.
Then wrap your flag code with <div> tags and put an IF condition around the div. Sort of like so:
<if condition="$post['fieldX']">
<div>
<if condition="$post[field8]"><img src="images/flags/$post[field8].gif"></if>
<if condition="$post[field9]"><img src="images/region/$post[field9].gif"></if>
</div>
With X being the ID of the new field you just created. What will happen is the DIV wont display unless the user has filled it out: checked "Yes". And since the div wont show, the contents wont either, even if they're a mandatory field.
Hrm, maybe don't make it mandatory. It will HAVE to filled in then. Just make sure to put it on the same page.
I've just been informed by one of my members that there's one incorrect flag in your update, Digital Jedi (and also presumably in the original hack too).
Georgia (the country) should be 75279. It changed in 2004, here's the Wikipedia article (http://en.wikipedia.org/wiki/Flag_of_Georgia_%28country%29) for verification.
Digital Jedi
02-01-2008, 02:46 PM
Thanks, R-D. I updated the zip in my post (https://vborg.vbsupport.ru/showthread.php?p=1363487#post1363487)
hunter88
02-06-2008, 03:22 PM
Hello,
first: thank you!
Second, i have small questions:
1. its possible to make the flags "hover", do dislpay the flag-name if users take the mouse over the flag? How to make it?
2. its possible to make the flag-name displayed over/under the flags (with Font size 1)?
This is default:
http://bildupload.sro.at/a/images/flags.jpg
and this is what i want (made by GIMP :)):
http://bildupload.sro.at/a/images/flags1.jpg
How to change the code in the templates?
Thanks,
Hunter
(sorry 4 my poor english)
Thanks, R-D. I updated the zip in my post (https://vborg.vbsupport.ru/showthread.php?p=1363487#post1363487)Thank you for the updates of this mod, it is much appreciated. :)
chuckrobbie
02-09-2008, 08:01 AM
I installed it, edited the template and it does not show!
You select your country ok but the postbit part is not working...
I am using 3.6.8
can anyone help??
PAKIDIL
02-09-2008, 09:15 AM
same mine isnt working trying to figure out from days
Digital Jedi
02-09-2008, 10:03 AM
same mine isnt working trying to figure out from days
I installed it, edited the template and it does not show!
You select your country ok but the postbit part is not working...
I am using 3.6.8
can anyone help??
First question I always ask is which template did you add it to? postbit or postbit_legacy? And did you add it to the postbit your forum is using for it's style?
McMendo
02-09-2008, 05:01 PM
A few questions:
Does it work with both postsbit and postbit_legacy?
Is it possible for an individual user to choose the country but not the region?
I'm still using the very old country flags modification and I'd like to get rid of it for one more updated.
dave9720
02-09-2008, 11:05 PM
I have a problem viewing this hack postbit_legacy was checked and editing the profile fields in both options
were not there I had to add this I currently use vb3.6.8. enclosed are screen shots any help would be appreciated Thanks Dave
Magnusson2u
02-10-2008, 07:50 AM
It works in both postbit and legacy. I have just installed it without a problem in 3.68.
Digital Jedi
02-10-2008, 09:46 AM
A few questions:
Does it work with both postsbit and postbit_legacy?
Is it possible for an individual user to choose the country but not the region?
I'm still using the very old country flags modification and I'd like to get rid of it for one more updated.
Yes, it works with both templates. You can also select just the Country or just the Region flags. Their separate profile fields and not dependant on each other.
I have a problem viewing this hack postbit_legacy was checked and editing the profile fields in both options
were not there I had to add this I currently use vb3.6.8. enclosed are screen shots any help would be appreciated Thanks Dave
Looks to me like you saved it as a Single Line Text Box, when what it should be is a Single Selection Menu. You should back track and start over, because, at first glance, it appears you misread a couple of steps.
dave9720
02-10-2008, 09:51 AM
It works in both postbit and legacy. I have just installed it without a problem in 3.68.
Edited in both and both styles, Sill not showing?
Digital Jedi
02-10-2008, 10:00 AM
Edited in both and both styles, Sill not showing?
Like I said, I don't think you installed it as the right kind of field.
PAKIDIL
02-11-2008, 07:29 PM
does it work with 3.6.5 ?or any solution to let it work with 3.6.5 ?
Digital Jedi
02-11-2008, 08:14 PM
does it work with 3.6.5 ?or any solution to let it work with 3.6.5 ?
It just a simple template edit, so it should work with any version that uses templates and custom profile fields.
SVTdrivah
02-13-2008, 02:28 PM
Works great, thanks!
BusaNation
02-14-2008, 06:13 PM
This works great for me, i want to tweak it, where are you MR CODER? I want to program it to tabulate and make statistics of how many USA flags, Canadian, UK etc.... to display on my portal page to tell members how many representitves are from hosting countries?
aamirkhj
02-21-2008, 02:49 PM
I followed all the instructions in your flag install country only.txt the names of the country is shown under profile name now but no flag image is showing don't know why I uploaded the images correctly via ftp to the image directly.
Any idea what I am doing wrong??
Digital Jedi
02-22-2008, 12:44 AM
I followed all the instructions in your flag install country only.txt the names of the country is shown under profile name now but no flag image is showing don't know why I uploaded the images correctly via ftp to the image directly.
Any idea what I am doing wrong??
Link?
BusaNation
02-22-2008, 01:19 PM
Mr Coder Ping Mr Coder To The Courtesy Phone
Boofo
02-22-2008, 01:59 PM
I followed all the instructions in your flag install country only.txt the names of the country is shown under profile name now but no flag image is showing don't know why I uploaded the images correctly via ftp to the image directly.
Any idea what I am doing wrong??
Make sure you have <img src="images/flags/$post[fieldX1].gif"> instead of just $post[fieldX1]. I had the same thing happen as I was used to doing post fields all the same way, as text.
And this is working great in 3.7.0 beta 5.
Boofo
02-22-2008, 05:48 PM
Took me a while to get around to this. I updated my Regions folder with what I believe to be the correct names and spellings and capitalization. Thought I'd share it with you. Note, your users will have to reselect their flag, and until they do, a broken image will show up. I just went ahead and grouped them altogether.
This should work on any version of vB you have. It's just a template modification. For those having trouble with it, make sure your adding the modifications to the right template. Some of you are using postbit and some of you are using postbit_legacy. If you do the modification to one template, and your forum isn't using that layout, then, naturally, it's not going to show up.
Excellent update. Thank you. ;)
Digital Jedi
02-22-2008, 09:40 PM
No problem. I had some free time. :)
...
At the time. :(
Boofo
02-22-2008, 11:46 PM
No problem. I had some free time. :)
...
At the time. :(
I know how that is. ;)
You might want to replace the Georgia Flag in the flags directory instead of leaving it in the ZIP file. I was kind of confused about that until I followed through the posts on it. Also, if you come up with any more regions, I would be interested. ;)
Again, good work, sir. ;)
Digital Jedi
02-25-2008, 07:00 PM
Hrm, I thought I had done that already. I might have forgotten to.
Oh, now that you mention it, I did do Ireland's County flags per a user request on my board. I'll zip those up too when I get a chance.
Boofo
02-25-2008, 07:27 PM
Hrm, I thought I had done that already. I might have forgotten to.
Oh, now that you mention it, I did do Ireland's County flags per a user request on my board. I'll zip those up too when I get a chance.
Yes, the Ireland flags would be nice, thank you.
how can I make it visible under rep. on user memberinfo.
Digital Jedi
02-28-2008, 11:29 PM
Yes, the Ireland flags would be nice, thank you.
I got around to adding those Ireland Flags to the Zip. I also went ahead and just updated both of my posts with the new Zip File. https://vborg.vbsupport.ru/showthread.php?p=1363487#post1363487
montsa007
02-29-2008, 03:39 AM
Magnificento :D
Installed
Boofo
02-29-2008, 06:28 AM
I got around to adding those Ireland Flags to the Zip. I also went ahead and just updated both of my posts with the new Zip File. https://vborg.vbsupport.ru/showthread.php?p=1363487#post1363487
Have you just added more flags or do we need to add more lines to the profile lields drop downs?
Boofo
02-29-2008, 07:34 AM
Is there any way to get a Scotland Flag and an Edinburgh region flag?
Digital Jedi
02-29-2008, 04:38 PM
Have you just added more flags or do we need to add more lines to the profile lields drop downs?
I added both. So you can just upload the entire new Regions folder if you want the flags I just added (or just upload all the flags prefixed with IR), and you'd need to copy and paste the new Regions text into that field in your Admin CP.
Is there any way to get a Scotland Flag and an Edinburgh region flag?
Probably. I'd just need a reliable resource to find all the appropriate flag images.
Boofo
02-29-2008, 05:05 PM
I figured out what you added after I posted that message. Thank you, sir. ;)
If you come up with any more flags for Countries or Regions, I'd be very interested, sir. Good job! ;)
Warion
03-09-2008, 11:47 PM
I have added this to my site but all i get is the names, no pics/flags. I followed your script to the T. I even installed it on each template i have installed and no luck
Digital Jedi
03-10-2008, 08:59 AM
Make sure you uploaded the flag images to the directory your style uses. That can be different from your main images directory.
Magnusson2u
03-12-2008, 03:48 PM
This has been a really cool add-on! Can I suggest a text-over position that will have the country name show? This way users can become graphically educated as to what flag represents which country.
Thanks
Digital Jedi
03-13-2008, 07:24 AM
This has been a really cool add-on! Can I suggest a text-over position that will have the country name show? This way users can become graphically educated as to what flag represents which country.
Thanks
You can add that by putting alt="$post[fieldX]" inside each <img> tag.
Magnusson2u
03-13-2008, 06:22 PM
Cool!
So you mean do this (I really know nothing)?
<if condition="$post[field26]"><img src="images/flags/$post[field26].gif"></if>
and make it:
<alt="$post[field26]"><img src="images/flags/$post[field26].gif"></if>
I know it's probably wrong, but it didn't work none the less.
Thanks DJ.
Digital Jedi
03-14-2008, 08:14 AM
Cool!
So you mean do this (I really know nothing)?
<if condition="$post[field26]"><img src="images/flags/$post[field26].gif"></if>
and make it:
<alt="$post[field26]"><img src="images/flags/$post[field26].gif"></if>
I know it's probably wrong, but it didn't work none the less.
Thanks DJ.
Heheh, not exactly. You see alt is something that all <img> tags are supposed to have anyway, even if there's nothing in the quotation marks. It would look like this:
<img src="images/flags/$post[fieldXX].gif" alt="$post[fieldXX]" />
Magnusson2u
03-14-2008, 01:26 PM
...don't laugh at me. http://www.s14.net/forums/images/smilies/giggleghey.gif Haha!
Thanks, it worked perfectly! Now I realize how incorrect I am about matching flags to countries.
aamirkhj
03-16-2008, 09:49 PM
I installed and I am only getting the text of country name shows under the avatar no images i.e name of "usa" instead of the "usa flag", I checked all flags are uploaded correctly and fields are added according to the instructions but no idea why image of flag is not showing only name of the country displays.
Any idea what may be the reason?
aamirkhj
03-16-2008, 10:37 PM
Make sure you have <img src="images/flags/$post[fieldX1].gif"> instead of just $post[fieldX1]. I had the same thing happen as I was used to doing post fields all the same way, as text.
Well the entire coding is correct nothing seems to be working, I have spent already days on it.
Still could not figure out it does shows the text name of the country but no image,
here is the link
http://meraraabta.com/baithak/member.php?u=859
aamirkhj
03-16-2008, 10:38 PM
Link?
http://meraraabta.com/baithak/member.php?u=859
Digital Jedi
03-20-2008, 06:44 PM
http://meraraabta.com/baithak/member.php?u=859
Oh, okay. Well that's the problem then. This doesn't put the flag image in your Member Profile. You put this in the postbit or postbit_legacy templates and the images will show in your posts. It will only show as text on your member info page.
sensuison
04-05-2008, 12:26 PM
Hi,
I just followed all the instructions on installing this flag mod but I couldn't see my flag under my profile on the thread?
For example: The administrator must have a flag under the picture:
http://philippinebasketball.net/forum/showthread.php?t=2
I added this inside postbit_legacy
<!-- / flags start -->
<div>
<if condition="$post[field5]"><img src="images/flags/$post[field5].gif"></if>
</div>
<!-- / flags end -->
..and uploaded the images inside http://www.philippinebasketball.net/images/flags and region
Any help?
Thanks.
sensuison
04-05-2008, 12:41 PM
Ok, never mind, I got it working. I pasted it on postbit only, not the postbit_legacy.
sensuison
04-05-2008, 11:04 PM
question guys, do you guys have a new list of country flag images? a better graphics or 3D something?
Digital Jedi
04-06-2008, 01:17 AM
A few posts back I posted an updated list with corrected spellings and Ireland flags added. But that's about it so far.
sensuison
04-07-2008, 11:35 PM
Ok, hmm i think i might just search for a new one or make a new one. I just noticed that the flags are quite pixilized or distorted.
bago200
04-08-2008, 05:51 PM
Yeah, the flags are not all what i expected it to be but can work for now. I also noticed that if nothing shows up after copying the code to postbit_legacy its best to try putting the code in postbit only.
Find the code:
<div>
$vbphrase[posts]: $post[posts]
</div>
As mentioned in the installation and copy underneath the first code found.
<!-- / flags start -->
<div>
<if condition="$post[field7]"><img src="images/flags/$post[field7].gif"></if>
<if condition="$post[field8]"><img src="images/region/$post[field8].gif"></if>
</div>
<!-- / flags end -->
Notice i have my field#s in, not the display #'s
Copy the folders 'flags & 'region' to your www.site-name.com/forum/images folder or 'styles' folder of style been used.
Options for flags selection should be in user profile and thats it.
P.S. works well on 3.6.9
clothahump
04-08-2008, 08:18 PM
Installed and Uninstalled within 30 minutes, images do not show for me, maybe try it again when it works.
Digital Jedi
04-08-2008, 09:45 PM
Ok, hmm i think i might just search for a new one or make a new one. I just noticed that the flags are quite pixilized or distorted.
Pixelated? There's no reason they should be pixelated. Did you alter the size of the images at all? These images are very tiny and will distort if you try to enlarge them. They should look like this, exactly like they do in the Screenshot:
https://vborg.vbsupport.ru/attachment.php?attachmentid=78430&d=1207694095 https://vborg.vbsupport.ru/attachment.php?attachmentid=78431&d=1207694095 https://vborg.vbsupport.ru/attachment.php?attachmentid=78432&d=1207694095
Yeah, the flags are not all what i expected it to be but can work for now. I also noticed that if nothing shows up after copying the code to postbit_legacy its best to try putting the code in postbit only.
That's because postbit and postbit_legacy are two different style options. For example, vBulletin.org uses postbit, with the Avatars and User Information above everyone's posts. But some forums, like mine, use postbit_legacy, with the avatar and info to the left hand side of all the posts. You put this code in whichever template your using for your forum.
Installed and Uninstalled within 30 minutes, images do not show for me, maybe try it again when it works.
This is a very simple template edit. It works on everyone's forum, regardless of version. But if it's not working for you, then you've put the code in the wrong template or placed it in the wrong spot.
birdie
04-13-2008, 06:10 AM
Installed and working great.
Is it possible to add a "world" or "global" flag? Perhaps the United Nations flag.
I have two user names on my forum; one is 'Admin' in which I list my location as cyberspace - I use this user name for admin & mod functions, so do not want to be linked to any particular country; the other username is my name in which I use to take part in discussions, so do not mind having that name linked to a particular country.
GremlinPrince
05-18-2008, 12:04 PM
thank you for this :) installed
Pirat3
09-17-2008, 04:24 AM
does this work on 3.7?
siddal
09-17-2008, 06:29 AM
Very nice, works in my vBulletin 3.7.3 Patch Level 1.
Thank you, Carpe :)
Digital Jedi
09-18-2008, 01:32 AM
does this work on 3.7?
Yes, its' just a template edit. Nothing version specific about it.
Keyser S?ze
10-31-2008, 03:36 AM
u have the images linked wrong, its giving u text cuz it cant find the image
this working in 3.7.x?
GlamRockTalk
11-21-2008, 06:14 PM
Very cool mod..it ROCKS! :D
I'm going to be doing the https://vborg.vbsupport.ru/showthread.php?t=184136 mod, so I wanted this to be part of one of the 'tabs' ... thanks Carpe and thanks to DJ for the updated files in Post #44 :D
And for those of you wondering, it worked perfectly in 3.7.3. As DJ mentioned, it's template based, so you're good to go.
squiky2
11-21-2008, 06:21 PM
Good :)
hey i'm using 3.7.4 and it's only appearing as the name of the country in the "about me" section.
could anyone help me? appreciated, i also checked double checked the process of installation.
Keyser S?ze
11-26-2008, 08:17 PM
this is a col mod, but would be cooler if it worked in 3.7.4, its no longer supported i guess so i suppose we are screwed
GlamRockTalk
11-26-2008, 11:42 PM
I'm using it on a 3.7.3 install. I haven't tried it on the 3.7.4 one yet though. I'll test it out and see if it works or not. :)
Digital Jedi
11-27-2008, 03:30 AM
hey i'm using 3.7.4 and it's only appearing as the name of the country in the "about me" section.
could anyone help me? appreciated, i also checked double checked the process of installation.
What code are you using?
this is a col mod, but would be cooler if it worked in 3.7.4, its no longer supported i guess so i suppose we are screwed
It's just HTML and variables added to your templates, and this hasn't changed between versions. It will still work in 3.7.4.
What code are you using?
country only code, the problem is that it only appears in the "about me" section, and it appears as the name but not image.
Digital Jedi
12-05-2008, 04:42 PM
country only code, the problem is that it only appears in the "about me" section, and it appears as the name but not image.
Oh, I see what you mean. This is not meant to show up as an image in your profile. It's only meant to show up as an image in the postbit.
Oh, I see what you mean. This is not meant to show up as an image in your profile. It's only meant to show up as an image in the postbit.
yeah but it's not even appearing at all when you post. please have a look, www.liberty-generation.co.uk
it's a really nice mod and i want it to work.
Digital Jedi
12-14-2008, 09:33 PM
yeah but it's not even appearing at all when you post. please have a look, www.liberty-generation.co.uk (http://www.liberty-generation.co.uk)
it's a really nice mod and i want it to work.
All your forums are set to private, so I can't really see anything.
Fynnon
12-14-2008, 10:14 PM
Hi, i found this great looking countries flags that can be used with this Flag Mod ...
Unfortunately a few flags are missing, i only found 23, i`m wondering if someone has the rest !?
90603 90604 ...and 21 more !~
If you have them please share !
Thank You!
-i attached the 23 flags i have right now-
90605
GlamRockTalk
12-15-2008, 11:43 AM
Fynnon, those are great looking flags. :D
Can anyone get the rest or re-create them?
Digital Jedi
12-15-2008, 03:10 PM
Those flags have been released here in the graphics section. And if I remember correctly, the thread starter's friend had made them, not a designer here on the site. I don't think the original designer plans on making anymore. Though I have been looking into making something similar. It's just I've not done a lot of work with displacement maps, much less in animation.
Naldo41
12-16-2008, 06:14 PM
i am trying to add the ALT command useing {$file['name'] into the existing code so when u place your mouse over the image it will tell u the ie file name. so u can see what country the flag is from. But I cant seem to get it to work
Any help appreciated
Digital Jedi
12-16-2008, 10:22 PM
i am trying to add the ALT command useing {$file['name'] into the existing code so when u place your mouse over the image it will tell u the ie file name. so u can see what country the flag is from. But I cant seem to get it to work
Any help appreciated
Just add alt="$post[fieldXX]" into the IMG tag.
Naldo41
12-17-2008, 01:30 PM
Thank you Digital Jedi.
rolandogomez
12-20-2008, 10:41 PM
Would love to add these in the member's profile page, anyone know the code for us non-coders? Thanks, rg.
ChicagoCoin
02-25-2009, 03:51 AM
Just add alt="$post[fieldXX]" into the IMG tag.
Thank You, I just added that and it's much better, you don't have to be a flag expert anymore and I'm learning different countries flags without looking at profiles.:up:
eric8476
11-10-2009, 10:17 PM
I have 3.7.3 and I installed like the instructions said and its not working.
eric8476
11-10-2009, 11:50 PM
got it, needed to post the code in postbit
MRGTB
11-14-2009, 03:08 AM
So people can hover their mouse over the flag and see the country ALT text title. Use this below. I've also added closing "backslash" too for img tag
<div>
<if condition="$post[fieldX]"><img src="images/flags/$post[fieldX].gif" alt="$post[fieldX]" /></if>
</div>
gnagplank6
11-15-2009, 03:04 AM
Is there any way I can get two nationality flags???? Instead of one country and one region???
I installed the country mod only but would love to have two countries.
Wonderful Mod!!!!
THANK YOU DIGITAL JEDI!!!!
Very easy and I made the common error of installing in postbit legacy when I am running postbit.
Installed perfectly in 3.8+
andie215
11-21-2009, 11:19 AM
So people can hover their mouse over the flag and see the country ALT text title. Use this below. I've also added closing "backslash" too for img tag
<div>
<if condition="$post[fieldX]"><img src="images/flags/$post[fieldX].gif" alt="$post[fieldX]" /></if>
</div>
Thx for the mod and the alt bit :) works fine in 3.8.3 but wouldnt work until i added the code in postbit ...
MagicThemeParks
04-21-2010, 10:28 AM
Works great for 3.8.5 and thanks to DJ for the "alt" instructions in this post (https://vborg.vbsupport.ru/showpost.php?p=1687005&postcount=149) and the updated list and flags in this post (https://vborg.vbsupport.ru/showpost.php?p=1363487&postcount=44) :up:
Digital Jedi
04-22-2010, 03:36 AM
Works great for 3.8.5 and thanks to DJ for the "alt" instructions in this post (https://vborg.vbsupport.ru/showpost.php?p=1687005&postcount=149) and the updated list and flags in this post (https://vborg.vbsupport.ru/showpost.php?p=1363487&postcount=44) :up:
I've been meaning to release this in a separate thread. I added a few things since, like regional flags for Ireland. I don't think Carpe would mind too much, considering he hasn't been online since 2007, and it's not really a major code thing. I think it's even one of the tutorials on vB.com.
MagicThemeParks
04-22-2010, 10:37 AM
DJ, I wouldn't think that Carpe would mind at this point.
By the way, the updated Irish flags were included in the zip file already, right? I didn't want to be missing any flags :)
Papa Bear
05-01-2011, 08:43 PM
works great on 3.87
av8or1
05-30-2011, 01:55 AM
For those running vB 4 (mine = 4.1.3), the template text to search for is:
vb:if condition="$post['joindate']
And the code has changed in vB 4+ slightly too:
<!-- / flags start -->
<div>
<vb:if condition="$post[fieldXX]"><img src="images/flags/$post[fieldXX].gif" alt="$post[fieldXX]"></vb:if>
<vb:if condition="$post[fieldXY]"><img src="images/region/$post[fieldXY].gif" alt="$post[fieldXY]"></vb:if>
</div>
<!-- / flags end -->
Assuming of course that you want to put the flags before the location text, which follows the joindate text in the default style in 4.1.3.
Hope this helps.
UPDATE: This didn't work. I just see "$post[fieldXX]" instead of the flag. It appears that this var isn't being evaluated ... I'll keep working on it.
UPDATE TO THE UPDATE: Ok I got it to work. For vB 4+ you need this:
<!-- / flags start -->
<div>
<vb:if condition="$post['fieldXX']"><img src="images/flags/{vb:raw post.fieldXX}.gif" alt="{vb:raw post.fieldXX}"></vb:if>
<vb:if condition="$post['fieldXY']"><img src="images/region/{vb:raw post.fieldXY}.gif" alt="{vb:raw post.fieldXY}"></vb:if>
</div>
<!-- / flags end -->
Again, hope this helps someone.
odie3
08-26-2011, 02:13 PM
Thanks av8or1!!! Works like a charm.
I put my bits under the insta messengers :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.