Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

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
  #42  
Old 01-30-2005, 11:28 PM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just add None to the field list. Then check for that in the template.

<if condition="$post[fieldx]&&$post[fieldx]<>None">

Do something

</if>
Reply With Quote
  #43  
Old 04-08-2005, 04:55 AM
coRtALoS's Avatar
coRtALoS coRtALoS is offline
 
Join Date: Apr 2003
Location: Northeastern U.S.
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to share a small modification I've made to this hack which I've found my members really enjoy.

This addon will allow members to display their US State, or Canadian Provincial flags ONLY if they have the United States or Canada selected as their Country.

In addition, if they pick a country that is part of the European Union, it will automatically display the EU flag next to it as well.

I've attached an installer and all necissary files to get it working with the Country hack.

It's a very small addon, and only took me about 5 mins (tops) to get to work once the Country Flag hack was installed.

If you require any technical assistance with this hack, as I am posting this thread on both vBulletin.org, and vBulletinTemplates.com, I will provide technical support for this addon only on my own forums located here:
http://www.battleforums.com/forumdisplay.php?f=288

I also welcome anyone PMing me on my forums as I check my PM box more often than my cellphone voicemail. Please do not PM me here however, as I am not nearly as active on this account.

Enjoy!

~coRtALoS
BattleForums.com, StarCraftForums.com, WarCraftForums.com, DiabloForums.com, and BattleNetwork.com Administrator

----EDIT----
Apparently this site is having difficulty hosting my attachments. You can download them either at vBulletin.org in my post here:
https://vborg.vbsupport.ru/showthrea...575#post637575
Or on my site, BattleForums.com here:
http://www.battleforums.com/showthread.php?p=1074648
Reply With Quote
  #44  
Old 05-05-2005, 04:32 PM
SHANE-D-PAIN's Avatar
SHANE-D-PAIN SHANE-D-PAIN is offline
 
Join Date: Sep 2003
Location: Sheffield, Uk
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works Like A Dream *Clicks Install*
Reply With Quote
  #45  
Old 06-06-2005, 12:40 AM
eNforce's Avatar
eNforce eNforce is offline
 
Join Date: Aug 2004
Location: Canada, AB
Posts: 341
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm so lost here. How do I know what field I have to replace X with, wtf?
Reply With Quote
  #46  
Old 06-06-2005, 01:29 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when you create the field you will see what numer is asigned to it.
Reply With Quote
  #47  
Old 06-23-2005, 11:50 PM
am-fs am-fs is offline
 
Join Date: Mar 2005
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this on Vb 3.0.7, works it seems but i have a ?
i have removed a few members and they show as guest now, it there away to remove the red x from there country?

thank
Reply With Quote
  #48  
Old 06-24-2005, 08:43 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by am-fs
I installed this on Vb 3.0.7, works it seems but i have a ?
i have removed a few members and they show as guest now, it there away to remove the red x from there country?

thank
You could probably go into your phpMyAdmin and edit each user in that field (8) to 'undisclosed'.

Im sure there is an easier way though...
Reply With Quote
  #49  
Old 06-25-2005, 04:08 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by am-fs
I installed this on Vb 3.0.7, works it seems but i have a ?
i have removed a few members and they show as guest now, it there away to remove the red x from there country?

thank
Find this:
HTML Code:
<if condition="$post[fieldX] != Undisclosed">
Change it to this:
HTML Code:
<if condition="$post[fieldX] != Undisclosed AND !empty($post[fieldX])">
Changing fieldX to whatever field you are using.
Reply With Quote
  #50  
Old 07-09-2005, 05:14 PM
Borimikan Borimikan is offline
 
Join Date: Apr 2005
Location: Brooklyn, NY
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just installed this hack,
and it is only displaying country flag name instead country flag image,..
what should i do to fix this?

THANKS IN ADVANCED
Reply With Quote
  #51  
Old 07-29-2005, 09:10 PM
coRtALoS's Avatar
coRtALoS coRtALoS is offline
 
Join Date: Apr 2003
Location: Northeastern U.S.
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you uploaded the images to the correct directory? All of the <img> tags have alts, so it sounds like your code is right, but it's not finding the images.
Reply With Quote
Reply

Thread Tools

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 05:18 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.08758 seconds
  • Memory Usage 2,304KB
  • 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
  • (5)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
  • (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