vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Country Flag Hack (Complete) (https://vborg.vbsupport.ru/showthread.php?t=27044)

AJR 08-31-2001 10:00 PM

Version 2.0 - September 6, 2001 Released
==============================================
http://vbulletin.com/forum/showthrea...threadid=27485

or you can still load v1.0 below

Version 1.0 - September 1, 2001
==============================================
This is the first release of the Country Hack. I've seen many people asking for this hack to be completed. I have changed and added a lot from the original Flag hack by Pingu. Thanks Pingu for the start of this hack!

This is my first hack. Everything should work fine in vBulletin v2.0.x (v2.0.3 has a note below for a different file to edit than in v2.0.1).

Version 1.0 has support for 221 countries and their corresponding flags. The country names are stored by their 2-letter ISO-3166 country codes, with the exception of Scotland which uses '01' because of no known country code (To add other countries that have no country code, use 02, 03, etc). Some countries have the same 2-letter notation because they have the same flag (e.g. many countries like France and UK have territories that use the mainland flag).

I have created large (x by 32) and small (x by 16) icons in .gif format. If you want to put the flag next to the name in the post, get the small icons. If you want to put the flag under the name or
somewhere else in the post, the large ones look better. The flag zips are in the first 2 posts below.


In Version 1.0:
- Support for 221 countries (any more? anyone?)
- Requires adult registrant to choose their country
- Allows existing users to select/change their country
in the 'Edit Profile' form
- Displays country flag on member profile page
- Use template for country list to be pulled anywhere
- Very easy to add new countries

What I'd like to add:
- A way to translate country codes to their appropriate
name to display on the profile page


I don't have a demo board setup yet and mine is still under construction. I have attached a picture:

http://www.thefew.com/temp/post.jpg

Bane at TalkLoud has added the Country Flag hack. So I'm using his site as the demo: http://www.talkloud.net/showthread.php?threadid=203

Questions and comments...please post here. Enjoy!

AJ

AJR 09-01-2001 09:06 AM

Here are the small flag icons: http://www.thefew.com/temp/us_sm.gif

AJR 09-01-2001 09:06 AM

Here are the large flag icons: http://www.thefew.com/temp/us_lg.gif

Bane 09-01-2001 10:02 AM

Working swell :) Great job AJR!

Key 09-01-2001 02:35 PM

Thanks It works :)
But I have a problem the Registered date isn't correct I always get

Registered: 999383174

By the way I'm using vB 2.0.3

Razzie 09-01-2001 03:09 PM

Nice one, I'll try it out.

webhost 09-01-2001 05:11 PM

I am in the processing of installing your hack. I went to make a field in my database based on your instructions, Made it in user table called country type=varchar length 2 not null. when I save it the type changes to char, The only way I can get varchar to stay as the type is to change the length to 4 verus 2 is this ok?

I think it should be but I wanted to make sure.

AJR 09-01-2001 06:34 PM

Key.... do you have any hacks installed? Also do you have a link to your db to show it?

webhost... Change it back it char(2). It was originally varchar(50) because Pingu was using the country name instead of the code. I changed it in my table from 50 to 2 and didn't notice that it went from varchar to char.

The varchar type saves space in your database, but it doesn't make a difference with less than 4 characters. If you had char(250) instead of varchar(250), you would waste A LOT of space if that field only had something like "This is a test". It's only 14 characters but would be forced to use 250 characters with char(250)! Sorry for the MySQL tutuorial :) Actually I noticed that one or 2 of the tables in vbulletin (can't remember which ones) use char() instead of varchar() and their size can get large rather quickly. If you use phpMyAdmin, go in and check the size of your tables vs the number of entries. You'll know which ones are using char() to store the data by their size/entry ratio. USE AT OWN RISK: You may be able to speed up your forums by changing all the char() to varchar(). It will reduce the size of the .ISD and .ISM file for quicker add/replace/searches. It works on my forum fine, but do this at your own risk! Backup the tables you are going to make the changes in first!

webhost 09-01-2001 06:38 PM

I ended up setting varchar to 4. Hack is installed and running great.
Thanks for the great work.

Joey

Key 09-01-2001 07:10 PM

Yes MSN Hack
No coz I'm just testing it in my Personal PC.


All times are GMT. The time now is 12:27 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.01072 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete