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 v2.0 (https://vborg.vbsupport.ru/showthread.php?t=27485)

X-Fan 02-11-2002 01:40 AM

How would one get the country flags to appear on the memberlist.php page?

I know that would require code added to the memberlist.php file as well as modfying the memberlist templates, but I'm not sure what would need adding to memberlist.php.

X-Fan 02-11-2002 01:55 AM

Hey all,

This hack has proven so popular on my forums that I've done my own update to it to include ever-so-slightly larger-sized flags, updates to several flags from the original release (like Rwanda, whose flag changed on December 31, 2001, Martinique, Reunion, Tuvalu, etc), and to include several flags that weren't in the original, such as the British countries (England, Ireland, Wales, Scotland, Isle of Man, Channel Islands, etc), countries in dispute (like Northern Cyprus, Tibet, French Guiana, etc), and more.

All it takes is an upload of the new flag image files as well as a modification to the modifyprofile_country template. I've attached a text file containing the mods to this post and will attach two zips with the new flag images to my next two posts.

Hope y'all like it!

X-Fan 02-11-2002 02:00 AM

Here's the first zip (74k) containing the updated flags for 2002 from A-M.

X-Fan 02-11-2002 02:01 AM

And here's the second zip (54k) containing the updated flags for 2002 from N-Z!

X-Fan 02-12-2002 07:52 AM

Bump...

Massiel 02-16-2002 09:20 AM

I want to add this hack for my flags, use the avatar for photos and the medals for medals, is this possible? Thanks in advance! I am also wanting to add the star hack. Any known complications?

X-Fan 02-16-2002 09:33 AM

Quote:

Originally posted by Massiel
I want to add this hack for my flags, use the avatar for photos and the medals for medals, is this possible? Thanks in advance! I am also wanting to add the star hack. Any known complications?
I'm using the flags hack, the medals hack, and avatars without a hitch.

Massiel 02-16-2002 11:50 PM

How do I run a query? I am new at this, was ready to install hack and got stuck here...

================================================== ==

1 - Add to database-Table user, field named: country
properties: ( country varchar(50) NOT NULL )

In phpMyAdmin, you can run this query:
ALTER TABLE user ADD country VARCHAR (50) NOT NULL

================================================== ==

aldamon 03-07-2002 12:17 PM

Works with 2.2.3! Updated instructions attached!

freehtml 03-10-2002 02:30 AM

can we had the flag name be reflected in text format so that if I select SIngapore flag..

It will display the GIF file as well as display "Country : Singapore" ?

freehtml 03-10-2002 02:31 AM

Quote:

Originally posted by X-Fan
How would one get the country flags to appear on the memberlist.php page?

I know that would require code added to the memberlist.php file as well as modfying the memberlist templates, but I'm not sure what would need adding to memberlist.php.

What about include also in the "forum leader" list?

AJR 03-11-2002 10:35 AM

Hey all... I have updated the Country Flag Hack to v2.1. This version should work with all 2.2.x versions. See other additions and download v2.1 in the first post of this thread.

Erwin 03-11-2002 05:15 PM

Updated! Thanks!

freehtml 03-12-2002 01:44 AM

somehow it appears under my profile and all that but not in the Member list... I am using vB 2.2.4

Lucky 03-12-2002 05:15 AM

Great work my friend!!!

Dez_U 03-14-2002 09:43 AM

I am using version 2.2.4 and it works great for NEW MEMBERS ONLY. ??

A new member can register and the flag will show

Exsisting members can see the drop down in their user cp and select their country flag. but it does not show ??

Also none of the flags show on the members list.

Any help, thanks

PS, very <--COOL--> hack :D

Erwin 03-14-2002 10:06 PM

Make the modifyprofile_country template default by making it (-1) using phpmyadmin as per the instructions.

Dez_U 03-14-2002 10:19 PM

sorry newbe here .... how do I do that then ??

I am in the phpMyAdmin area, what do I do next ?

Dez_U 03-14-2002 10:49 PM

OK, I followed the instructions :) and did the search and changed the template to -1

BUT it still don't work for oldtimers on the board. Is it something to do with 2.2.4 ??

Dez_U 03-15-2002 09:59 PM

does anyone have an answer to this as its driving my members nuts :)

Hamsh 03-17-2002 01:15 AM

Most of it works fine on my 2.2.4, will display flags for old members no problems.

Whenever I try to logout or view a member profile I get a parse error in member.php, line 500 and something. Everything seems to be replaced and added OK, and I thought I'd followed all instructions. I don't have access to anything other than notepad to count the lines. Before I count them all on the screen, anyone got any ideas on what might be causing this?

freehtml 03-17-2002 02:13 PM

Quote:

Originally posted by Hamsh
I don't have access to anything other than notepad to count the lines.
Try using NoteTab ,a well good replacement for Notepad.

Dez_U 03-17-2002 03:20 PM

so does anyone have any suggestions as to how i can get this cool hack working 100% ?

Demascus 04-21-2002 02:51 PM

anyone got this working on vbb2.2.5 yet?

Chris M 04-21-2002 04:22 PM

I noticed a syntax error...

Quote:

4 - Open member.php

find:
$templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
Should be :

4 - Open member.php

find:
PHP Code:

$templatesused 'register_birthday,modifyprofile_customtext,register_customfields,usercpnav,modifyprofile'

Satan

Chris M 04-21-2002 04:23 PM

Another one :

Quote:

// 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
Should be :

PHP Code:

  // Country Hack Replace
