Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

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
  #192  
Old 08-23-2002, 12:38 PM
carpman carpman is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can get this to work for admin but registered users just see blank space where country list/menu should be!!

note this is only in user cp, is ok when they register!!

any ideas
Reply With Quote
  #193  
Old 08-24-2002, 05:43 PM
carpman carpman is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i have a problem in user.php, it says to add:

// $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]'");

But i already have user away hack installed which changed this entry to:

$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$retur ndate',awayreason='".addslashe s(htmlspecialchars($awayreason))."',birthday='$bir thday',options='$options',user groupid='$usergroupid',username='".addslashes(html specialchars($ausername))."'$p wdinclude,email='".addslashes(htmlspecialchars($em ail))."',styleid='$userstyleid ',parentemail='".addslashes(htmlspecialchars($pare ntemail))."',coppauser=$coppau ser,homepage='".addslashes(htmlspecialchars($homep age))."',icq='".addslashes(htm lspecialchars($icq))."',aim='".addslashes(htmlspec ialchars($aim))."',yahoo='".ad dslashes(htmlspecialchars($yahoo))."',signature='" .addslashes($signature)."',adm inemail=$adminemail,showemail=$showemail,invisible =$invisible,usertitle='".addsl ashes($usertitle)."',customtitle=$customtitle,join date=$joindate,cookieuser=$coo kieuser,nosessionhash=$nosessionhash,daysprune='$d aysprune',lastvisit=$lastvisit ,lastactivity=$lastactivity,lastpost=$lastpost,pos ts='$posts',timezoneoffset='$t imezoneoffset',emailnotification=$emailnotificatio n,receivepm='$receivepm',email onpm='$emailonpm',ipaddress='".addslashes($aipaddr ess)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

i have looked but am unclear as to changes i should make?

anyone help?
Reply With Quote
  #194  
Old 08-24-2002, 07:01 PM
carpman carpman is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am going to try this, any feedback?

$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$retur ndate',awayreason='".addslashe s(htmlspecialchars($awayreason))."',birthday='".ad dslashes($birthday)."',options ='$options',usertitle='".addslashes($customtext)." ',usergroupid='$bbuserinfo[usergroupid]',username='".addslashes(htmlspecialchars($auserna me))."'$pwdinclude,email='".ad dslashes(htmlspecialchars($email))."',styleid='$us erstyleid',parentemail='".adds lashes(htmlspecialchars($parentemail))."',coppause r=$coppauser,homepage='".addsl ashes(htmlspecialchars($homepage))."',icq='".addsl ashes(htmlspecialchars($icq)). "',aim='".addslashes(htmlspecialchars($aim))."',ya hoo='".addslashes(htmlspecialc hars($yahoo))."',signature='".addslashes($signatur e)."',adminemail=$adminemail,s howemail=$showemail,invisible=$invisible,usertitle ='".addslashes($usertitle)."', customtitle='".intval($customtitle)."',country='". addslashes($country)."',joinda te=$joindate,cookieuser=$cookieuser,nosessionhash= $nosessionhash,daysprune='$day sprune',lastvisit=$lastvisit,lastactivity=$lastact ivity,lastpost=$lastpost,posts ='$posts',timezoneoffset='$timezoneoffset',emailno tification=$emailnotification, receivepm='$receivepm',emailonpm='$emailonpm',ipad dress='".addslashes($aipaddres s)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid='$bbuserinfo[userid]'");
Reply With Quote
  #195  
Old 08-24-2002, 07:51 PM
carpman carpman is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello, modifyprofile_country tempate is set to -1 but users still cannot see the drop down list of coutries in their user-cp, they can when they register though

the code should be ok as when logged in as admin i can see and change country from user-cp

could use some help, only thing not sure of is user.php editing see above posts
Reply With Quote
  #196  
Old 08-26-2002, 09:12 PM
carpman carpman is offline
 
Join Date: Oct 2001
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello, back again.

I have been through re-install of hack, except database entries as not sure if i should duplicate them.

I have done all php pages and tempates and have run the change_template.php, checked with myphadmin and it is set to -1

New users can register with flag and is displays everwhere it should.

However, older user and current users (withflag) cannot access country list via user_cp, it is just blank space.

The other problem is in admin cp, when i try and edit a user the user ID 1 (admin) gets set to the user details (name, profile etc) of who i was trying edit, so i end with two users with same name but different ID.

