PDA

View Full Version : Country flag hack?


Kohhal
01-21-2004, 07:38 AM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=27485" target="_blank">vb2 hack</a>. Is anyone working on this for hack for vb3? Anyone interested in doing it? Anyone else interested in having it????

StarBuG
01-21-2004, 08:27 AM
Yeah I would be interested too

Star

Kohhal
01-28-2004, 12:34 PM
Found it, here! (http://www.vbulletintemplates.com/mods/showthread.php?t=4113)

dano
02-25-2004, 05:42 PM
Found it, here! (http://www.vbulletintemplates.com/mods/showthread.php?t=4113)
Darn, the link is broke and I cant find it anywhere? Anyone have any ideas?

ChuanSE
02-26-2004, 02:03 AM
I need this one to :/
it used to be on vbt, but seems it was removed :(

Kohhal
02-26-2004, 11:13 AM
I need this one to :/
it used to be on vbt, but seems it was removed :(
Yeh, there was a sh*tload of threads removed from vbt, don't know why. I asked the Mods but they don't seem bothered about it :(

I saved the zip for this hack anyhoo, it's attached, hope it helps!

G :)

dano
02-26-2004, 04:17 PM
Yeh, there was a sh*tload of threads removed from vbt, don't know why. I asked the Mods but they don't seem bothered about it :(

I saved the zip for this hack anyhoo, it's attached, hope it helps!

G :)
NICE.

Thanks a lot.

ChuanSE
02-27-2004, 01:38 AM
GREAT, I love you for this ;) hehehe

ChuanSE
02-27-2004, 07:29 AM
Btw, if someone is interested in flags with all the same size (30x15)....
The ones in the mod have different sizes.

Roody
03-07-2004, 03:41 PM
Does anyone know which template we are supposed to be editing this in in vB3? The directions say "postbit_userinfo", but there is no template called that.

spence2
03-07-2004, 04:52 PM
Does anyone know which template we are supposed to be editing this in in vB3? The directions say "postbit_userinfo", but there is no template called that.

I think it is postbit_legacy.

Let us know, please.

Roody
03-07-2004, 05:08 PM
I think it is postbit_legacy.

Let us know, please.

A search for the line mentioned in the hack said "Not Found" so Im guessing that wasn't it. Any other ideas?

Kohhal
03-08-2004, 07:55 AM
postbit or postbit_legacy, depends which style postbit you are using, put it where you want...

Roody
03-08-2004, 10:07 PM
Perhaps the line to edit has changed. I cant seem to find this code. Can someone help me with this? I have searched in all the mentioned templates above and nothing. :(

xg3
03-09-2004, 12:24 AM
is there a hack to allow you to add more than 30 countries?

Kohhal
03-09-2004, 10:07 AM
is there a hack to allow you to add more than 30 countries?
If you're using RCx then you can use as many countries as you like, that restriction was removed a while ago :D

Roody
03-10-2004, 12:39 AM
If you're using RCx then you can use as many countries as you like, that restriction was removed a while ago :D
Any ideas on my last question?

Roody
03-10-2004, 09:01 PM
Perhaps the line to edit has changed. I cant seem to find this code. Can someone help me with this? I have searched in all the mentioned templates above and nothing. :(

bumping this up

ChuanSE
03-11-2004, 04:52 AM
Roody,

if you want the flags to appear in the new postbit style, you add the code to "postbit" & if ya want them in the old style, you will have to add the code to "postbit_legacy".

Works for me ;)

But what was the line you didn't found?

ChuanSE
03-11-2004, 05:04 AM
btw, i add a little tweak to the img link so that if you hoover over the flag, it doesn't say country but it says the countryname.

this is the normal line:

<if condition="$post[field18]"><img src="images/flags/$post[field18].gif" border="0" /></if>


this is what i changed it to:

<if condition="$post[field18]"><img src="images/flags/$post[field18].gif" border="0" alt="$post[field18]" /></if>


So this way it pops up the countryname when hoovering over the flag :)
just a simple alt tag...

Roody
03-14-2004, 04:55 PM
Roody,

if you want the flags to appear in the new postbit style, you add the code to "postbit" & if ya want them in the old style, you will have to add the code to "postbit_legacy".

Works for me ;)

But what was the line you didn't found?

When I get back to my house I will check it out again and let you know if I have any issues.

:)

Diva
03-23-2004, 04:33 PM
Yay! The flag hack is here! I am using vb3Gold. Are there any changes for this?

Also, if I want to replace the "Location:" with the flag, what do I need to do?

PS: I tried it and dont see where to enter the different flags in the profile.

ChuanSE
03-24-2004, 05:14 AM
Yay! The flag hack is here! I am using vb3Gold. Are there any changes for this?

Also, if I want to replace the "Location:" with the flag, what do I need to do?

PS: I tried it and dont see where to enter the different flags in the profile.

That would be rather easy to do :)

replace this

<if condition="$post[field2]">Location: $post[field2]</if>


with this

<if condition="$post[field18]"><img src="images/flags/$post[field18].gif" border="0" alt="$post[field18]" /></if>

the field2 stands for the field location ppl fill in with registration, field 18 stands for the flag field i created for my board, so you'll have to check the fieldnumber in your admincp (registration options)...

Cheers

https://vborg.vbsupport.ru/external/2004/04/1.php (http://forums.puredj.com)

Diva
03-24-2004, 12:14 PM
Hi ChuanSE! Will that show the flag then the location? EX:

[USA flag] California

Right now I cant seem to get the flag to show. In VB3G, Where is the options field ?

ChuanSE
03-25-2004, 06:14 AM
I think you didn't really followed the install instructions...
Delete the user profile field and start over ;)

this is what it should look like in admincp:

http://puredj.net/forums/transfer/countryflag.jpg

Lemme know if it works out :)

Kohhal
03-25-2004, 09:37 AM
...Where is the options field ?
You chose the wrong type of field, make sure you set it up as "Single-Selection Menu".

Diva
03-25-2004, 04:51 PM
Oops! Thank you, TheMasterG. I selected the single text instead. It works now.

PS: Thanks to ChuanSE, too. :p ;)

ChuanSE
03-26-2004, 06:30 AM
Hehe :p

Alien
03-26-2004, 07:11 AM
Works great, thanks a bunch!

8472
03-26-2004, 01:29 PM
attached the flags of all 50 US states and some 5 misc flags

great hack .. thanks a lot

my community loves it

8472
03-28-2004, 10:56 AM
some canadian flags this time

ChuanSE
03-29-2004, 05:28 AM
i thought it was about COUNTRY flags :p

ajk
04-26-2004, 07:33 AM
btw, i add a little tweak to the img link so that if you hoover over the flag, it doesn't say country but it says the countryname.

this is the normal line:

<if condition="$post[field18]"><img src="images/flags/$post[field18].gif" border="0" /></if>


this is what i changed it to:

<if condition="$post[field18]"><img src="images/flags/$post[field18].gif" border="0" alt="$post[field18]" /></if>


So this way it pops up the countryname when hoovering over the flag :)
just a simple alt tag...

This tweak works nice!

ajk
05-01-2004, 05:15 AM
I think it is postbit_legacy.

Let us know, please.

YES, but two should be edited depending on wether you use the side or top style info.

They should be postbit and postbit_legacy.

Also, vB 3.01 FIXES the 32 line drop down limit.

leitel
05-01-2004, 08:21 PM
Just curious. It seems that whatever I do, the user is prompted with the first item in the list of countries. What I want to accomplish is for the user to see a blank country resulting in an error if they do not select one from the list.

I have also tried insert a blank line at the beginning as well.

Thanks! :)

ajk
05-01-2004, 09:03 PM
Just curious. It seems that whatever I do, the user is prompted with the first item in the list of countries. What I want to accomplish is for the user to see a blank country resulting in an error if they do not select one from the list.

I have also tried insert a blank line at the beginning as well.

Thanks! :)


I don't know if my setup on 3.01 wil help you.
I used "Yes, but leave a blank space."

leitel
05-01-2004, 09:42 PM
I am using 3.01 and I tried both options. Both presents the first item in the list even if I include a blank line at the top. :S

leitel
05-05-2004, 01:56 PM
Is anyone that is using this hack able to present the user with a BLANK entry while requiring the user to SELECT a NON-BLANK selection before continuing? :)

leitel
05-05-2004, 01:59 PM
Additionally, for those of us using this hack, it would be helpful if when a user comes to the site AND has NOT yet made his selection of a country be PROMPTED to make his selection BEFORE continuing to use the site. I recall in a previous version of vB this being possible. I'll go fish a bit more on this as well.

stryka
06-04-2004, 03:42 PM
ooohhh... yah.... cuz after the vb3 upgrade... everyone will lose the vb2 hack with their flag so they should be prompted to update their info...

any update on this?

Roms
09-10-2004, 02:57 AM
WAAAHHHOOO! I've been wanting this forever!! works great!!

oldfan
09-30-2004, 12:42 PM
works great, thanks :)

lanc3lot
10-01-2004, 12:44 PM
Is this hack working for 3.0.3?

oldfan
10-01-2004, 05:22 PM
Is this hack working for 3.0.3?


yep :)

lanc3lot
10-01-2004, 09:22 PM
Thanks mate

Neutral Singh
11-04-2004, 11:20 AM
I think this thread should be renames as Country Flag Hack and placed in an appropriate section in this forum... :confused: took me a while to locate this hack...

Regards

ChuanSE
11-05-2004, 09:50 AM
I think this thread should be renames as Country Flag Hack and placed in an appropriate section in this forum... :confused: took me a while to locate this hack...

Regards


appropriate section == http://www.vbulletintemplates.com

This is a vB "Hack" board, you are referring to a template altering issue ;)

gilbert
01-13-2005, 05:33 AM
This was a real mission for me with VB 3.03 using the instructions included but I finally got it working. Here are some quick instructions:

1. Download the hack
2. Upload the flags, we will use www.yourforum.com/flags/ as an example
3. Note: You do not have to create any new user profiles as there is already a profile for country. The user profile ID for country should be 6 by default.
4. Edit the postbit template,

find

<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>

below add

<if condition="$post[field8]"><div>$vbphrase[location_perm]: <img src="http://www.yourforum.com/flags/$post[field6].gif" border="0" alt="[field6]" /><br /></if>

5. This should complete the install. You may have to play around with the ="$post[field8]">, just keep changing the field# until you find a spot your are looking for when viewing a thread. For me, 8 worked perfect. Also note that the forum I installed this on did not show the location: in the postbit, if you want to show the location and the country, you will have to create a phrase called "country_12345" with the text "Country: " and then use this code in the postbit style instead:

<if condition="$post[field8]"><div>$vbphrase[country_12345]: <img src="http://www.yourforum.com/flags/$post[field6].gif" border="0" alt="[field6]" /><br /></if>

Or if you want to do it without creating a new phrase, just put:

<if condition="$post[field8]"><div>Country: <img src="http://www.yourforum.com/flags/$post[field6].gif" border="0" alt="[field6]" /><br /></if>

Hope this saves some people 2 hours as it would have saved me if I would have known this :)

gilbert
01-13-2005, 05:43 AM
Scratch step number 3. Some people may not have the country list already there. If not, insert all the countries from the flag_list as VB3 allows to add them all. See attachment

T3MEDIA
01-21-2005, 07:59 PM
What does this hack do? I saw a site that had country flags scrolling for online users... that is what I would love.
Is there a clear set up on how to do this hack? I really dont want to mess with my site more than it is...

or a screen shot or something! LOL.

T3MEDIA
01-23-2005, 07:27 PM
Ok I see now what it does. How can I put this flag in areas such as private messages???

SilverBoy
02-18-2005, 12:17 PM
I think the flag hack for vb2.x best than this, coz in vb2 it was modification in database, an altering php files, so u can more control the flags and translate them to any langauge instead of the names of flags files.

coRtALoS
04-08-2005, 04:55 AM
I'd like to share a small modification I've made to this hack which I've found my members really enjoy.

This addon will allow members to display their US State, or Canadian Provincial flags ONLY if they have the United States or Canada selected as their Country.

In addition, if they pick a country that is part of the European Union, it will automatically display the EU flag next to it as well.

I've attached an installer and all necissary files to get it working with the Country hack.

It's a very small addon, and only took me about 5 mins (tops) to get to work once the Country Flag hack was installed.

