26 (edited by Muggen 2004-01-06 01:58)

Re: Private Message System

Hm, I dont know what happened here or when. I just reloaded the page and it worked.

http://vifta.missvogue.net/~fabian/pms.jpg

Edit:

http://malin.isa-geek.com/search.php?action=show_new (occurs only when there are no new posts)
http://malin.isa-geek.com/misc.php?action=rules

Brings

Warning: main(./lang//_pms.php): failed to open stream: No such file or directory in /home/httpd/htdocs/cg/punbb/pms/header_new_messages.php on line 3



header_new_messages.php

<?
    if(!$cookie['is_guest']){
        require $pun_root.'lang/'.$language.'/'.$language.'_pms.php';
       
        // Check for new messages
        $result_messages = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'messages WHERE showed=0 AND owner='.$cur_user['id']) or error('Unable to fetch reports info', __FILE__, __LINE__, $db->error());
        if ($db->result($result_messages, 0)){
            $tpl_temp .= '<br><a class="punhot" href="message_list.php">'.$lang_pms['New messages'].'</a>';
        }

        // Check if the inbox is full
        if($pun_config['o_pms_messages'] != 0 && $cur_user['status'] < PUN_MOD){
            $result = $db->query('SELECT count(*) FROM '.$db->prefix.'messages WHERE owner='.$cur_user['id']) or error('Unable to get message count', __FILE__, __LINE__, $db->error());
            list($count) = $db->fetch_row($result);
   
            // Display error message
            if($count >= $pun_config['o_pms_messages'])
                $tpl_temp .= '<br><a class="punhot" href="message_list.php">'.$lang_pms['Full inbox'].'</a>';
        }
    }
?>

Re: Private Message System

I found one thing here...

If you delete a user who has sent you a private message, that message will be undeletable.

28

Re: Private Message System

I hate it when my code does not work on other machines... *says this as he takes a sip of coffee*

"You start coding. I'll go find out what they want." - Computer Analyst to Programmer

29 (edited by chacmool 2004-01-06 09:34)

Re: Private Message System

Muggen wrote:

Hm, I dont know what happened here or when. I just reloaded the page and it worked.

http://vifta.missvogue.net/~fabian/pms.jpg

It look's like there is some variables missing, even though it should work... Try this:

Find:

require $pun_root.'lang/'.$language.'/'.$language.'_pms.php';

Before add:

global $pun_root, $language;

Fredrik wrote:

I found one thing here...

If you delete a user who has sent you a private message, that message will be undeletable.

Ok, I'm gonna fix it today. Also, when a user is deleted, the private messages should be deleted to.

Thanx!

30 (edited by chacmool 2004-01-06 10:27)

Re: Private Message System

Everything fixed! There's a new version to download at PunRes.

Changes:

· Fixed an bug where header_new_messages.php couldn't include the lang-file. (thanx Muggen!)
· Fixed so a users messages are deleted when the user is deleted.
· Fixed a bug where a message was undeletable if ther user was removed. (thanx Fredrik!)
· Removed a comma which caused some installations to fail. (thanx Fredrik!)

If you don't want to reinstall the whole mod, just replace the files (there is a new one too) and just do step 19-20:

#
#---------[ 18. OPEN ]---------------------------------------------------------
#

    profile.php

#
#---------[ 19. FIND (line: 562) ]---------------------------------------------
#

    // Set all his/her posts to guest
    $db->query('UPDATE '.$db->prefix.'posts SET poster_id=1 WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $db->error());

#
#---------[ 20. AFTER ADD ]----------------------------------------------------
#

    require($pun_root.'pms/profile_delete.php');

#

31

Re: Private Message System

Seems to work now, good job!

32

Re: Private Message System

Every time I try to submit a massage I get "A runtime error has occurred do you wish to debug line: 30 error: object expected" I just press no and it works, but it?s kind of annoying. Everything else works besides that.

33

Re: Private Message System

Think I just found a bug or something.

When I look at the messages I've gotten.
The IP info of the user is blank.

34 (edited by chacmool 2004-01-07 21:59)

Re: Private Message System

Muggen wrote:

Think I just found a bug or something.

When I look at the messages I've gotten.
The IP info of the user is blank.

Yes, it's a bug. A known one, but anyway smile It's fixed in the next version.

Edit: Known but forgotten that is, I'll fix it right away. Thanx!

Re: Private Message System

I found another bug. A users with a ' in the user name gets a:

Error: Unable to get user id.

Can't send PMs to them sad

Re: Private Message System

Gah! Again!

I always forget to check for them... I'm fixing this tomorrow sometime.

Re: Private Message System

Fixed!

Download message_send_v1.0.2-v1.0.3.zip from punres and replace the file in the punbb directory.

Re: Private Message System

I'm still having a issue sad I uploaded the new file and I still get the same message. One of the users that's having issues has the member name

Retail's Bitch

could it be the space in the name?

Re: Private Message System

MrSlugger wrote:

I'm still having a issue :( I uploaded the new file and I still get the same message. One of the users that's having issues has the member name

Retail's Bitch

could it be the space in the name?

Okey... I'll look at it when I'm home later today :)

Re: Private Message System

Chacmool wrote:
MrSlugger wrote:

I'm still having a issue :( I uploaded the new file and I still get the same message. One of the users that's having issues has the member name

Retail's Bitch

could it be the space in the name?

Okey... I'll look at it when I'm home later today :)

I've tried registering a user with taht nickname, and it works fine sending messages to the account (and also send from that user). There's no problem for me :(

Try overwring all files instead and see if it works... otherwice, try telling me exactly the process and what happens when it's not working.

Oh, and btw, thanks for telling me end for helping me solving the problems. I'll imagine there's more people having the same problem, but not doing anything about it!

Re: Private Message System

[topic moved]

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Private Message System

[Topic moved back] :D

Re: Private Message System

Doest the v1.0.3 works with the 1.1.1 PunBB?

Re: Private Message System

Starfish wrote:

Doest the v1.0.3 works with the 1.1.1 PunBB?

Yes it does. I forgot to add 1.1.1 to the readme-file though... I'm fixing it when I talk to Jansson next time (but it works to download and install it right away).

45

Re: Private Message System

Hmm.. This one doesnt work with 1.1.2 right?

Re: Private Message System

Railer: The changes made in PunBB 1.1.2 were few and small, so there shouldn't be much problem installing it. If there are any problems, they will most likely be line numbers not matching up exactly.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

47

Re: Private Message System

Well , when i try to run install_mod.php it complains about my version.
And to be honest im not _that_ great at php , html etc.
Altough i easily got the board to work super.

Re: Private Message System

Railer wrote:

Well , when i try to run install_mod.php it complains about my version.

It's beqause I've not changed it so it supports PunBB v1.1.2 yet. I'm planning on doing it within a few days (hopefully, I've had alot to do lately, not been any modding for a while now).

/chacmool

Re: Private Message System

I've look through the hdiff-files now, don't think there's something effecting my mod there, so it was an easy update!

Download new ver at PunRes.

Re: Private Message System

Nice to see a mod that works for three different versions of PunBB :D

"Programming is like sex: one mistake and you have to support it for the rest of your life."