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
  #12  
Old 10-06-2005, 07:44 AM
SnowBot's Avatar
SnowBot SnowBot is offline
 
Join Date: Jul 2003
Location: Manchester UK
Posts: 631
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had one almost the same as this. Thanks for your efforts
Reply With Quote
  #13  
Old 10-06-2005, 10:59 AM
HC. HC. is offline
 
Join Date: Mar 2004
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

instead of country is there away to do state flags since most of my users are in the US and CA
Reply With Quote
  #14  
Old 10-06-2005, 11:11 AM
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Quote:
Originally Posted by Boofo
Well, I for one am glad to see you releasing stuff again.

Is there a way to make this work in the memberlist, too?
okie, this add-on is written as requested by bofo.

#------------------

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>
BELOW, ADD:
HTML Code:
		<if condition="$userinfo[fieldX] != ''"> <img src="images/flags/$userinfo[fieldX].gif" title="$userinfo[fieldX]" align="center"></if>
Reply With Quote
  #16  
Old 10-07-2005, 11:31 PM
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Damn, how cool are you? Thank you!
Reply With Quote
  #17  
Old 10-08-2005, 01:55 AM
DefenceTalk DefenceTalk is offline
 
Join Date: Dec 2004
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Quote:
Originally Posted by DefenceTalk
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...
Did you adjust $userinfo[fieldX] to your own ID?
Reply With Quote
  #19  
Old 10-08-2005, 05:36 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has the memberlist add-on been added to the zip in the first post, sir?
Reply With Quote
  #20  
Old 10-08-2005, 06:35 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

Hmm.. Why exactly have you posted a plugin for the memberlist addon?

The template edits should work fine without it.
Reply With Quote
  #21  
Old 10-08-2005, 06:39 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
Hmm.. Why exactly have you posted a plugin for the memberlist addon?

The template edits should work fine without it.
Have you tried it without the plug-in?
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:19 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.04532 seconds
  • Memory Usage 2,316KB
  • 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
  • (6)bbcode_html
  • (3)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
  • (3)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