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)

webhost 11-12-2001 08:40 AM

yes

xug 11-12-2001 10:55 AM

When I go to step 3 of the installation :

3 - Open showthread.php (or admin/functions.php for v2.0.3)

find:
$post[joindate]=vbdate($registereddateformat,$post[joindate]);

Just above add:
// Country Hack
if (!$post[country]) {
$flag = "";
} else {
$Country=$post[country];
$Countryalt = str_replace("%20"," ",$Country);
$flag = "<img src=\"images/flags/$Country.gif\" alt=\"$Countryalt\" border=\"0\">";
}
// Country Hack End

----------

I can't find the line that I need to search for !!!!!!
I work with VB2.2.0
Please HELP!

webhost 11-12-2001 11:00 AM

put it right under this

PHP Code:

$jointime = (time() - $post[joindate]) / 86400// Days Joined
        
if ($jointime 1) { // User has been a member for less than one day.
            
$postsperday "$post[posts]";
        } else {
            
$postsperday sprintf("%.2f",($post[posts] / $jointime));
        } 


xug 11-12-2001 11:27 PM

I have done everything what is written in this thread and got only errors.

I uninstalled it and hope that there will be an new update version soon in this forum.

webhost 11-13-2001 12:43 AM

xug

I sent you a pm, Send your php files to me for this and I will fix them for you. E-mail address in the pm.

xug 11-13-2001 12:50 AM

I sended a reply !
Thanks for all the help !

Matt 11-17-2001 03:04 AM

I installed :) Problem is it shows up in the profile fine but nothing shows up where I put $flag in my postbit template :(

Any ideas why not?

over 11-17-2001 03:36 PM

has anyone tried this hack for 2.2.1 ? or is it just me that can't find a couple parts in the files to modify?

Bane 11-23-2001 07:56 AM

Could try this I guess, I tried to do the changes when I installed on 2.2.1, I also corrected the horrible maiming of my name (Bain?) in the docs :p Lemme know how it turns out for the 2.2.1 users, this is a quick change so sorry, just put it together for a friend doing an install.


NOTE:
In the docs you will notice the following for every file edit::
Code:

FIND:
error_reporting(7);

BELOW this ADD:
/* Hacks Added to this File
##############################
[vB v2.2.0] Country Flag Hack v2.0 (X) [Date]
############################## */

This is NOT NEEDED. It is something that I do to better track the changes that I made to each file, where X = the number of changes I made to the file, and Date = the date I did it, so I can see quickly if my version is the latest. This is not in anyway necessary but my mate is about as scatterbrained as I am about these things so I included it for him.

Good luck all.

over 11-23-2001 10:13 AM

ta for the update :) installin the now :)

ariaforums 11-23-2001 12:12 PM

$post[joindate]=vbdate($registereddateformat,$post[joindate]);

I still cannot find this in adminfunctions.php :(

Bane 11-23-2001 12:18 PM

Quote:

Originally posted by ariaforums
$post[joindate]=vbdate($registereddateformat,$post[joindate]);

I still cannot find this in adminfunctions.php :(

Try looking for it without spaces
Code:

$post[joindate]=vbdate($registereddateformat,$post[joindate]);
If that doesn't work try looking for
Code:

                } else {
                        $postsperday = sprintf("%.2f",($post[posts] / $jointime));
                }

its just below that.

Lesane 11-24-2001 11:21 AM

Quote:

Originally posted by AJR
Version 2.0 - September 6, 2001
================================================== ==
This is the second release of the Country Hack. I have
converted it to make it work with Bain's vBStats hack
that will be released sometime in the near future. Bain
and I have been working together because both the Country
Hack and vBStats Hack require all the flags. We didn't
want you to have to have double images with different
names (which would mean over 450 files in the flags
directory!)

By changing the flag names from their country code to
their country name, it is now possible to have the ALT
tag show the name of the country when you put your mouse
pointer over the flag image.

Changes from v1.0:
- Images have been changed from country codes to country names

Loox like a great hack but i dont understand one thingy that you said above. You said:
Quote:

We didn't want you to have to have double images with different names (which would mean over 450 files in the flags
directory!)
But the flags of the vbstats hack of bane have country codes and you use the country names :confused:
So we have now double images with different names or do i c this wrong? :confused:

Bane 11-24-2001 04:49 PM

The problem was that in the original version of the flags hack there were all lowercase flag names etc.. then these. Orignally the same system as is used here was used for vbstats however vbstats ended up being a little too popular so for language abstraction purposes I decided to make the switch to country codes. (Now its much easier to change the country names for other language users of vbstats) There is an easy way to change the image settings for flags in vbstats if you want to use the same set. Or optionally you can wait for the next release of vbstats where I will release a compatible Flag Hack if AJ isnt back yet.

Lesane 11-25-2001 07:11 AM

Okey, that makes things clear. Do you know already the deadline of the next Vbstats release?

aldamon 11-28-2001 12:11 PM

nm

xug 11-28-2001 03:58 PM

I got it finally working, thanks to all who did a great job here !

xug 11-28-2001 07:56 PM

I thought that everything was working, but there is a little bug.

When people want to sign up and they fill up all the required information right and submit it, it will give an error message that they have to check again because something wasn't filled up right.

I did it myself also a few times and for sure I did what was required but gave me the error too.

When I installed this hack I did every file step by step and uploaded it back to my site, checked if there where no errors and all looked ok.

So I think there must be something wrong with the last file, register.php