//   $templatesused = 'register_birthday,modifyprofile_customtext,register_customfields,usercpnav,modifyprofile';
  
$templatesused 'register_birthday,modifyprofile_customtext,modifyprofile_country,register_customfields,usercpnav,modifyprofile';
// Country Hack End 

Satan

Chris M 04-21-2002 04:25 PM

Quote:

eval("\$customtext.= \"".gettemplate("modifyprofile_customtext")."\";") ;
}
}
Should be :

PHP Code:

      eval("\$customtext = \"".gettemplate("modifyprofile_customtext")."\";");
    }
  } 


Chris M 04-21-2002 04:48 PM

I think that is all the syntax errors there were...

Satan

Erwin 04-21-2002 11:28 PM

Defnitely works on 2.2.5.

aldamon 04-22-2002 11:30 AM

I'm going to miss this in vb3.0. I hope it is ported!

mashby 04-22-2002 03:45 PM

Just wanted to let you know that I followed your directions to a "T" and your hack installed just as described. Although the instructions were lengthy, the result was on the money. :cool:

Thanks for making such a GREAT hack!

212rikanmofo 04-25-2002 02:43 AM

the hack works great, but one thing thats not working is the user registering part, when a user submits, it keeps saying please filled all required fields, and ALL fields are filled out... i think it has to do with the registrationadult template, but the dropdown menu where you select your country doesnt even show up at all under the registration form, under enter your email...

here's what part of my registrationadult template looks like:

Code:

        <td bgcolor="{secondaltcolor}"><normalfont><b>Email:</b></normalfont><br>
        <smallfont>Please enter a valid email address. You can choose to hide it below in the preferences section.</smallfont></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="email" size="25" maxlength="50"></normalfont></td>
</tr>
<tr>
        <td bgcolor="{secondaltcolor}"><normalfont><b>Enter Email Again:</b></normalfont></td>
        <td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="emailconfirm" size="25" maxlength="50"></normalfont></td>
</tr>
<!-- Country Hack Code Begin -->
<tr>
<td bgcolor={firstaltcolor}><normalfont><b>Select your Country:</b></normalfont><br>
<smallfont>If you select your country, your country flag image will appear next to your name on your posts.</smallfont></td>
<td bgcolor={firstaltcolor}><smallfont>
$countrytext</td>
</tr>
<!-- Country Hack Code End -->
$customfields_required
<!-- *** -->
<tr>
        <td bgcolor="{tableheadbgcolor}" colspan="2"><normalfont color="{tableheadtextcolor}" class="thtcolor"><b>Optional Information</b></normalfont>

why isn't it showing up at all? any reasons, other than that, the hack works great, but i need to fix this, cause it wont let users register cause it keeps saying please fill in all fields, thats cause the dropdown menu for the country isnt even available to them...

mashby 04-25-2002 06:17 AM

Well, I spoke too soon as well. I ran into a similar problem. I'm in the process of removing the hack so that I can get my registeration back. Everything worked, but I got a SQL error everytime someone tried to register.

UPDATE:
Well, after un-installing the hack the error is still there. So, I'm going to have to take more drastic measures to get my board back to 100%. FYI, this is the SQL Error I'm getting.

Database error in vBulletin 2.2.5:

Invalid SQL: INSERT INTO userfield (userid,field5,field6,field7,field1,field2,field3, field4) VALUES (,'Demo
Account','Demo','Demo','','','','')
mysql error: You have an error in your SQL syntax near ''Demo Account','Demo','Demo','','','','')' at line 1

mysql error number: 1064

Date: Thursday 25th of April 2002 02:22:37 AM
Script: http://www.interpug.com/private/foru...m/register.php
Referer: http://www.interpug.com/private/forum/register.php

mashby 04-25-2002 06:47 AM

I downloaded a fresh copy of vBulletin 2.2.5 and uploaded a clean copy of register.php and everything is back to normal. So, obviously something is up with the register.php changes. Too many people are complaining about it to be a fluke, or a typo on the installer's part.

If the register.php worked properly, it would be a GREAT hack.

Does anyone know if I can install everything BUT the register.php changes? I don't really care to make the user choose their flag when they join.

212rikanmofo 04-30-2002 04:17 AM

mashby, i also need a fix for this

something is wrong with the register.php

when i have the hack, when a user registers, there is no drop down box where they can choose there country, it wont show up at all. and therefore they cant register since it's a required field, so i had to take it out, but the rest of the hack works great. just that one fault, is there a fix for this please?

mashby 04-30-2002 04:23 AM

My error was that the register just didn't work. Everything appeared ok, but register.php just didn't work.

Since my problem was a little different. I would check through the code that you have to alter in your templates and in register.php again. It sounds like you may just be missing something in the template you have to create.

212rikanmofo 04-30-2002 04:28 AM

i checked the template so many times, and thats not the problem
... i dont know why its not showing up at all when a user registers

Erwin 04-30-2002 05:05 AM

Make sure you've made the template -1 so that it's default. This hack is temperamental like that. Also make sure that you database inserts in register.php includes the country variable as well.

Erwin 04-30-2002 05:13 AM

Remember, each time you upgrade vB, you need to run the database query again to make that country select list template -1 again. This is the only hack that I know of that requires this.

212rikanmofo 04-30-2002 06:34 AM

i already ran that -1 query already, and what do you mean include register.php? im not understanding, do i have to include it in a template? clarify this for me please...


All times are GMT. The time now is 09:25 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.01398 seconds
  • Memory Usage 1,826KB
  • 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)bbcode_code_printable
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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