Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CountryFlag Details »»
CountryFlag
Version: 1.00, by tnguy3n tnguy3n is offline
Developer Last Online: Sep 2010 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.5.0 Rating:
Released: 10-04-2005 Last Update: Never Installs: 241
 
No support by the author.

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>
					$vbphrase[posts]: $post[posts]
				</div>
BELOW, ADD:
HTML Code:
				<if condition="$post[fieldX] != ''"><div>
					Country: <img src="images/flags/$post[fieldX].gif" title="$post[fieldX]" align="center">
				</div></if>
<!-- Don't forget to change X to the field id. -->


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>
BELOW, ADD:
HTML Code:
				<if condition="$userinfo[fieldX] != ''"><div>
					Country: <img src="images/flags/$userinfo[fieldX].gif" title="$userinfo[fieldX]" align="center">
				</div></if>
-------------------------------
To Show User's Countryflag in Memberlist, see this following post:
https://vborg.vbsupport.ru/showpost....9&postcount=14

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 10-08-2005, 06:43 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Have you tried it without the plug-in?
No, but I use similar code for my Gender userfield in the memberlist and it works fine..

Besides which, his $showflag variable is never used?
Reply With Quote
  #23  
Old 10-08-2005, 09:34 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, you're right. Plugin is unneccesary.
Reply With Quote
  #24  
Old 10-08-2005, 09:45 AM
DefenceTalk DefenceTalk is offline
 
Join Date: Dec 2004
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
Did you adjust $userinfo[fieldX] to your own ID?
Yes, I did.

Code:
 
<if condition="$post[field10] != ''"><div>
	 Country: <img src="images/flags/$post[field10].gif" title="$post[field10]" align="center">
	</div></if>
:ermm:
Reply With Quote
  #25  
Old 10-08-2005, 10:00 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I saw the flag just fine.
Reply With Quote
  #26  
Old 10-08-2005, 07:46 PM
exceem exceem is offline
 
Join Date: Sep 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cheers
Reply With Quote
  #27  
Old 10-09-2005, 04:59 AM
vibe vibe is offline
 
Join Date: Jan 2005
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool dude, thanks
Reply With Quote
  #28  
Old 10-10-2005, 09:19 PM
tuanluu tuanluu is offline
 
Join Date: Aug 2005
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #29  
Old 10-10-2005, 10:21 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

copy and paste the whole content in flag_list.txt and paste into option box.
Reply With Quote
  #30  
Old 10-10-2005, 10:28 PM
tuanluu tuanluu is offline
 
Join Date: Aug 2005
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks got it
Reply With Quote
  #31  
Old 10-12-2005, 07:37 AM
lamilein lamilein is offline
 
Join Date: Jun 2004
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

some sexy free 18x12 flag icons for you i found on the web (list of filenames included for copy & paste)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:59 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
  • Page Generation 0.04330 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete