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

0 Members and 1 Guest are viewing this topic.

Offline sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #165 on: April 29, 2008, 01:10:00 PM »
Thanks perfect
Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanın insana düşmanlığıdır.

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #166 on: September 06, 2008, 05:20:03 AM »
Having problem here with the user and visitors online not accurate?
Anyone could help me here to fix this problem?

Attached herewith a print screen for reference, thank you!

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 #167 on: September 06, 2008, 06:55:38 PM »
Did you add any codes besides the code from the very first post?
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 axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #168 on: September 08, 2008, 12:09:24 PM »
Did you add any codes besides the code from the very first post?

Already fix the problem...
but, i can't see this below: 

For visitors with "unknown" or LAN IPs, save this image:  as lan.gif into flags/ folder as well
For visitors with using satelite service, save this image: as a2.gif into flags/ folder.


Any settings to improved here?

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 #169 on: September 08, 2008, 01:42:31 PM »
Sorry, you can't see the images? or what?
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 d1eter

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #170 on: September 09, 2008, 08:01:54 AM »
just implement it..
cool mod..!!

 :P

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #171 on: November 07, 2008, 04:01:10 AM »
How to show all users with one flag, for example if 3users are from india then it shows
User1: Indian Flag
User2: Indian Flag
User3: Indian Flag
Now i want that it show 3 users with only one indian flag ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #172 on: November 08, 2008, 02:45:29 AM »
How to show all users with one flag, for example if 3users are from india then it shows
User1: Indian Flag
User2: Indian Flag
User3: Indian Flag
Now i want that it show 3 users with only one indian flag ?

Anyone here to plz help with showing one country related user with one flag ?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #173 on: November 08, 2008, 01:31:54 PM »
... strange ...
... my mod instalation do that ...
... I think there is some missing code in your installation and you should check your code ...
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 ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #174 on: November 08, 2008, 04:52:41 PM »
... strange ...
... my mod instalation do that ...
... I think there is some missing code in your installation and you should check your code ...

Dear i just want that assume when 5 users are online from a country then they all show under one flag i mean
5-China Flag (it show five users are online from china)

Instead all five users with flags like
1-China Flag
2-China Flag
3-China Flag
4-China Flag
5-China Flag

Is it possible ?

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 #175 on: November 08, 2008, 05:53:32 PM »
remove
Code: [Select]
          $user_online_list .= ($user_online_list != "") ? ", " : "";

replace
Code: [Select]
        $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;
with:
Code: [Select]
        $username_c[$cid][] = "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;


Remove:
Code: [Select]
          $user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\">".$username."</a>".$invisibleuser;

Find:
Code: [Select]
    $invitado_online_list  = "<font color=\"#00FFFF\">".$num_guests_online."</font><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> ".$invitado_online_list ;
Replace with:
Code: [Select]
    $username_c[$cid]['guest'] = isset($username_c[$cid]['guest']) ? $username_c[$cid]['guest']+1 : 1;

Find:
Code: [Select]
  $num_total_online = $num_registered_online + $num_guests_online;
Insert below:
Code: [Select]
/*
  MOD VISITORS COUNTRY FLAGS
  START INSERT
*/
  if (!isset($username_c)) $username_c = array();
  $lang['guest'] = "guest";
  $lang['guests'] = "guests";
  foreach ($username_c as $cid => $array)
  {
    $user_online_list .= ($user_online_list != "") ? "; " : "";
    $user_online_list .= "<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> ";
    if (isset($array['guest']))
    {
      $user_online_list .= $array['guest']." ".$lang['guest'.($array['guest'] > 1 ? "s":"")];
      unset($array['guest']);
      $user_online_list .= (count($array)) ? ", " : "";
    }
    $user_online_list .= implode(", ", $array);
  }
/*
  MOD VISITORS COUNTRY FLAGS
  END INSERT
*/


{invitado_online_list} no longer used.
« Last Edit: November 14, 2008, 07:27:37 AM by V@no »
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 metal_brain

  • Jr. Member
  • **
  • Posts: 90
  • For all the reasons we have to die
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #176 on: November 09, 2008, 01:37:44 PM »
great Mod thanks :)
working perefectly

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #177 on: November 09, 2008, 10:03:56 PM »
i am gettings this error while coding to show one country related users with one flag.

Warning: Invalid argument supplied for foreach() in /hsphere/local/home/mydomain/mydomain.com/includes/sessions.php on line 743

file is attached.


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 #178 on: November 09, 2008, 10:41:11 PM »
above
Code: [Select]
  foreach ($username_c as $cid => $array)
insert:
Code: [Select]
if (!isset($username_c))
  $username_c = array();
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 ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #179 on: November 12, 2008, 02:05:43 AM »
Thanks for reply,
I had mad changes as you said and this error i gone
Warning: Invalid argument supplied for foreach() in /hsphere/local/home/mydomain/mydomain.com/includes/sessions.php on line 743

but the flags are still showing differently i mean one flag for all users related to a contry.
i have attached the session and htaccess files