Hi..I tried to put the country flag in the comment.
what i did was
First i put this in the details.php
$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
$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.