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
  #202  
Old 08-04-2007, 07:47 AM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n View Post
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>

How about an edit in the members signature that appears next to the actual post? Where to you make this change. This flag thing is great but really the most impt place to put is is with the users signature, not just on their profile page
Reply With Quote
  #203  
Old 08-15-2007, 11:12 PM
Nordraserei Nordraserei is offline
 
Join Date: Oct 2005
Location: Texas
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to make it appear with the country name in it too? For example, instead of just the Danish flag, if it could be [Flag] Denmark?
Reply With Quote
  #204  
Old 08-16-2007, 06:25 PM
Stifmeister2 Stifmeister2 is offline
 
Join Date: Feb 2006
Location: Finland
Posts: 755
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nordraserei View Post
Any way to make it appear with the country name in it too? For example, instead of just the Danish flag, if it could be [Flag] Denmark?
Yes.


Instead of
HTML Code:
				<if condition="$userinfo[fieldX] != ''"><div>
					Country: <img src="images/flags/$userinfo[fieldX].gif" title="$userinfo[fieldX]" align="center">
				</div></if>

Use this:
HTML Code:
				<if condition="$userinfo[fieldX] != ''"><div>
					<img src="images/flags/$userinfo[fieldX].gif" title="$userinfo[fieldX]" align="center"> $userinfo[fieldX]
				</div></if>
Hope that helps.
Reply With Quote
  #205  
Old 11-07-2007, 11:44 PM
B_Pages B_Pages is offline
 
Join Date: Jul 2007
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if anyone(programmer with lots of VB experience) is interested in dong this hack for my forums shoot me an email or pm!
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 04:23 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.06546 seconds
  • Memory Usage 2,260KB
  • Queries Executed 21 (?)
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
  • (8)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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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