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

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

Category: Show Thread Enhancements - Version: Unknown Rating:
Released: 05-31-2004 Last Update: Never Installs: 32
 
No support by the author.

Well, i looked all over the forums but couldn't find this countryflag mod; however, i found it on vb.org instead. I wonder why did awesome hack ain't officially released here for vb members.

All credits go to SmartGnome for orginal hack and AJR, Pingu and Stasik who made the hack for vb 2.2.x.

Go to AdminCP > Profile Fields > Add new Profile field > Single Select Menu >

Title > Country

Description > This shows your country flag in postbit.
Options: copy and paste list of country in flag_list.txt to this option field
Default Option: Yes, but not blank
Display Page: Thread Viewing

-----------------------
Optional:
Run this following query to set Undisclosed as default for all users or it would displays images as X's.
HTML Code:
UPDATE `userfield` SET `fieldX` = 'Undisclosed';
-----------------------

Templates edit:

in postbit(_legacy)

FIND
HTML Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
BELOW ADD:

HTML Code:
<if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if>
Change X to the field id.
Upload /flags to /images/misc/flags of your forum dir


Note:
Image: <if condition="$post[fieldX] != Undisclosed"><div>Country: <img src="$stylevar[imgdir_misc]/flags/$post[fieldX].gif" alt="$post[fieldX]" align="center" /> </div></if>
Text: <if condition="$post[fieldX] != Undisclosed"><div>Country: $post[fieldX]</div></if>

Show Your Support

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

Comments
  #32  
Old 10-30-2004, 09:33 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fin the section of your postbit_legacy template that does the ip functions (should be $post[iplogged] ) then add the postbit section of the code on a new line directly below there instead of where it states it wants it.

To make the text country smaller use class="smallfont" either within the existing <div> <font> or whatever other tags it has around it. This will then make it set to the smallfont value in your main CSS.
Reply With Quote
  #33  
Old 11-11-2004, 02:08 PM
BAGHDAD-IRAQ BAGHDAD-IRAQ is offline
 
Join Date: Oct 2004
Location: Denmark
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to put the flag in the profile page in members list?
Reply With Quote
  #34  
Old 01-24-2005, 01:47 AM
plcguru plcguru is offline
 
Join Date: Mar 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I have upgraded from Vb2.x to 3.x The original users country is in the user table. This mod puts it in the userfield table. How do I import the old users country data into the userfield table so everyone doesn't have to choose their country again?

Thanks!
Reply With Quote
  #35  
Old 01-24-2005, 04:31 AM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod!!

*Installs
Reply With Quote
  #36  
Old 01-29-2005, 09:52 PM
imported_1yesfan imported_1yesfan is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to put the flag in the profile page in members listalso!?!?!?!?!?!?!
Reply With Quote
  #37  
Old 01-29-2005, 10:09 PM
imported_1yesfan imported_1yesfan is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am lost, where the hell do I put this so my X goes away!!!!

UPDATE `userfield` SET `fieldX` = 'Undisclosed';
Reply With Quote
  #38  
Old 01-30-2005, 12:12 AM
imported_1yesfan imported_1yesfan is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I got the query thing done and it working in some of my skins. Skins that I have downloaded to my server, it does not work in those, I am getting the red x's. it does work in the skins that I set up myself from the Admin cpanel, anything I downlaoded to my panel, no go! Any idea??? I have double checked all my code. I am running 3.0.3
Reply With Quote
  #39  
Old 01-30-2005, 12:34 AM
imported_1yesfan imported_1yesfan is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i got it. image path on the dwnld skins is diff. upload plags to right place and all ok.
Reply With Quote
  #40  
Old 01-30-2005, 03:02 PM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it setup and also added state flags for US members. If anyone wants to check it out Click Here
Reply With Quote
  #41  
Old 01-30-2005, 05:57 PM
imported_1yesfan imported_1yesfan is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can this hack be changed to allow folks to just LEAVE the field blank if they do not want a flag at all!?!?!?!?!?!
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 11:49 AM.


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.07273 seconds
  • Memory Usage 2,302KB
  • 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
  • (3)bbcode_html
  • (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