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

0 Members and 1 Guest are viewing this topic.

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 #75 on: November 15, 2005, 01:20:32 PM »
just a small question - I would like to have the numer(of visitor) X flag

ändere jeweils  ...
Quote
$invitado_online_list  = "<font color=\"#00FFFF\">".$num_guests_online." x </font><img src=\"".ROOT ...

mawenzi
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 djith

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #76 on: December 04, 2005, 01:02:40 AM »
have these errors... realy don't know what to do.... checked everything, found an error.... i had geoip_inc.php insteed of geoip.inc.php....nevertheless.... still this error ....

[The clipboard is temporarily disabled. To restore normal function, simply close the web browser currently viewing a full size image at Avatars at Avatarcorner.com]

djeezes ... this clipboard mod works fine....

oh well... i had an error like this.... at includes blablabla line 35 ......

what to do?

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 #77 on: December 04, 2005, 04:56:33 AM »
oh well... i had an error like this.... at includes blablabla line 35 ......

what to do?
well, for "blabblahblah" my answer would be: fix it yourself.
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 waleed

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #78 on: December 14, 2005, 02:20:27 PM »
hey vano plz i need ur help  :(

as you know am using 4images_vb35_integration

but after i installed this MOD i can only see Lan.gif flag
see the pic below 13 users with same flag
 :|



help plz

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 #79 on: December 14, 2005, 03:17:28 PM »
sorry, wthout knowing VB sturcture, I cant help you on this one. This is session manipulation, not just user related stuff - very different and more complicated.
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #80 on: December 25, 2005, 10:07:10 PM »
From the very first post, make sure you change :

Quote

$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id'];


to :

Code: [Select]

$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $row['session_user_id'], $url_show_profile) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['session_user_id']);


from your sessions.php file.

Merry Christmas.

Offline jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #81 on: January 15, 2006, 12:21:13 AM »
Hi..I tried to put the country flag in the comment.
what i did was

First i put this in the details.php
Code: [Select]
$main_template = 'details';


define('GET_CACHES', 1);
define('ROOT_PATH', './');
define('GET_USER_ONLINE', 1);
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

/*
  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
*/
if (!$image_id) {
  header("Location: ".$site_sess->url($url, "&"));
  exit;
}

Then i put this in the details.php
Code: [Select]
$comment_user_ip = ($user_info['user_level'] == GUEST) ? $comment_row[$i]['comment_ip'] : "";
      $cid = geoip_country_code_by_addr($gi, $row['session_ip']);
        if (empty($cid)) $cid = "lan";
        $countries[$cid] = isset($countries[$cid]) ? $countries[$cid]+1 : 1;
        $comment_user_ip = "<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> ".$comment_user_ip;

After i got Lan flag for all user now some one help me to show the country flag.

JameStave.

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 #82 on: January 15, 2006, 12:31:11 AM »
At first sign replacing
Code: [Select]
$cid = geoip_country_code_by_addr($gi, $row['session_ip']);with:
Code: [Select]
$cid = geoip_country_code_by_addr($gi, $comment_row[$i]['comment_ip']);should do, but there might be more to it then that. Try though.
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 jamstave

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #83 on: January 15, 2006, 12:46:51 AM »
Thanks for help V@no now it work.
And i need to show the country name after the flag rather than alt.

Something like this
flag Canada IP

JamStave.

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 #84 on: January 15, 2006, 01:11:29 AM »
You went so far by yourself in codding this, I'm surprised you've asked this question :P
use
Code: [Select]
(($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN")
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 #85 on: January 15, 2006, 01:26:50 AM »
and how make it only show name and not flag ( From: "Poland" ..) and not a image pic ...  :roll:

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 #86 on: January 15, 2006, 01:27:59 AM »
That will show the name of the country, not the pic. If you havent noticed yet, that is the line used for alt of the flag
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 #87 on: January 15, 2006, 01:34:32 AM »
i mean this show pic + (alt - country name) but i want just show country name without gif image(flag)...


default :  (flag + country name as "alt" )

i want : just the name of country without country flag ...

 8O

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 #88 on: January 15, 2006, 01:53:43 AM »
replace
Code: [Select]
$comment_user_ip = "<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> ".$comment_user_ip;with
Code: [Select]
$comment_user_ip = (($cid != "lan") ? $gi->GEOIP_COUNTRY_NAMES[$gi->GEOIP_COUNTRY_CODE_TO_NUMBER[$cid]] : "Unknown or LAN");
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 MEXX

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: [MOD]country flags of your visitors in "Who's online?" in home page
« Reply #89 on: January 29, 2006, 02:56:34 PM »
 Мод замечательный, но у меня некоторые сложности с показом изображения.
Когда правлю файл sessions.php, на превью картинка есть, но при открытии отображается прозрачный gif,
а не фото. В админ панели все нормально работает.
 Сделал изменения в файле details.php, чтобы в комментарии еще был и флаг, но опять ничего. Как будто ничего не менял.