Author Topic: [MOD] Private Message System (PMS) not supported anymore!  (Read 110196 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Private Message System (PMS)
« Reply #60 on: May 11, 2003, 06:14:00 PM »
yes, I have explained it in the link I showed ;)
u need replace
Code: [Select]
ORDER BY ".get_user_table_field("", "user_name")." ASC";with
Code: [Select]
ORDER BY username ASC";
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 Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
[MOD] Private Message System (PMS)
« Reply #61 on: May 11, 2003, 06:24:44 PM »
Ups  :oops:  sorry i dont see that. Now i changed this Code too.....and what will i say 8O  it looks same like befor changing code of the tread you had posted....defauttex ok....users bg=red names=red  i think the skript could read the userstable because now the list is like before changes very long.....:oops:  :oops:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Private Message System (PMS)
« Reply #62 on: May 11, 2003, 07:05:31 PM »
Quote from: Gabi
users bg=red names=red

you are wrong here.
since all selections uses same class, and u can see word at the top of list and at the bottom u can see "underfined" that means, that the script didnt print names at all.
to prove that I'm right, open your site and open source of your page, then search for var user_list = this is the list generated by pms.php the format of that list is:
xx,name,xx2,name2,xx3,name3
where xx is member ID.
so, as u can see in your source it shows only xx,,xx2,,xx3,,
no names where displayed at all...so, thats not the style problem, that your integration messing up, do again changes above.
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 Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
[MOD] Private Message System (PMS)
« Reply #63 on: May 11, 2003, 07:21:04 PM »
ups sorry you are right, in default template is same problem too. Ok now i will fix everything once more. The changes i must only do in the pms.php or in other sites too???

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Private Message System (PMS)
« Reply #64 on: May 11, 2003, 07:36:37 PM »
if everything else works fine, then only in the pms code
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 Gabi

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.gabis-traum.de
[MOD] Private Message System (PMS)
« Reply #65 on: May 11, 2003, 07:52:54 PM »
Quote from: V@no
if everything else works fine, then only in the pms code

in line 550 is u.user_name change this too ???
line 102 changed to  "username" => $user_to['username'],
line 162 changed to  $username = get_user_info($user_id);
line 163 changed to  $message = "
Quote from: .$username['username'].
".$result['pms_text']."
";

Are the changes corect so ???? Rest of changes are no problem...

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[MOD] Private Message System (PMS)
« Reply #66 on: May 14, 2003, 12:31:42 AM »
Quote from: V@no
Quote from: Bomba
and what about the picture comments, can they be forward to picture owner inbox?
i think it would be really cool :)

and what do want to do with comments posted by guests?


Quote from: Bomba
in my gallery, guests are not allowed to comment
only registed members can


sorry for asking this again but this mod i would really like to have :)
anyone?


thanks

Offline olinde

  • Pre-Newbie
  • Posts: 2
    • View Profile
    • http://olindner.axxs.de
[MOD] Private Message System (PMS)
« Reply #67 on: May 16, 2003, 11:01:01 AM »
Bin am verzweifeln!!!
Habe den Code von PMS (toller MOD!!) durchgegangen und weis nicht mehr weita!
Habe folgenden Fehler:
Beim Anzeigen des Paging Stats wird nicht die richtige Lang angezeigt. Bekomme immer "Gefunden: 1 Bild(er) auf 1 Seite(n). Angezeigt: Bild 1 bis 1. " Dies steht bei mir im lang-file:
Code: [Select]
$lang['pms_paging_stats'] = "Du hast {total_cat_images} Nachricht(en) {new} auf {total_pages} Seite(n) in deinem {box}.Angezeigt: Seite {first_page} bis {last_page}.";


Jetzt hab ich mal probiert im template "pms_folder.html" dieses {paging_stats} durch {pms_paging_stats} auszutauschen. Dann bekomme ich gar keine Anzeige!!

Was habe ich falsch gemacht?

mfg
Olaf

http://olindner.axxs.de

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
I've only one problem so far.
« Reply #68 on: May 20, 2003, 06:14:53 AM »
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.

Code: [Select]
//-----------------------------------------------------
//--- 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."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: I've only one problem so far.
« Reply #69 on: May 20, 2003, 06:23:23 AM »
Quote from: lakeside
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.

heiko already asked ;):
http://4homepages.de/forum/viewtopic.php?p=23679#23679
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 lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
[MOD] Private Message System (PMS)
« Reply #70 on: May 20, 2003, 06:32:22 AM »
Sorry, I must have missed that and I read all 6 pages, at least all that I thought was in english.  But the rest of my problems still stand unfortunately (I hit send before writing them all, so I edited it).

Again thanks for your time,

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
[MOD] Private Message System (PMS)
« Reply #71 on: May 21, 2003, 06:14:59 AM »
Sorry to *BUMP*, but im at a loss as to the rest of my edited questions and problems.

V@no, can you help with this.

I know, I hate bumps too, but Im deperate as I didnt make backups as I should have, so now it's only partially working.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: I've only one problem so far.
« Reply #72 on: May 21, 2003, 12:52:27 PM »
Quote from: lakeside
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.

ah, yes, sorry, that was my bad...I just updated Step 8.

Quote from: lakeside
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:


I just tryed the code you posted - nothing happend...
would u PM me with entire page_header.php?
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 lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
[MOD] Private Message System (PMS)
« Reply #73 on: May 22, 2003, 03:33:27 AM »
Okay, I've pm'd you the entire page_header.php file.

Another problem Im having, dont know whats going on.

I use {pms} in my userlogin_info.html template, but nothing shows up for it.  It should show, "you have 2 new messages in your inbox"  but it shows nothing when there is 1 new message in my inbox.

Did I miss a step, or is this related specifically to my pageheader.php file or something left out of the coding all together?

Thanks for your time and effort V@no, it is much appreciated.

Offline the_spirit

  • Newbie
  • *
  • Posts: 12
    • View Profile
[MOD] Private Message System (PMS)
« Reply #74 on: May 22, 2003, 11:11:28 PM »
Have i missed something.. ?

Warning: Wrong parameter count for trim() in C:\apache\htdocs\4images\pms.php on line 274


And line 274 in pms.php is

"user_list" => trim($user_list, ","),

The error only shows at the top of the page in "new message"
In Inbox, sentbox, outbox i dont gets the error