Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by AJR AJR is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-05-2001 Last Update: Never Installs: 114
 
No support by the author.

UPDATED TO v2.1 - 3/11/2002

Version 2.1 - March 11, 2002
================================================== ==
Well, it's been awhile! I sorta disappeared there while
doing many other things! I guess v2.0 that was supposed
to use the same images as vBStats didn't go as planned
(thanks Bane ). I removed this hack from my site
awhile ago when I was having some other problems. I have
finally decided to add it back and it worked great in 2.2.0,
and I'm sure it will work in all other 2.2.x versions.

Changes:
- Updated to work with vBulletin 2.2.x
- Added Display Flag in Member List - Thanks Orca
- Used slightly larger flag images by X-Fan (I did run
them through Ulead's 16-color optimization which cut
the total file size from 271K to 54K!)
- Added 'align="absmiddle"' to image tag for text vertical centering
- Fixed Bane's name in docs below where I botched it up!
- Support for 280 Countries


Version 2.0 - September 6, 2001
================================================== ==
Changes from v1.0:
- Images have been changed from country codes to country names
- Flags will now have their ALT text as country name.
- Modified Hack to work with Bane's vbStats hack that will be released in the future.
- Added CP Addon by Stasik and modded it for new country names
- Changed country field in USER table from CHAR(2) to VARCHAR(50)
- Support for 226 countries

Known Problems:
- Countries with a dash (-) or comma (,) will not show up
automatically in as selected when you or the member edit
their profile (Congo, Korea, and Micronesia are the only 3)
Anyone know a fix please let me know.
- The 'modifyprofile_country' template needs to be changed
to a default original templatesetid of -1 (changed templates
have the templatesetid set to 2) or else the Admin CP addon
will not work (Any ideas why?). To do this, use phpMyAdmin
and run this query:
UPDATE template SET templatesetid="-1" where title="modifyprofile_country"
This will move the template from the custom to default templates
and will be found in the 'User Option Templates' group.

Any questions or comments can be posted here. Enjoy!

Show Your Support

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

Comments
  #212  
Old 11-13-2002, 06:24 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i hope you will get the rest of it, how to use the installer-uninstaller.
if you are not sure, erwin will be able to smack you in the head... heh, with explanations on how to use it.
Reply With Quote
  #213  
Old 11-17-2002, 09:21 PM
Harken Harken is offline
 
Join Date: Apr 2002
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone assist me this...im am still lost...
Reply With Quote
  #214  
Old 12-05-2002, 12:45 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone get this to work with vb 2.2.9?

I can't get past the member.php file before the code blows up!
Reply With Quote
  #215  
Old 12-05-2002, 01:07 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine from 2.2.1 all the way to 2.2.9 on my forums.
Tip: Remember, EACH time you upgrade, you need to add the modifyprofile_country template AGAIN, and run the db query AGAIN.
Reply With Quote
  #216  
Old 12-05-2002, 02:54 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did that part already, but the member.php file fowls up everything right after uploading the file!

Someone willing to share their file with me?
Reply With Quote
  #217  
Old 12-05-2002, 01:42 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Firstly great hack and althought installation steps are a little bit long, it works ok in v.2.2.9! Thx for sharing..

And a few comments that might help some people while installing:
If these are already mentioned in the hack thread, my apologies..
VBSTATS and THIS HACK
If you use Bane's vbstat hack the image directory's of these 2 hacks clashes. To use them both, I applied such a method:

1- rename image directory of this hack to cflags and edit these files:

memberlist.php
member.php
functions.php
user.php

find: images/flags/
Replace it AS: images/cflags/

Now you can use 2 hacks together..

ASSIGNING TEMPLATE TO DEFAULT SET:
Quote:
*** The 'modifyprofile_country' template needs to be changed
to a default original templatesetid of -1 or else the Admin CP addon
will not show the country select list (Any ideas why?).
This is because vb Admin CP logins does not set $templatesetid variable.

To cure this edit user.php and find:
PHP Code:
 eval("\$countrytext.= \"".gettemplate("modifyprofile_country")."\";"); 
(There are 2 instances)

Before that add:
PHP Code:
 $templatesetid=1
Now you can create your template in the default set and you dont need to run UPDATE template SET templatesetid="-1" where title="modifyprofile_country" query which will be overwritten after you upgrade your board..

Hope this helps..

Enjoy.

Ps. I dont have subscription in this thread, so do not address me here, ty..
Reply With Quote
  #218  
Old 12-09-2002, 01:52 AM
stryka stryka is offline
 
Join Date: Aug 2002
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there are subtle code differences in 2.2.9 vs the documentation for the country hack... so here's the members.php instructions to match 2.2.9

4 - Open member.php

find:
$templatesused = 'register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modi fyprofile';

Replace it with
// Country Hack Replace
// $templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modi fyprofile";
$templatesused .= "register_birthday,modifyprofile_customtext,modify profile_country,register_custo mfields,usercpnav,modifyprofile";
// Country Hack End

find:
eval("\$customtext = \"".gettemplate("modifyprofile_customtext")."\";") ;
}
}
Below it add:
// Country Hack
if (!$getcountry=$DB_site->query_first("SELECT country FROM user WHERE userid=$bbuserinfo[userid]")) {
$country="";
$ctrdefaultselected = "selected";
} else {
$country="$getcountry[country]";
$countryalt = str_replace("%20"," ",$country);
$countrysel = str_replace("%20","_",$country);
$flag="<img src=\"images/flags/$country.gif\" alt=\"$countryalt\" align=\"absmiddle\" border=\"0\">";
$ctryname = "ctry".$countrysel."selected";
$$ctryname = "selected";
}
eval("\$countrytext.= \"".gettemplate("modifyprofile_country")."\";") ;
// Country Hack End

find:
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

Replace it with:
// Country Hack Replace
// $DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]',country='".addslashes($country)."' WHERE userid='$bbuserinfo[userid]'");
// Country Hack End

find:
if ($userinfo[yahoo]!="") {
eval("\$userinfo[yahooicon] = \"".gettemplate("yahoo")."\";");
} else {
$userinfo[yahoo]="&nbsp;";
}

Below it add:
// Country Hack
$getctry=$DB_site->query_first("SELECT country FROM user WHERE userid=$userid");
$country=$getctry[country];
$countryalt = str_replace("%20"," ",$country);
if ($country!="") {
$flag = "<img src=\"images/flags/$country.gif\" alt=\"$countryalt\" align=\"absmiddle\" border=\"0\">";
} else {
$flag = "";
}
// Country Hack End
Reply With Quote
  #219  
Old 12-09-2002, 02:33 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BINGO! ... that worked like a charm!

Thanks, you two!
Reply With Quote
  #220  
Old 01-25-2003, 04:22 PM
0zone's Avatar
0zone 0zone is offline
 
Join Date: Jan 2003
Location: Australia
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey everyone, I'm new to vB, I pruchased it yesterday, and I would really like this hack. I'm so unfamiliar with all of these hacks but I am trying to learn.

Would someone be able to possibly help me install this hack?
Reply With Quote
  #221  
Old 01-26-2003, 10:10 PM
Tony DiMera's Avatar
Tony DiMera Tony DiMera is offline
 
Join Date: Aug 2002
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot
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 11:54 AM.


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.07927 seconds
  • Memory Usage 2,316KB
  • 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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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