The Arcive of vBulletin Modifications Site. |
|
Country Flag Details »»
|
|||||||||||||||||||||||||
Well, i looked all over the forums but couldn't find this countryflag mod; however, i found it on vb.org instead. I wonder why did awesome hack ain't officially released here for vb members.
All credits go to SmartGnome for orginal hack and AJR, Pingu and Stasik who made the hack for vb 2.2.x. Go to AdminCP > Profile Fields > Add new Profile field > Single Select Menu > Title > Country Description > This shows your country flag in postbit. Options: copy and paste list of country in flag_list.txt to this option field Default Option: Yes, but not blank Display Page: Thread Viewing ----------------------- Optional: Run this following query to set Undisclosed as default for all users or it would displays images as X's. HTML Code:
UPDATE `userfield` SET `fieldX` = 'Undisclosed'; Templates edit: in postbit(_legacy) FIND HTML Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div> HTML Code:
<if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if> Upload /flags to /images/misc/flags of your forum dir Note: Image: <if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if> Text: <if condition="$post[fieldX] != Undisclosed"><div>Country: $post[fieldX]</div></if> Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
[high]* chuanse installs
[/high]
|
|
#3
|
||||
|
||||
|
Quote:
For the people with spanish forums, I have modified the flags_list file to reflect the Spanish name of the countries and the images for that. I attach the flag_list and the images if you want it to be in spanish. |
|
#4
|
|||
|
|||
|
Just what I was looking for ! thanks !
![]() A question though, is it a must to set Display Page: Thread Viewing. Can it be on Edit Profile instead ? |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
cinq, could put it anywhere you want.
as for running the UPDATE `userfield` SET `fieldX` = 'Undisclosed'; query. It's unnecessary, IMO. You could have an empty field in the first line and set it as default. Then using <if condition="$post[fieldX]"> flag code here </if> would give what you want. |
|
#7
|
|||
|
|||
|
Quote:
|
|
#8
|
||||
|
||||
|
Change this option:
Display Page: Edit Profile |
|
#9
|
||||
|
||||
|
I went al litte further and created a gif called "Undisclosed.gif" and placed it in the flags folder on the server. I then removed the IF statement from the postbit so that it would show the undisclosed gif file as the default. The undisclosed gif is basically a small image reminding the user to update their profile :-)
Here you go- http://www.trackpads.com/forum/showthread.php?t=135642 |
|
#10
|
||||
|
||||
|
So, all I have to do is remove that IF statement and this will work? Forgive me I am a n00b.
|
![]() |
|
|