If you require any technical assistance with this hack, as I am posting this thread on both vBulletin.org (http://www.vbulletin.org), and vBulletinTemplates.com (http://www.vbulletintemplates.com), I will provide technical support for this addon only on my own forums located here:
http://www.battleforums.com/forumdisplay.php?f=288

I also welcome anyone PMing me on my forums as I check my PM box more often than my cellphone voicemail. Please do not PM me here however, as I am not nearly as active on this account.

Enjoy!

~coRtALoS
BattleForums.com, StarCraftForums.com, WarCraftForums.com, DiabloForums.com, and BattleNetwork.com (http://www.battleforums.com) Administrator

~~~Edit~~~

Updated .zip and .txt file to include Quebec Province. :p

~~~2nd Edit~~~

Added European%20Union.gif to .zip

T3MEDIA
04-08-2005, 12:06 PM
cool

Limey-YMR
04-18-2005, 03:10 AM
~~~Edit~~~

Updated .zip and .txt file to include Quebec Province. :p

Looks like a great addition - installing now, the EU flag does not appear to be in the installer, though.

This may be a dumb question, but do these extra template conditionals cause much extra server load?

T3MEDIA
04-18-2005, 11:18 AM
Not a dumb question at all. It will (to be honest) but so low you will NEVER know. In other words dont worry about it.

coRtALoS
04-18-2005, 04:01 PM
Thanks T3. If you also want to see a working copy of it, just go to any thread on my site http://www.battleforums.com/index.php?. Pretty much every normal poster there is using it now.

I updated the .zip with the EU flag, but I'll attach it in here for ya Limey for convenience purposes.;)

You want to put this in your /images/misc/flags/ folder.

Rickie3
06-12-2005, 10:30 AM
thankyou worked a treat

Snake
06-12-2005, 12:45 PM
Thanks guys for the hack instructions. :) I'm pretty sure you'll like my smilies below. Only 2 screenshots are available. Enjoy!

mamboking
06-21-2005, 02:24 PM
I am hoping that one of you wonderful coders will develop a hack that would display the country flag .gif in the user's profield instead of the flag text name.

Snake
06-21-2005, 03:58 PM
Profield? Do you mean in thread or profile view?

mamboking
06-21-2005, 11:31 PM
Profield? Do you mean in thread or profile view?


Yes. Sorry about that, I was rushing to post while at work.

Snake
06-22-2005, 08:34 AM
I thought it shows the country image already in thread view. O.o

Rickie3
06-22-2005, 09:09 AM
it does here :-)

mamboking
06-24-2005, 03:11 AM
I thought it shows the country image already in thread view. O.o

I'm not sure wheter or not you are responding to my comment but my request is for view profile not thread view. If not please disregard

Thanx

Snake
06-24-2005, 03:12 PM
Yes. Sorry about that, I was rushing to post while at work.
Well you were'nt specific in your post. In my opinion, the text is enough instead of an image.

mamboking
06-27-2005, 05:28 PM
Ok, let me start over.

You're right I wasn't clear in my post but I thought it bacame clear after you ponited that out and I apologized for the error and stated yes.

I guess I miss read your response. I thought it origianally only asked if I was referring to profile view and I responded yes. But now it looks like you asked if I was referring to thread or profile view. So my answer to that is Profile View.

Your opinion is well recieved but I would like it better if there was a flag image displayed instead of the name. But because I can't code it myself, I am here trying to get some help from somebody. So if this is not something you think is worthy of your time or liking than hopefully someone else can help me with this task because that what I want.

So if anyone could provide the code to make the minor change where the flag image would show in the profile view instead of the flag name, I would appreciate it a lot. If you can help please post the revision here.

Thank you in advance.

Snake
07-05-2005, 09:32 AM
Sorry mamo, I ain't a coder so I don't think I can help you out. :( I am already looking for help y'know.

Anyways, I have a few suggestions and ideas for this hack is there anyone who is willing to submit this hack to the database and support it? This hack is lonely and is looking for a perfect author who can really care about it. :D

Snake
07-06-2005, 09:56 AM
Well?

sim tech
08-11-2005, 08:12 AM
I had a similar mod, where I took the "awareness ribbons" version and changed it to flags that people could buy in Ushop. It's a big hit on my site and I have tons of flags:
http://www.simtechonline.com/atg1.gif

I also added in a bunch of special interest flags (armed sevice flags, special interest groups, etc.).

If anyone wants it (but I don't know if it'll work with 3.5) please let me know.

Examples: (threads on my forum that shows the flags)
http://www.simtechonline.com/forums/showthread.php?t=156&highlight=flags

http://www.simtechonline.com/forums/showthread.php?t=377&highlight=flags

andysv1k
08-14-2005, 11:04 AM
im having problems installing this mod on ver 3.07

is there any differences in the install to what is posted in this thread?

i think ive done everything right but it just doesnt display any flags :disappointed:

Andy.

Snake
08-14-2005, 03:27 PM
andy, I will be creating my own country flag hack pretty soon. I am not sure when it'll be released but the only thing I can say is... soon. ;)

andysv1k
08-14-2005, 06:37 PM
Sounds good Snake, im sure whatever im missing is probably something very simple, too simple to notice!

I await your hack eagerly! :)

cheers

Andy.