The the only thing i can think of is a conflick with 'leave away message' which also has changes to entries $DB_site->query("UPDATE user SET

the two pages affected are member.php and user.php below is what i have for each page, i have tried to compare and get things as should be, but might have missed something.

help really appreciated

member.php
$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)."' $awaysql WHERE userid='$bbuserinfo[userid]'");

admin/user.php
$DB_site->query("UPDATE user SET away='$away',awaydate=$awaydate,returndate='$retur ndate',awayreason='".addslashe s(htmlspecialchars($awayreason))."',birthday='".ad dslashes($birthday)."',options ='$options',usertitle='".addslashes($customtext)." ',usergroupid='$bbuserinfo[usergroupid]',username='".addslashes(htmlspecialchars($auserna me))."'$pwdinclude,email='".ad dslashes(htmlspecialchars($email))."',styleid='$us erstyleid',parentemail='".adds lashes(htmlspecialchars($parentemail))."',coppause r=$coppauser,homepage='".addsl ashes(htmlspecialchars($homepage))."',icq='".addsl ashes(htmlspecialchars($icq)). "',aim='".addslashes(htmlspecialchars($aim))."',ya hoo='".addslashes(htmlspecialc hars($yahoo))."',signature='".addslashes($signatur e)."',adminemail=$adminemail,s howemail=$showemail,invisible=$invisible,usertitle ='".addslashes($usertitle)."', customtitle='".intval($customtitle)."',country='". addslashes($country)."',joinda te=$joindate,cookieuser=$cookieuser,nosessionhash= $nosessionhash,daysprune='$day sprune',lastvisit=$lastvisit,lastactivity=$lastact ivity,lastpost=$lastpost,posts ='$posts',timezoneoffset='$timezoneoffset',emailno tification=$emailnotification, receivepm='$receivepm',emailonpm='$emailonpm',ipad dress='".addslashes($aipaddres s)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid='$bbuserinfo[userid]'");
Reply With Quote
  #197  
Old 09-03-2002, 04:52 AM
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to run the SQL command[sql]UPDATE template SET templatesetid="-1" where title="modifyprofile_country"[/sql]With FireFly's run sql query from admin cp hack and I get a database error:
Quote:
Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE template SET templatesetid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Tuesday 03rd of September 2002 05:50:41 AM
Script: http://www.consoleradar.com/forums/f...dmin/query.php
Referer: http://www.consoleradar.com/forums/admin/query.php
Is that his hack or this hack that is having this problem?
Reply With Quote
  #198  
Old 09-03-2002, 08:42 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say I installed this hack on 2.2.6 and it worked flawlessly. I did take care to tweak the syntax in the hack that, as I think HellSatan mentioned earlier, seems to have been made for an older version of vB -- maybe some of you who are having problems the code can make sure you do the same?

In the instructions relating to member.php, make note of these changes:

When the instructions tell you to ...
Quote:
find:
$templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";

Replace it with
// Country Hack Replace
// $templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
$templatesused .= "register_birthday,modifyprofile_customtext,modify profile_country,register_customfields,usercpnav,mo difyprofile";
// Country Hack End

Do this instead:

Quote:
find:
$templatesused = "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";

Replace it with

// Country Hack Replace
// $templatesused = "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
$templatesused = "register_birthday,modifyprofile_customtext,modify profile_country,register_customfields,usercpnav,mo difyprofile";
// Country Hack End
and (also in the member.php instructions) where it says to:

Quote:
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
instead of that, do this...

Quote:
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
Hope this makes sense and is correct. Basically, there were extra dots that didn't need to be there. Maybe the instructions could be updated?

Anyway, great hack, thank you very much!
Reply With Quote
  #199  
Old 09-09-2002, 07:01 AM
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DWZ
I tried to run the SQL command[sql]UPDATE template SET templatesetid="-1" where title="modifyprofile_country"[/sql]With FireFly's run sql query from admin cp hack and I get a database error:Is that his hack or this hack that is having this problem?
*bump*
Reply With Quote
  #200  
Old 10-22-2002, 08:52 AM
AJR's Avatar
AJR AJR is offline
 
Join Date: Jan 2002
Location: Sacramento, CA
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

DWZ... try using apostrophes (') instead of quotes (") around the -1 in the query.
Reply With Quote
  #201  
Old 10-22-2002, 09:04 AM
DWZ's Avatar
DWZ DWZ is offline
 
Join Date: Dec 2001
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by AJR
DWZ... try using apostrophes (') instead of quotes (") around the -1 in the query.
that worked!

thanks!
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 07:15 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.07405 seconds
  • Memory Usage 2,331KB
  • 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
  • (7)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