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
  #2  
Old 06-09-2004, 07:16 PM
imported_chuanse imported_chuanse is offline
 
Join Date: Feb 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* chuanse installs [/high]
Reply With Quote
  #3  
Old 06-10-2004, 06:44 PM
imported_Kentaurus's Avatar
imported_Kentaurus imported_Kentaurus is offline
 
Join Date: Dec 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
Well, i looked all over the forums but couldn't find this countryflag mod; however, i found it on vb.org instead. [...]
Nice mod, installed.

For the people with spanish forums, I have modified the flags_list file to reflect the Spanish name of the countries and the images for that. I attach the flag_list and the images if you want it to be in spanish.
Reply With Quote
  #4  
Old 08-10-2004, 09:11 AM
imported_cinq imported_cinq is offline
 
Join Date: Mar 2003
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just what I was looking for ! thanks !

A question though, is it a must to set Display Page: Thread Viewing. Can it be on Edit Profile instead ?
Reply With Quote
  #5  
Old 08-11-2004, 02:19 AM
pjdaley pjdaley is offline
 
Join Date: Feb 2004
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cinq
Just what I was looking for ! thanks !

A question though, is it a must to set Display Page: Thread Viewing. Can it be on Edit Profile instead ?
same hre, some of my members are going crazy, looking for it...
Reply With Quote
  #6  
Old 08-11-2004, 05:50 PM
M1th's Avatar
M1th M1th is offline
 
Join Date: Jul 2002
Location: UK
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cinq, could put it anywhere you want.

as for running the UPDATE `userfield` SET `fieldX` = 'Undisclosed'; query. It's unnecessary, IMO. You could have an empty field in the first line and set it as default. Then using <if condition="$post[fieldX]"> flag code here </if> would give what you want.
Reply With Quote
  #7  
Old 08-25-2004, 10:39 PM
pjdaley pjdaley is offline
 
Join Date: Feb 2004
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by M1th
cinq, could put it anywhere you want.

as for running the UPDATE `userfield` SET `fieldX` = 'Undisclosed'; query. It's unnecessary, IMO. You could have an empty field in the first line and set it as default. Then using <if condition="$post[fieldX]"> flag code here </if> would give what you want.
ok, but what would i do to put it on the Edit Profile area?
Reply With Quote
  #8  
Old 08-28-2004, 11:14 AM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change this option:
Display Page: Edit Profile
Reply With Quote
  #9  
Old 09-03-2004, 04:47 AM
trackpads's Avatar
trackpads trackpads is offline
 
Join Date: Aug 2003
Location: Armyville
Posts: 1,074
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I went al litte further and created a gif called "Undisclosed.gif" and placed it in the flags folder on the server. I then removed the IF statement from the postbit so that it would show the undisclosed gif file as the default. The undisclosed gif is basically a small image reminding the user to update their profile :-)

Here you go-

http://www.trackpads.com/forum/showthread.php?t=135642
Reply With Quote
  #10  
Old 09-03-2004, 06:56 AM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, all I have to do is remove that IF statement and this will work? Forgive me I am a n00b.
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 07:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10785 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
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
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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