Can please somebody advise me what this could be.

Thank you.

nighteyes 11-29-2001 04:37 PM

Yes, you got it in one. The error is in register.php, I had the same problem. Just download the updated instructions for the 2.2.1 sourcecode a few messages up kindly put together by a generous soul. Extract the original register.php from the ZIP (if needed) and then apply the instructions in step 4 all over again... upload and it *should* work. It did for me.

aldamon 11-29-2001 04:54 PM

There are actually 3 updated sections for 2.2.1. I noticed in my previous text file that I used two different phrases to indicate changes, *** Updated for vB 2.2.1 *** AND *** Modified for vB2.2.1 ***. I just changed the text file so all 3 changes are marked by:

*** Modified for vb 2.2.1 ***

Here it is again and remember there are 3 changes. I have fully updated the affected sections with the 2.2.1 source code.

Enjoy!

trilOByte 12-05-2001 07:23 AM

Great hack, works fine on 2.20 once I had modded the register.php as mentioned.

One small issue - you don't have my country :mad: :

England.

trilOByte 12-05-2001 07:24 AM

Oh yeah, here's Wales too ;)

Lionel 12-19-2001 09:32 AM

Great hack! I installed it one shot on 2.21.

Stretchr 01-15-2002 01:39 AM

Bane,
I would very much like the hack to use the same flags for vbStats if you mean that vbStats can use the flags with the full country name. That would be great, even if I would have to upload these, I prefer having the alt tag capability. Think I'll wait till I get a reply to this before installing but it's a great hack. Thanks!

Quote:

Originally posted by Bane
The problem was that in the original version of the flags hack there were all lowercase flag names etc..There is an easy way to change the image settings for flags in vbstats if you want to use the same set. Or optionally you can wait for the next release of vbstats where I will release a compatible Flag Hack if AJ isnt back yet.

Stretchr 01-15-2002 05:51 AM

I'd still like to hear from Bane regarding integrating with vbStats but I couldn't wait to install this one. Great job on the hack and documentation.

I'm running 2.2.1 and did your step-by-step and it went flawlessly. Guess it pays to RTFM, though I'd hate to make a habit of it. :D Thank you AJR!

Erwin 01-15-2002 07:06 AM

Wow... I had to do a small bit of modifications to the hack to make it comply with the mood hack, gender hack and and all my other user hacks - I was getting database errors, and had to sort it out. Took a while, no one was able to register or change their profile, but I persevered, and it is now working. I made it non-compulsory when a new user registers too. I could not be bothered making any changes to the vbstats flags, so I just uploaded the long name ones.

Good job! :)

Now to try to get it working from CP...

Erwin 01-15-2002 07:11 AM

Yup, CP is working.

Whew... :)

And the addition to the memberlist was sweet too. Thanks!

Dex 01-21-2002 12:59 AM

Thanks for the great hack :)

Dex

Dex 01-21-2002 07:14 AM

Bane it'd be great if you'd take off that faulty version of yours or at least replace it with aldamon's updated version.

Your text file had me busy for 2 hrs figuring out why people couldn't register. And that's right after I told people that my site is online. They all got knocked back, pretty embarrassing.

It's the missing 'country' string in the register.php.

I guess I didn't really understand aldamon, I thought he had just a version that indicated all the changes from 2.0.3 to 2.2.1 or something like that, which I didn't need. That's why I DL the original file.

Just trying to save other newbies from this experience.

;)

Dex

aliraqi 01-21-2002 08:42 AM

why hasnt webhost replied to the fact that the string he said is found twice in usercp.php only occurs in it once?

what are we supposed to do?

PhotoGenie 02-02-2002 08:01 PM

I installed this hack on 2.2.2 and the flags show fine. I had trouble with not being able to register after making changes to the register.php .. I decided to leave the register changes out and everything else is working fine. You can add flags in your edit profile still. I was getting a parse error on the very last line of the register.php file. It could have been my error because I didn't try it again, but I do plan too. This is a great hack and I'll take it anyway I can get it. Thanks!

KISS 02-02-2002 08:26 PM

does this work and and avatars together? or it replaces the avatars?

PhotoGenie 02-02-2002 08:56 PM

With avatars:)

PhotoGenie 02-02-2002 09:54 PM

I went back and made the changes in my register.php file again and apparently I made a mistake changing the code.. This hack is completly compatible with 2.2.2.. I have tested it thouroughly.

KISS 02-03-2002 12:46 AM

ok cool gonna install this then hehe :)

TheComputerGuy 02-04-2002 03:14 AM

I have this installed for 2.21, it works great for new people, but me, I can not edit my flag and it show......any idea.....Thanks for a great hack

PhotoGenie 02-04-2002 10:55 AM

Have you looked at your user table in phpMyAdmin in the country field to see if its adding it to the database?

TheComputerGuy 02-04-2002 12:57 PM

I edited it in the admin CP and it started to work...but the flag is not, so the images arent quite yet but I think it is workign )

TheComputerGuy 02-04-2002 12:57 PM

thanks for the help :)

khan 02-10-2002 01:22 PM

I got an error :surprised
Parse error: parse error in /home/virtual/site35/fst/var/www/html/vportal/forums/member.php on line 528

anybody know what that means
and btw I have 2.2.2
oh yea forgot when I go to user control panel and go to edit profile, edit options or edit password


All times are GMT. The time now is 04:53 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
  • Page Generation 0.01383 seconds
  • Memory Usage 1,825KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)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