First off, let me say thank you, it's a great mod.
But I do have a minor problem.
If im in the private messaging system (anywhere in the private messaging system, i.e. inbox, sentbox, outbox etc), and I use my logoff button which would normally take me back to the index.php page, instead it takes me to the pms.php which produces an error, like "Your not logged in".
So, Im wondering where I can change things so that if a user logs off from anywhere in the PMS system, it takes them to the index.php page instead of the pms.php page.
Also, on the comment_bit.html page, I have the code: {lang_pm}
But when I click on it, it brings out the new message page, but the user is not selected for me. when I examine the link it says:
http://www.mydomain.com/4gallery/pms.php?action=reply&user_id=You'll notice that the user_id= nothing. How do I go about fixing this?
I know there is another problem that Im having as well, and thats with the popup, if a users selects to show popup message when new message is received I get the following error at the top of my sites pages:
Warning: Cannot add header information - headers already sent by (output started at /home/x1/xx2/4gallery/includes/stats.php:83) in /home/x1/xx2/4gallery/includes/page_header.php on line 126
>
On line 126 of page_header.php I have the following:
setcookie($cookie_name.'pmsnewpopup', serialize($result['pms_date']), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
Please note also the following is how I have my page_header.php if you remember you created some code so that I could have a direct link to the users gallery, so that might be my problem but I dont know how to solve it.
//-----------------------------------------------------
//--- PMS ---------------------------------------------
//-----------------------------------------------------
$sql = "SELECT COUNT(pms_id) AS total
FROM ".PMS_TABLE."
WHERE pms_to = ".$user_info['user_id']." AND (pms_type = ".PMS_SENT." OR pms_type = ".PMS_SDLT." OR pms_type = ".PMS_UNREAD.")";
$result = $site_db->query_firstrow($sql);
$pms_inbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS total
FROM ".PMS_TABLE."
WHERE pms_from = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD;
$result = $site_db->query_firstrow($sql);
$pms_outbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS total
FROM ".PMS_TABLE."
WHERE pms_from = ".$user_info['user_id']." AND (pms_type = ".PMS_SENT." OR pms_type = ".PMS_RDLT.")";
$result = $site_db->query_firstrow($sql);
$pms_sentbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS new
FROM ".PMS_TABLE."
WHERE pms_to = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD;
$result = $site_db->query_firstrow($sql);
$pms_new = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php")."\">".(($result['new']) ? "<blink>".$result['new']."</blink>" : 0)."</a>";
$pms = preg_replace("/".$site_template->start."msg_new_count".$site_template->end."/siU", $pms_new, $lang['pms_link']);
$pms = preg_replace("/".$site_template->start."inbox".$site_template->end."/siU", "<a href=\"".$site_sess->url(ROOT_PATH."pms.php")."\">".$lang['pms_inbox']."</a>", $pms);
// PMS Boxes
$blink = "<script language=\"JavaScript\">\n<!--\nvar flg=0;\nfunction blink(){\nvar myElement=document.getElementById('blnk');\nflg^=1;\nif(flg==1){\nmyElement.style.visibility='hidden';\n}\nelse{\nmyElement.style.visibility='visible';\n}\ntimerID = setTimeout( 'blink()' , 500 );\n}\n//-->\n</script>\n";
$show_inbox = ($result['new']) ? $blink."<span id=\"blnk\">".$lang['pms_inbox']."</span><script language=\"JavaScript\">blink();</script>" : $lang['pms_inbox'];
$inbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=inbox")."\" title=\"".$lang['pms_total']." (".$pms_inbox.")\">".$show_inbox."</a>";
$sentbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=sentbox")."\" title=\"".$lang['pms_total']." (".$pms_sentbox.")\">".$lang['pms_sentbox']."</a>";
$outbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=outbox")."\" title=\"".$lang['pms_total']." (".$pms_outbox.")\">".$lang['pms_outbox']."</a>";
$newpms = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=new")."\">".$lang['pms_new']."</a>";
$sql = "SELECT pms_date
FROM ".PMS_TABLE."
WHERE pms_to = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD."
ORDER BY pms_date DESC";
$result = $site_db->query_firstrow($sql);
$pms_popup_script = "";
$pms_popup_header = "";
if ($result && $user_info['user_pms_popup'] && !ereg("pms.php", $self_url)) {
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
$cookie_pmsnewpopup = isset($HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup'])) : 0;
$pmsnewpopup = (isset($session_info['pmsnewpopup'])) ? $session_info['pmsnewpopup'] : $cookie_pmsnewpopup;
if ($pmsnewpopup < $result['pms_date']) {
$cookie_expire = time() + 60 * 60 * 24 * 90;
setcookie($cookie_name.'pmsnewpopup', serialize($result['pms_date']), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
$site_sess->set_session_var("pmsnewpopup", $result['pms_date']);
$pms_popup_script = "<script language=\"JavaScript\">
<!--
function confirm_newpm() {
input_box=confirm('".$lang['pms_popup_confirm']."');
if (input_box==true) { // Output when OK is clicked
second_box=confirm('".$lang['pms_popup_newwindow']."');
if (second_box==true) {
window.open('".$site_sess->url(ROOT_PATH."pms.php")."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
} else {
window.location='".$site_sess->url(ROOT_PATH."pms.php")."';
}
} else {
// Output when Cancel is clicked
}
}
// -->
</script>";
$pms_popup_header = "onload=\"Javascript:confirm_newpm()\"";
}
}
$site_template->register_vars(array(
"pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox." | ".$sentbox." | ".$outbox." | ".$newpms,
"pms_popup_script" => $pms_popup_script,
"pms_popup_header" => $pms_popup_header,
"media_url" => MEDIA_PATH,
"user_cat_url" => ($user_cat_id) ? "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$user_cat_id)."\" class=\"box2\">My Gallery</a>" : "",
Thanks again