Author Topic: [MOD]country flags of your visitors in "Who's online?" in home page  (Read 287524 times)

0 Members and 1 Guest are viewing this topic.

Offline himu

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Point Of View
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #105 on: March 25, 2006, 04:37:53 AM »
Guys

How do I put Flag next to username in ACP Who's Online?
Can someone help me?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #106 on: March 25, 2006, 04:47:25 AM »
there is another mod for that...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline himu

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • Point Of View
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #107 on: March 25, 2006, 06:12:52 AM »
there is another mod for that...

Thanks! got it:
[MOD] Country flags (based on IP) in whos online in ACP
http://www.4homepages.de/forum/index.php?topic=6709.0

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #108 on: March 26, 2006, 09:07:07 PM »
Mawenzi:
Quote
You don't see the "alternative" text on mouse-over, because the "alt" and the "title" option of the <img>tag has to be filled out... if you have just the "alt" option, firefox will show no mouseover "tooltip" text.

Do these changes to see quick-info of each flag also in FireFox

Find in sessions.php:
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
*/

Replace 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;
        $flag = "<img src=\"".ROOT_PATH."flags/".strtolower($cid).".gif"."\" title=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unbekannt oder LAN")."\" alt=\"".(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")."\" border=0>";
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/

Now find:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
  $invitado_online_list = array();
  if (!empty($countries))
  {
    asort($countries);
    foreach ($countries as $key => $val)
    {
      $invitado_online_list[] = "<font color=\"#00FFFF\">".$val."</font><img src=\"".ROOT_PATH."/flags/".strtolower($key).".gif\" align=\"middle\" alt=\"".(($key != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$key]] : "Unknown or LAN")."\" border=0>";
    }
  }
  $invitado_online_list = implode(" , ", $invitado_online_list);
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/

Replace with:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
  $invitado_online_list = array();
  if (!empty($countries))
  {
    asort($countries);
    foreach ($countries as $key => $val)
    {
      $invitado_online_list[] = "<font color=\"#000000\">".$val." </font><img src=\"".ROOT_PATH."/flags/".strtolower($key).".gif\" align=\"middle\" title=\"".(($key != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$key]] : "Unknown or LAN")."\" alt=\"".(($key != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$key]] : "Unknown or LAN")."\" border=0>";
    }
  }
  $invitado_online_list = implode(" , ", $invitado_online_list);
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/

Please check out which kind of flags you´re using e.g. *.gif or *.png !

Ciao by Flo

Project offline

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #109 on: March 27, 2006, 08:34:21 PM »
Great mod i have not installed before.  8)
but i have a little problem.  :oops:

If a guest login on the site he is seeing a couple op errors

Code: [Select]
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/tunedcar/public_html/includes/geoip.inc:497) in /home/tunedcar/public_html/includes/sessions.php on line 105

Warning: Cannot modify header information - headers already sent by (output started at /home/tunedcar/public_html/includes/geoip.inc:497) in /home/tunedcar/public_html/includes/sessions.php on line 113

Warning: Cannot modify header information - headers already sent by (output started at /home/tunedcar/public_html/includes/geoip.inc:497) in /home/tunedcar/public_html/includes/sessions.php on line 113

Warning: Cannot modify header information - headers already sent by (output started at /home/tunedcar/public_html/includes/geoip.inc:497) in /home/tunedcar/public_html/includes/functions.php on line 47

Does anybody knows what the problem is.
I'm using 4images v1.7.2

You can login with user & pass: 4images on: http://www.tuned-cars.net/index.php
« Last Edit: March 27, 2006, 09:08:25 PM by wallpapers »



Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #110 on: March 28, 2006, 06:10:28 AM »
Edit goip.inc and remove anything above <?php and after ?> (newlines, spaces, etc)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #111 on: March 28, 2006, 06:23:52 AM »
Quote
Edit goip.inc and remove anything above <?php and after ?> (newlines, spaces, etc)
I would write the same  :D
it is working now
thanks V@NO



Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #112 on: April 14, 2006, 08:32:47 PM »
For those who also used gif-flags I´ve redesigned and added some flags :wink:

Satellite :arrow: , Lan / Unknown :arrow:

, , , , , , , , and some others... I can´t remeber :?

Edited 18.04.06: Europe (eu.gif) ->

Edited 21.05.06: Dominican Republic (do.gif) ->

Edited 22.05.06: Myanmar (mm.gif) ->

Edited 29.09.06: Seychelles (sc.gif) ->

Edited 29.09.06: El Salvador (sv.gif) ->

Edited 29.09.06: Honduras (hn.gif) ->

You can download the complete package here: last updated 29.09.06 http://www.snuup.de/4img_gfx/country_flags.zip

I´ve lost some flags? flo@snuup.de or PM me here on 4homepages Forum http://www.4homepages.de/forum/index.php?action=pm;sa=send;u=9640
« Last Edit: September 29, 2006, 07:52:30 PM by Flo2005 »

Project offline

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #113 on: April 20, 2006, 02:29:40 AM »
I've a simply question :

How can i show Reg. users and the guest users (obviously with flags) separated ? (not together) for example show reg. and guest in 2 different tables ? :?:

And if possible show the guests list , in vertical way (1 per row)  :mrgreen:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #114 on: April 20, 2006, 04:28:22 AM »
{invitado_online_list} is for guests only
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #115 on: April 20, 2006, 04:56:03 AM »
{invitado_online_list} is for guests only

Thanks  :) and about make 1 per row (flag/nº of users) , can i added a <br> on code ?


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline ciprianmp

  • Newbie
  • *
  • Posts: 29
  • Php just rocks!
    • View Profile
    • My site
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #118 on: July 22, 2006, 12:17:05 PM »
Any changes we should take into account when we upgrade to 1.7.3? I did the upgrade editing file by file, and it seems something went wrong:
Code: [Select]
Notice: Undefined variable: invitado_online_list in /home/ciprian/public_html/gallery/includes/sessions.php on line 529This is not from sessions.php as it appeared before I edited that file. Where should the variable be defined? Any ideas?
http://ciprianmp.com/gallery

Correction: Well, that message only appear when there is no guest to display, so it is not related to the upgrade (I might have had that error before, but haven't noticed it.) I'll try the fix myself, sorry.
« Last Edit: July 22, 2006, 12:32:58 PM by ciprianmp »

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #119 on: September 09, 2006, 01:23:30 AM »
thx.
nice mod!

working fine for me.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi