![]() |
CountryFlag
Site: http://www.vbviet.org
CountryFlag Mod for vb 3.5 This hack shows user's country flag in postbit, below the user name. Original by SmartGnome, AJR, Pingu and Stasik for vb 2.2.x. 1. Go to AdminCP => Profile Fields => Add new Profile field => Single Select Menu Title > Home Country Description > Tell people where you're from. Options: [copy and paste list of countries in flags_list.txt to this option field] Set Default: Yes, Include a First Blank Option Editable By User: Yes Display Page: Edit Profile Write down your field# . i.e field6 2. Open postbit(_legacy) template, FIND: HTML Code:
<div> HTML Code:
<if condition="$post[fieldX] != ''"><div> 3. Upload /flags to images/flags to your forum dir. <!--- That's it! ---> --------------------------------------- To show countryflag in profile: Open memberinfo template, FIND: HTML Code:
<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if> HTML Code:
<if condition="$userinfo[fieldX] != ''"><div> To Show User's Countryflag in Memberlist, see this following post: https://vborg.vbsupport.ru/showpost....9&postcount=14 |
Where's the file?
|
updating... it's been so long since I last release a hack, so I forgot all the procedures. :p
|
Well, I for one am glad to see you releasing stuff again. ;)
Is there a way to make this work in the memberlist, too? ;) |
well, I can look into that option for you; however, I think that can't be done by template modding. Gotta code-hack or writing a plug-in for that.
|
I'm almost sure a plug-in could handle it. ;)
I like your gender images, by the way. ;) |
Thanks.
Hey boofee-man, you're from IA, corn state? :p |
Quote:
|
Quote:
|
Not in the apartment I live it, we don't. I think you have to go outside of Des Moines a few miles for that. ;)
Check your PMs. ;) |
I had one almost the same as this. Thanks for your efforts :)
|
instead of country is there away to do state flags since most of my users are in the US and CA
|
Just change the list of countries to a list of states, and put the state flags in the flags directory with the same names as in the state list.
|
Quote:
#------------------ Addon to show countryflag in Memberlist Open memberlist_resultbit template, FIND: HTML Code:
<a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a> HTML Code:
<if condition="$userinfo[fieldX] != ''"> <img src="images/flags/$userinfo[fieldX].gif" title="$userinfo[fieldX]" align="center"></if> |
Damn, how cool are you? Thank you!
|
For some reason, I am the image URL is missing the name of the country:
http://www.defencetalk.com/forums/images/flags/.gif In this thread... |
Quote:
|
Has the memberlist add-on been added to the zip in the first post, sir? ;)
|
Hmm.. Why exactly have you posted a plugin for the memberlist addon?
The template edits should work fine without it. ;) |
Quote:
|
Quote:
Besides which, his $showflag variable is never used? |
Actually, you're right. Plugin is unneccesary.
|
Quote:
Code:
|
I saw the flag just fine.
|
cheers :)
|
cool dude, thanks
|
Options:
[copy and paste list of countries in flags_list.txt to this option field] ----------------------------------------------------------------- I don't see this field. Am I blind are I am doing samething not right? |
copy and paste the whole content in flag_list.txt and paste into option box. ;)
|
thanks got it
|
some sexy free 18x12 flag icons for you i found on the web (list of filenames included for copy & paste)
|
Quote:
|
Quote:
|
thank you. that's nice :)
& thanks lamilein for the flags |
what do you mean change X to the field ID ?
|
Quote:
Instead of creating a new profile field, I overwrote my Location field therefore my field id is 2.. Yours is likely to be 5 or 6, depending on if you've created any custom fields previously. :) |
vBulletin Message
You did not enter the correct format for the Home Country field. Please read the field description for the expected format. |
some help please ^
im pretty sure i did everything right this is how my postbit legacy template looks like: PHP Code:
|
the vbookie part was underneath the vbphrase[posts] part so I put it in between
|
Quote:
|
When I choose my country and press save, it brings up the error page
|
All times are GMT. The time now is 04:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|