4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 13, 2005, 11:00:43 PM

Title: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 13, 2005, 11:00:43 PM
This mod will show country flags of your visitors in "Who's online?" in ACP (Admin Control Panel)

(http://img222.exs.cx/img222/4825/whois1ut.png)


--------- [ Installation ] ------------

Step 1
Visit the home page of the tools will be used in this mod:
http://www.maxmind.com/app/geoip_country
Read the licence and make sure its NOT conflicts with your usage.

Download the following files:
1) http://www.maxmind.com/download/geoip/api/php/geoip.inc
Save it in includes/ directory of your 4images installation

2) http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Extract the content of this archive (u can use WinZIP, WinRAR, 7-Zip or any other archivers)
Save the extracted file (GeoIP.dat) into includes/ directory (make sure u keep the case: its GeoIP.dat not geoip.dat)

3) Download and extract flags.zip (#post_attachment) file from the attachment below.
Save the files into flags/ folder in your 4images root directory.

The attached GeoIP.20100809.zip file should only be used as a backup, only if provided download links no longer working, because it might be out of date.

Step 2
Open admin/home.php
Find:
Code: [Select]
   $prev_ip = "";
Insert below:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
    if (!class_exists("GeoIP"))
    {
      include(ROOT_PATH."includes/geoip.inc");
    }
    
    $gi = geoip_open(ROOT_PATH."includes/GeoIP.dat",GEOIP_STANDARD);
    $countries = array();
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/


Step 2.1
Find:
Code: [Select]
       echo "<td>".$username.$invisibleuser."</td>\n";
Insert above:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/


Step 2.2
Find:
Code: [Select]
       echo "<td>".$lang['userlevel_guest']."</td>\n";
Replace with:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  ORIGINAL BLOCK:
        echo "<td>".$lang['userlevel_guest']."</td>\n";
*/
/*
  MOD VISITORS COUNTRY FLAGS
  START REPLACE
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        echo "<td><img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$lang['userlevel_guest']."</td>\n";
/*
  MOD VISITORS COUNTRY FLAGS
  END REPLACE
*/
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: JensF on March 14, 2005, 12:10:26 AM
Great Mod. Thanks for this  :D
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: AntiNSA2 on March 14, 2005, 02:28:07 PM
Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?

Or did you somehow do that with pphlogger (Thank god I got that one before it was gone) 8O
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 14, 2005, 02:37:37 PM
Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?
yes, its based on this too. Maybe in time I'll post it too ;)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: martrix on March 14, 2005, 04:25:18 PM
wonderful! I like that!

I guess I'll implement that tonight  :)

Thank you V@no  :D

Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Vincent on March 14, 2005, 06:48:15 PM
Hello V@no
as i know the IP code is not fixed to a country! This only should work with IP.v6

vincent
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: martrix on March 14, 2005, 11:03:13 PM
Vincent, that's not really exact - a lot of IP's are assigned to an ISP ;) and this Internet Service Provider provides this internet service in a certain country ;)
if you check 83.148.16.15 (http://www.ripe.net/perl/whois/?searchtext=83.148.16.15) there's a 95 % chance that the user comes from the Czech Republic or if you'll search for 148.120.16.15 (http://www.ripe.net/perl/whois/?searchtext=148.120.16.15) it in 95 cases of 100 it could be a visitor from Norway...
 8)



2 V@no: Great thing! It works fine. Thank you for this mod again  :lol:
I'm looking forward to see your next mod   :wink:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: JensF on March 14, 2005, 11:08:52 PM
Hi there,

is there a way to see the flags on the whos_online.html ??????

Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: martrix on March 14, 2005, 11:15:22 PM
is there a way to see the flags on the whos_online.html ?
sure  :wink:
did you read through the posts?

Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?
yes, its based on this too. Maybe in time I'll post it too ;)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: JensF on March 14, 2005, 11:18:57 PM
Thanks, i doesn“t read it. Now i wait.....  :roll:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 02:12:26 AM
Hi I have installed this MOD but I think that this is not working right because this said that I am in japon :S and now I'm USA and The ips from Spain are not show with a spanish flag they are show as a LAN IP any of the ips correspond with the flag   :cry: :cry: :cry: :? :? :? :?

(http://69.56.196.226/~ascanio/ips.jpg)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 15, 2005, 03:07:19 AM
can u PM me with a few IPs from spain and your IP (which shows as Japan)?
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 05:43:06 AM
of course  :wink: I think that the ips are from spain  :oops: but i am not sure, by the way where did u get those flags,they are awesome, the ones on your image
----------------------------------------------------
update
I have found the flags!!!
(http://www.hahn-hotel.com/flags/small/all/ca.png)(http://www.hahn-hotel.com/flags/small/all/us.png)

http://www.hahn-hotel.com/flags/zip/world.small.zip
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 15, 2005, 05:49:10 AM
by the way where did u get those flags,they are awesome, the ones on your image
tell u the truth - I dont remmember... :oops:
but I'm sure I googled them :D
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 05:52:37 AM
I just send it to you the ips in a PM ;)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 06:26:30 AM
all the cool country flags that i see in google are shareware  :(
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 15, 2005, 07:00:28 AM
Ok, I think I know what is wrong. Please redownload the first file:
http://www.maxmind.com/download/geoip/api/GeoIP_php-1.3/geoip.inc
by misstake I posted url to a wrong version...
I've updated original post. See if it works now.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 07:16:46 AM
Hey V@no I just upload the .dat file and now it works  :lol: :lol: :lol: I think that the last time that I upload that file the transfer was not complete ... thanks for your help!

(http://69.56.196.226/~ascanio/ips2.jpg)  :D :D :D
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 15, 2005, 11:27:33 PM
of course  :wink: I think that the ips are from spain  :oops: but i am not sure, by the way where did u get those flags,they are awesome, the ones on your image
----------------------------------------------------
update
I have found the flags!!! the icons are in .png but you can convert them with FastStone Photo Resizer is a great program and free
(http://www.hahn-hotel.com/flags/small/all/ca.png)(http://www.hahn-hotel.com/flags/small/all/us.png)

http://www.hahn-hotel.com/flags/zip/world.small.zip
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 15, 2005, 11:58:59 PM
I have found the flags!!! the icons are in .png but you can convert them with FastStone Photo Resizer is a great program and free
(http://www.hahn-hotel.com/flags/small/all/ca.png)(http://www.hahn-hotel.com/flags/small/all/us.png)

http://www.hahn-hotel.com/flags/zip/world.small.zip
your dont have to convert them, just edit the added code and replace .gif with .png ;)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ascanio on March 16, 2005, 12:32:01 AM
yeah I knew that but I don“t know what file ...
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 16, 2005, 12:44:27 AM
home.php
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: AntiNSA2 on March 16, 2005, 06:12:20 AM
Thanks V@no.

Awsome mod as usual...

(would be cool if you share the one for users online :) )
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: RezaSalmanzadeh on March 16, 2005, 07:02:57 PM
Thanks Dear "V@no"
That is  an  useful mod.

I need insert in user online list image flag with country name please help me !

Reza  :wink:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Apollo13 on March 16, 2005, 09:57:01 PM
i have a problem with this mod...

i followed all steps... but in amdin panel  i got a blue tablerow nothing else
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on March 16, 2005, 11:15:36 PM
i have a problem with this mod...

i followed all steps... but in amdin panel i got a blue tablerow nothing else
mmm....no clue what could be wrong...maybe check permissions on new files...
also, if u could provide a screenshot - it might help ;)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: b.o.fan on March 17, 2005, 12:03:43 AM
hey V@no!

GREAT MOD good Work!

thanx b.o.fan
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Gyoru on March 17, 2005, 01:21:30 AM
Very nice. Added it flawlessly and am eagerly waiting for the Who's Online version.  :D
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: RezaSalmanzadeh on March 17, 2005, 08:01:43 PM
please answer the question ?

I need insert in user online list image flag with country name !
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: martrix on March 17, 2005, 11:25:41 PM
@  RezaSalmanzadeh:

please answer the question ?

I need insert in user online list image flag with country name !

V@no did already indirectly answer your question long time before you did post your answer  8O

Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?
yes, its based on this too. Maybe in time I'll post it too ;)


1) read through the whole topic before asking  :o
2) be patient - V@no is doing answering a lot of questions daily and I guess he won't always answer the same question 2 times in one thread  :wink:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: BartAfterDark on March 20, 2005, 02:05:30 PM
Works perfect :D

V@no your the man :P hehe
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: cagedsmurf on April 12, 2005, 06:11:58 PM
Just Installed This Mod But Just In case Some else gets the white sqare image place holder instead of flag image check that the folder when unzipped is flags not flag as mine was  :oops:
Great mod V@no any news on the homepage version being released??
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: mawenzi on June 29, 2005, 12:26:37 PM
hi v@no,
excellent MOD ... great work ...  thanks ...  :D

@cagedsmurf
take this : [MOD]country flags of your visitors in "Who's online?" in home page  (http://www.4homepages.de/forum/index.php?topic=7831.0)

mawenzi
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: TomYork on July 26, 2005, 06:50:21 AM
nice mod!!!

congratulations!
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: niad on October 15, 2005, 07:14:09 PM
Dear V@no and Martrix,
I have read many times the thread, and some similar threads too,
but I didn't understand what I have to do for having flags with country name  :oops:

Too many flags is difficult to understand what country represent each flag...
Maybe an IP -> Country   translation or whatever helps ???

Please help, thank you in advance  :)

---
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on October 15, 2005, 08:39:32 PM
When you roll your mouse cursor on a flag, it should show u as a "info baloon" what country is that.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: niad on October 16, 2005, 08:31:32 AM
Thank you very much for your answer dear V@no  :)

Though, in the control panel, where the flags are showing,
not at the home page, I am not using the "Who is online" at the home page,  
I get no baloons with country names...

I wish I have, this great option in the control panel...

Can you please tell me what I have to add in the script to have this option in the control panel "who is online" ?

Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: niad on October 16, 2005, 09:44:11 AM
I have used a fresh copy of home.php and I applied the mod from the beginning.
I have just change the home.php and change with updated versions the GeoIP.dat  and the geoip.inc

Now I have a white picture with a red x on, instead of flags, but I have the country name!
Before I was having the flags without the country name!

If I replace the geoip.inc with my old one then I have no flag and no country name!

I wonder why the flags have dissapear...
The flags/ folder is still in my 4images root directory.
Any help please?  :oops:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: martrix on October 16, 2005, 10:21:30 AM
Please check if the flags are in the right category.
The best way is to right-click on the red x and see the properties for the path and compare it with the real path to your files.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: niad on October 16, 2005, 11:48:29 AM
 :D Thank you for your answer martrix  and for your very good tip:
Quote
The best way is to right-click on the red x and see the properties for the path and compare it with the real path to your files.

I found the solution  :D, my flags are in .png file format and in the new instalation of the MOD I didn't change the the .gif to .png file format.

The script works GREAT!

Thank you very much!

---
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Bear on October 17, 2005, 02:38:56 PM
nice mod
thanks for sharing
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Flo2005 on October 26, 2005, 07:18:06 PM
I need the flags  8O
Quote
http://www.maxmind.com/download/geoip/database/flag.zip
doesn“t work anymore...
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on October 27, 2005, 12:11:15 AM
read replys on second page ;)

And I just updated the original post
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Flo2005 on October 27, 2005, 12:59:36 AM
Oh, I“ve allready download this package - I haven“t looked into it cause I only saw these 2 flags from the post of ascanio :oops: sorry :oops:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Flo2005 on October 28, 2005, 10:19:45 PM
Hi! I added this MOD to my page and it works fine. Nice MOD V@no  8)

