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

Reply
 
Thread Tools
Animated Country Flags Details »»
Animated Country Flags
Version: 3.5.x +, by Neutral Singh Neutral Singh is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 01-25-2009 Last Update: Never Installs: 3
Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

Should work in all previous versions. This is a very simple template modification which shows country flags for each user posts in postbit/postbit_legacy templates.

Visit any topic for a Demo: http://www.sikhism.us

Code:
Step 1. Create a New Profile Field

>> Go to AdminCP >> User Profile Fields >> Add New User Profile Field
>> Profile Field Type >> Single Selection Menu >> Continue
>> Title >> My Representative Country
>> Description >> Select country of your present residence.
>> Options >> Copy & Page, the list of countries at end of this message, in the Options Box. Make sure there is one country per line.
>> Set Default >> None
>> Display Order >> Your choice
>> Field Required >> Yes, at registration and profile updating
>> Field Editable by the User >> Yes
>> Private Filed >> No

Optional Output: No
Display page>> Edit Your Details
Save
Note down the new profile field's id no.
 
Note down the profile id number.

Step 2. Edit Template Postbit or Postbit_Legacy

Find: (You can choose your own location to show the flags. This is what i did.)
Quote:
<td valign="top" nowrap="nowrap"> <div class="smallfont"> <if condition="$post['joindate']">
Add Above:
Quote:
<td valign="top" nowrap="nowrap"> <if condition="$post['fieldX']"><img src="/images/flags/$post[fieldX].gif" alt="My Country: $post[fieldX]" border="0" /></if> </td>
Replace field"X" with profile field id no. Step 3. Download the animated flags from HERE. (Sorry, could not upload at vB.org due to file size limits of 2MB for zip file! This file is 4MB. I could not upload even after spliting the files into 1MB each. If possible vb.org staff could upload the same on vb.org for me from this link. Thanks!). Unzip the flags.zip and upload the folder 'flags' in /images directory of each of your styles. And you are Done! nJoy!! Select the below list of countries, cut and paste in the Options Box
Quote:
India United Kingdom United States ASEAN Abu Dhabi Afghanistan Ajman Aland Islands Albania Alderney Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Arab League Argentina Armenia Aruba Australia-Aboriginal Australia Austria Azerbaijan Azores Bahamas Bahrain Balearic Islands Bangladesh Barbados Belarus Baleu Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia and Herzegovina Botswana Bouvet Island Brazil British Antarctic Territory British Indian Ocean Territory British Virgin Islands Brunei Bulgaria Burkina Faso Burma Burundi CAL Flag Cambodia Cameroon Canada Canary Islands Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island CIS Cocos Islands Colombia Commonwealth Comoros Congo-Brazzaville Congo-Kinshasa Cook Islands Coral Sea Islands Costa Rica Cote DIvoire Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Dubai Dutch Anilles East Timor Ecuador Egypt El Salvador England Equatorial Guinea Eritrea Estonia Ethiopia European Union Falkland Islands Faroe Islands Fiji Finland France French Austral Lands French Guiana Independentist French Guiana French Polynesia Fujairah Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea-Bissau Guinea Guyana Haiti Heard and McDonald Islands Holy See Honduras Hong Kong Hungary Iceland Indonesia Iran Iraq Ireland Islamic Conference Isle of Man Israel Ivory Coast Italy Jamaica Japan Jersey Jordan Jolly Roger Kazakhstan Kenya Kiribati Kuwait Kyrgyzstan Laos Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Lord Howe Island Luxembourg Macao Macedonia Madagascar Madeira Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia Midway Islands Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia NATO Nauru Nepal Netherlands Antilles Netherlands New Caledonia New Zealand-Maori New Zealand Nicaragua Niger Nigeria Niue Norfolk Island North Korea Northern Cyprus Northern Ireland Northern Marianas Nordic Council Norway OPEC OAS OAU Oman Olympics Orkney Islands Pakistan Palau Palestine Panama Papua New Guinea Paraguay Pacific Community Peru Philippine Pitcairn Islands Poland Portugal Puerto Rico Qatar Ras al-Khaimah Reunion Romania Russian Federation Rwanda Sami Samoa San Marino Sao Tome e Principe Sark Saudi Arabia Scotland Seborga Senegal Serbia Seychelles Sharjah Shetland Islands Sierra Leone Sikkim Singapore Slovakia Slovenia Solomon Islands Somalia Somaliland South Africa South Korea Spain Sri Lanka St Helena St Kitts and Nevis St Lucia St Pierre and Miquelon St Vincent and the Grenadines Sudan uriname Swaziland Sweden Switzerland Syria Tahiti Taiwan Tajikstan Tanzania Thailand Tibet Togo Tokelau Tonga Trinidad and Tobago Tromelin Tunisia Turkey Turkmenistan Tuvalu US Virgin Islands Uganda Ukraine Umm al-Qaiwan United Nations Uruguay Uzbekistan Vanuatu Vatican City State Venezuela Vietnam WEU Wake Island Wales Wallis & Futuna Western Sahara Yemen Yugoslavia Zambia Zimbabwe Zaire

Show Your Support

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

Comments
  #2  
Old 01-26-2009, 10:58 AM
vitoreis vitoreis is offline
 
Join Date: Nov 2005
Location: Portugal
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Error in zip file:
Code:
D:\Country Flags\flags.zip: Unknown method 

D:\Country Flags\flags.zip: No files to extract
Reply With Quote
  #3  
Old 01-26-2009, 12:13 PM
steve1966 steve1966 is offline
 
Join Date: Dec 2007
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vitoreis View Post
Hello,

Error in zip file:
Code:
D:\Country Flags\flags.zip: Unknown method 

D:\Country Flags\flags.zip: No files to extract
can also confirm this
Reply With Quote
  #4  
Old 01-26-2009, 01:26 PM
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Location: Sikh Philosophy Network
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My apologies, actually file was encrypted with the latest version of winzip. Uploaded again. Thanks for your patience.

Regards
Reply With Quote
  #5  
Old 01-26-2009, 04:05 PM
drumnbassbboy drumnbassbboy is offline
 
Join Date: Aug 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyway to get the state flags with the US flag when someone is from the US?
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 02:36 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.08158 seconds
  • Memory Usage 2,249KB
  • Queries Executed 18 (?)
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_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete