![]() |
Thanks, AJR! Ours is an international community, so being able to display our national flags means a lot to everyone.
And thank you, Kira -- I started getting a bit nervous about installing this one and was so happy to see the summary update you posted. I probably held my breath through the whole thing..... but it works!! What a rush! |
hmmm..i installed the country hack..and now when im logged in as admin i see the option in the usercp and it works fine...but if i log in as a registered user..the scroll list is gone in the usercp...but the option for country is still there so its just a blank no bar to scroll or anything. Any ideas?
|
Quote:
|
i ran that before and i show it under the User Option Templates....there is 3 of them...weird...should there be only 1 right? but it still doesnt work..
|
Delete all of them.
Add a new one. Then run the query. |
ok i deleted it..the one under templates in phpmy admin..but still i have two showing up when i open templates user options under that style...so i can still only see the list as admin...not under any other kind.
|
Can't you remove them from your Admin CP in Templates?
|
no because the only options i c are Change original...unless im missing something..
|
hmmm is normal there are so many boards out there with all kind of problems and security issues... due to bad code.
i made for you a little script to add and remove safely one or several templates: Code:
<?php |
im sorry but what do i do with that....today has not been my day...
|
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. ;) |
can anyone assist me this...im am still lost...
|
Anyone get this to work with vb 2.2.9?
I can't get past the member.php file before the code blows up! |
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. |
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? |
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:
To cure this edit user.php and find: PHP Code:
Before that add: PHP Code:
Hope this helps.. Enjoy. Ps. I dont have subscription in this thread, so do not address me here, ty.. |
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]=" "; } 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 |
BINGO! ... that worked like a charm!
Thanks, you two! :D |
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? |
Thanks a lot
|
Hi, the usuers on my BBS like this hack.
They asked if I can get one made with the US state flags and territories. Have one line for the state flag and another line for the country. Thanks in adavance |
I installed this hack and now when users try to change the "location" in their profile it says "Thanks for updating your profile" but the location doesnt show up.
Any ideas on where I messed up? |
hi,
I have read right through this rather large post now:) I got it working fine in all of the templates,but it will not show up in the postbit:(:( Can any1 help please Thanx in advance forget that.sorted now,just added some txt to the showthread,and its working fine:) Many thanx to you all |
Can anyone offer any advice who has added additional flags.
One of my members wanted an Ex-Pat flag that I called "United Kingdom Ex Pat.gif" and put into the flags directory. I modified the template and added this line... <option value="United%20Kingdom%20Ex%20Pat" $ctryUnited_Kingdom_Ex_Patselected>United Kingdom Ex Pat</option> ...under the User Control panel all works well. They can select their flag. However under the Admin options I cannot see the new flag, when you look at their profile it appears with a blank name on the right hand side in the country field drop down box. At no point is that flag selectable by Admins. I'd appricahte any help on this. Thanks. |
Has anyone modified the member search to include an option to search by country?
|
Quote:
user.php needs the line adding too. |
I don't seem to see the following in adminfunctions.php:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); We're running 2.28 |
Spitfyre - you may want to consider upgrading to the latest stable release of vbulletin (2.3.0) as the previous versions have many bug fixes which could leave a big security hole in your board :)
I have just checked in a clean 2.2.8 in functions.php and that line is there :) - miSt |
I was looking at the wrong file because I read the script instructions wrong. I thought he was referring to adminfunctions not functions.php
|
Ack.. someone help: http://www.futurelooksforums.com/for...8418#post58418
2. With the tweak it moved my ICQ button to the next line? How can I fix that? |
Anyone know how to ensure that this gets stuck at the bottom right for each post:
Report this post to a moderator | IP: Logged Warning Level: 0 [ View User Warnings ] [ Warn This User ] For some reason it won't sit there in certain posts. Thoughts? |
Hey all, I just searched through the thread but couldn't find an answer - how would I get a user's flag to show up in the welcome panel on the forumhome page?
|
Have it installed and working great on 2.3.0 WITH the store hack add-on. Thanks!
|
ok ... i've installed this ok. Well it seems ok. But, the images are broken :
and are linked like : /images/flags/Un.gif instead of /images/flags/United Kingdom.gif Why is this happening ?? ( Also the alt text is the same ) |
is there any way to have this work automated.. so the script will trace where the user origins from..
|
Splitfyre,
you didn't put the code in the correct place in memberlist or/and memberlistbit. Both codes for the flag has to be at the same spot, e.g. before AIM icon. Should work. As for your second question, it's related to the warning system add-on. See the right support thread for info about it. X-Fan, I assume you need to tweak the code similar to member.php and then use $flag in the appropriate template. Try to figure it out yourself. Should be quite easy. I haven't had the welcome panel in use, so I can't test it now. Vinney, double check your code. You must have made some misstake. Works perfect here with a hacked vB 2.3.0. Sc0rp, that would require quite much work and yet it wouldn't be accurate. |
thanks for this great hack
I have modify it to display Linux Distro's instead of flags in my forum http://linuxcult.com now .. is there a way I can tie a URL to each "flag" ? |
One last request :)
http://www.linuxcult.com/forum/membe...hat=datejoined as you see, the "distro" images is where the flags woudl be .. is there a way I can "sort" by them ? :) love this hack .. hehe |
Just updated to 2.30 and now it won't show the drop down to select a flag when you try to register :(
I went and re-hacked it from scratch. Check it out here: www.futurelooks.com/forums/register.php |
Got it installed fine now. I think it was just due to the time I was hacking it, I was near fallin asleep :P
Now my question is that in the postbit it shows the country flag squished. See my forums: www.futurelooks.com/forums for more on this. Please and thanks! |
All times are GMT. The time now is 04:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|