During this installation I checked  :idea: out the problem of

cr@za Sash
Quote
i have a problem with this mod...

i followed all steps... but in amdin panel  i got a blue tablerow nothing else

(http://www.snuup.de/blue_table.jpg)

I think he doesn“t upload GeoIP.dat & geoip.inc to the "includes" folder...
-------------------------------------------------------------------------------------------------------
Anybody here who has installed this Mod on the "who is online index.php" :?:
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on October 28, 2005, 11:35:52 PM
when you press CTRL+A (which should select everything on the page), it should show you the "hidden" text in that blue area.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Flo2005 on October 29, 2005, 12:33:23 AM
So we can take a look:

(http://www.snuup.de/4img_gfx/hidden_text.jpg)

That was the error...

Line 60 :arrow: admin/home.php

Code: [Select]
include(ROOT_PATH."includes/geoip.inc");
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on October 29, 2005, 12:35:29 AM
so, does includes/geoip.inc exists? did u check the case in the filename? (GeoIP.inc is not the same as geoip.inc)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Flo2005 on October 29, 2005, 12:42:51 AM
Sorry I know, I only post this problem for Cr@zy Sash and people which have this problem too...

Edit: For those who have the question: Is it possible to add this mod to who_is_online.html

follow this link: http://www.4homepages.de/forum/index.php?topic=7831.0
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: sigma on November 08, 2005, 03:46:47 AM
This file cannot be found anymore.

 http://www.maxmind.com/download/geoip/api/GeoIP_php-1.3/geoip.inc

can someone setup a mirror or tell me where i can find this file please?
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on November 08, 2005, 04:11:32 AM
I've updated the original post with this url:
http://www.maxmind.com/download/geoip/api/php/geoip.inc
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: sigma on November 08, 2005, 04:14:36 AM
Thanks V@no!
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: __G__ on December 13, 2006, 06:28:34 AM
i installed this mod but it shows whos online totaly blank on admin CP can someone help me
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: dhamee on December 15, 2006, 05:39:25 AM
awesome man nice MOD... i am soo happy
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: AntiNSA2 on July 01, 2007, 09:31:48 AM
Ok, after reinstalling this mod on my 1.74 upgrade, I have the same problem in the control panel as the who is online on the home page mod.

I can see no countries for guest. If I am doing something wrong please let me know. It only shows flags for who is logged in.....

Anyone know what I am doing wrong?

T.I.A.
Robert
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ashfaq on September 04, 2007, 06:05:07 PM
Is there any mode to show users with flags on the site instead of admin cp ?
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: mawenzi on September 04, 2007, 06:18:17 PM
@ashfaq
... there is a MOD ...  :wink:
http://www.4homepages.de/forum/index.php?topic=7831.0
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: ashfaq on September 06, 2007, 05:27:35 PM
Thanks Dear for the link.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: sanko86 on April 29, 2008, 10:36:27 AM
thanks @V@no
perfect mod
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Jan-Lukas on April 29, 2008, 09:45:29 PM
100% 1.7.6 tauglich
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: metal_brain on November 09, 2008, 01:56:12 PM
thanks millions  :D :D :D
such a great MOD!
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: __G__ on February 07, 2009, 09:56:24 AM
Hi was trying to get this work with 4images 1.7.6 it didnt work does any one know how to make it work this is what was happening when i was trying to get it to work


(http://img301.imageshack.us/img301/6144/dontworkrh2.jpg)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Hagen-Roderich on July 10, 2009, 11:55:27 AM
Works fine on V1.7.6
But i use some different download links:
Dat file: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Flags: http://flags.blogpotato.de/zip/small/world.zip
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Sebas Bonito on July 13, 2009, 03:16:09 AM
Works fine on V1.7.6
Flags: http://flags.blogpotato.de/zip/small/world.zip
In this case, the file-typ have to be changed (gif->png).

so search this:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/
and replace it with
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $username = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$username;
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/

AND search:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  ORIGINAL BLOCK:
        echo "<td>".$lang['userlevel_guest']."</td>\n";
*/
/*
  MOD VISITORS COUNTRY FLAGS
  START REPLACE
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        echo "<td><img src=\"".ROOT_PATH."flags/".strtolower($cid).".png"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$lang['userlevel_guest']."</td>\n";
/*
  MOD VISITORS COUNTRY FLAGS
  END REPLACE
*/
and replace with this
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  ORIGINAL BLOCK:
        echo "<td>".$lang['userlevel_guest']."</td>\n";
*/
/*
  MOD VISITORS COUNTRY FLAGS
  START REPLACE
*/
        $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        echo "<td><img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0> ".$lang['userlevel_guest']."</td>\n";
/*
  MOD VISITORS COUNTRY FLAGS
  END REPLACE
*/
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: batu544 on July 16, 2009, 05:44:49 PM
HI,
     Here I have a problem.. The Ips which are used by google bot usually displays as guest.. but it should display as Google-bot..

any idea how to do this ... ??

Thanks
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: mawenzi on July 16, 2009, 07:39:24 PM
@batu544

[MOD] Treat bots as users with less rights : http://www.4homepages.de/forum/index.php?topic=8752.0
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: zakaria666 on August 08, 2010, 11:48:30 PM
Hello vano,

what do i save this link as sir, http://geolite.maxmind.com/download/geoip/api/php/geoip.inc (http://geolite.maxmind.com/download/geoip/api/php/geoip.inc)???

it comes as a page with php code inside it so what chould i save it as geoip.inc?
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on August 09, 2010, 12:01:59 AM
I've fixed the links, except for flags.zip...unfortunately I've lost the package, so if anyone still have it, please attach or supply a link to it.
Thanks.


@zakaria666:
Right click on the link and select "save as" (or similar) and yes, save it as geoip.inc
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Hagen-Roderich on August 09, 2010, 08:15:07 AM
I've fixed the links, except for flags.zip...unfortunately I've lost the package, so if anyone still have it, please attach or supply a link to it.
Thanks.

http://www.4homepages.de/forum/index.php?topic=6709.msg138521#msg138521
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: zakaria666 on August 09, 2010, 01:25:34 PM
@ Hagen Roderick,

Hi sir, he was talking about the flags. If cannot download other flags from else where because of the fact that it may not be the same as the one in the .dat file, so if anyone here still have the FLAG. ZIP? please upload it, please

thank u
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on August 09, 2010, 02:08:49 PM
@ Hagen Roderick,

Hi sir, he was talking about the flags. If cannot download other flags from else where because of the fact that it may not be the same as the one in the .dat file, so if anyone here still have the FLAG. ZIP? please upload it, please

thank u
The reply Hagen-Roderich showed contains a link to the flags.

I've attached the package with converted into .gif images to the original post. Thank you Hagen-Roderich.
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: zakaria666 on August 09, 2010, 02:52:28 PM
my apologizes i should i seen it.

@ VANO,

I have done everything that u said but below is the problem im getting. What am i doing wrong sir

(http://i37.tinypic.com/2ynnk1w.jpg)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: V@no on August 09, 2010, 03:05:37 PM
If it's a missing image, then find out what image it is and create a copy of gb.gif as this missing image
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: zakaria666 on August 09, 2010, 03:45:46 PM
hello vano

i checked the flag file and its not missing the gb.gif, the gf.gif is still there and i dont know why its playing up. It may have to do with the geoip.inc file,
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: Tino23 on August 21, 2010, 12:17:54 PM
Die eu.gif fehlt in der Flag Datei. eu.zip (http://rapidshare.com/files/414221529/eu.zip)
Title: Re: [MOD] Country flags (based on IP) in whos online in ACP
Post by: clubbu on July 22, 2011, 09:32:01 AM
Thanks to V@ano.

Work in 1.70  :D