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
  #102  
Old 05-02-2006, 08:16 AM
monkeywarplane monkeywarplane is offline
 
Join Date: Sep 2005
Location: Bay Area
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, the user profile is working great and the flags are showing on the thread/post profile but I am getting an additional if condition=" != ''"> above the flag... for example...

Quote:
Join Date: Mar 2004
Location: Israel
Posts: 1,172
if condition="israel != ''">
Country:
http://forums.interbasket.net/showthread.php?t=113 (check second post)

I am running vb 3.5.4

Any ideas?

Stuart
Reply With Quote
  #103  
Old 05-02-2006, 08:37 AM
monkeywarplane monkeywarplane is offline
 
Join Date: Sep 2005
Location: Bay Area
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by monkeywarplane
Any ideas?
Forget it, silly mistake... silly question, it's 2:30 in the morning

Stuart
Reply With Quote
  #104  
Old 05-04-2006, 02:49 PM
GNDI's Avatar
GNDI GNDI is offline
 
Join Date: Jun 2005
Location: Denmark
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you just want the country name to show up, then you just add the following syntax

Find:
PHP Code:
<div class="info">$post[musernameis $post[onlinestatus] </div
ADD BELOW: where you find sweetable
PHP Code:
<if condition="$post['fieldX']"><div class="info">$vbphrase[location_perm]: $post[fieldX]</div></if> 
REMEMBER to replace the "X" whit the field number as describet in the original script
Reply With Quote
  #105  
Old 06-10-2006, 06:37 PM
putergirl putergirl is offline
 
Join Date: May 2006
Location: usa
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
how about make chanage in both postbit and postbit_legacy templates.
hello, I tried making the changes to both postbit and postbit legacy and still no flag shows up. Here is what I did:


Step one completed as stated

Step two:
Code:
				<div>
					$vbphrase[posts]: $post[posts]
				<if condition="$post[field5] != ''"><div>
					Country: <img src="images/flags/$post[field5].gif" title="$post[field5]" align="center">
				</div></if>

<!-- Change X to the field id. -->
Am I supposed to change 3 X's?


flag folder added: Forum/images/flags

Help?
Reply With Quote
  #106  
Old 06-13-2006, 01:30 AM
putergirl putergirl is offline
 
Join Date: May 2006
Location: usa
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #107  
Old 06-13-2006, 03:59 PM
Muscolino Muscolino is offline
 
Join Date: Mar 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you get the bit that says 'Country:'? If so I'd guess you are either added the wrong fieldID or you put the flags in the wrong location.

If you haven't even got 'Country:' displayed then I suggest you start from the beginning and go through the installation again.
Reply With Quote
  #108  
Old 06-17-2006, 07:12 PM
SHalliday's Avatar
SHalliday SHalliday is offline
 
Join Date: Jan 2002
Location: Norwalk, CT
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

**Clicked Install **

Thank you. Just want I was looking for. Now all we need are state and province flags
Reply With Quote
  #109  
Old 06-18-2006, 09:57 PM
sebbe's Avatar
sebbe sebbe is offline
 
Join Date: Feb 2006
Location: .se
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, installed!
Reply With Quote
  #110  
Old 07-02-2006, 03:44 PM
leftie leftie is offline
 
Join Date: Nov 2004
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I help run a forum that has a lot of ex pats and i have been asked if it possible to add a second flag to say where they are originally from.
Can the profile field be edited to have the option of a second flag.
Reply With Quote
  #111  
Old 07-03-2006, 09:28 AM
Masala4india Masala4india is offline
 
Join Date: Jun 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankx its working very fine..
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 01:57 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.04620 seconds
  • Memory Usage 2,317KB
  • 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_php
  • (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
  • (4)pagenav_pagelink
  • (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