PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#351 2007-10-27 18:55:49

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

there are so many threads - I didn't saw anything.
What do you mean with "per page basis"?

Offline

 

#352 2007-10-27 18:59:22

MattF
Member
From: South Yorkshire, England
Registered: 2007-03-16
Posts: 415

Re: Private Messaging System 1.2.x 1.2.2

Allows to select all messages on the list page being viewed for deletion.

Offline

 

#353 2007-10-27 19:11:22

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

ahh, ....I will digg

Btw. I am trying to add this email notification to the private message mod - and it works fine so far
I just want to change the notification email and add the Username of the recipient there, like "Hello Username" , do you know how I can get that information in there?

Code:

 if ($alert)
            {
            require PUN_ROOT.'include/email.php';
            $mail_subject = 'New Private Message has arrived';
            $mail_message = 'Hello XXXXXXX '."\n\n".'You have received a private message from '.$pun_user['username'].' to your account on "'.$pun_config['o_board_title'].'". '."\n".'You can view your new message by clicking on the following link:  '."\n\n".' '.$pun_config['o_base_url'].'/message_list.php'.' '."\n\n".'Remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile. '."\n\n".'-------------------------------------------------- '."\n".'Thanks. The Team'."\n".'(Please do not reply to this message)';
            pun_mail($email, $mail_subject, $mail_message);
            }

I asked also here: http://www.punres.net/viewtopic.php?pid=20675#p20675

Offline

 

#354 2007-10-27 19:11:46

MattF
Member
From: South Yorkshire, England
Registered: 2007-03-16
Posts: 415

Re: Private Messaging System 1.2.x 1.2.2

qman wrote:

In message_send.php, there is a bug. Under // Check inbox status, the $pun_user['g_pm_limit'] is the sender's limit and not the receiver's limit. The limit check is being evaluated against the sender's limit when it should be against the receiver's limit. Resulting in the Full Inbox message when the receiver's limit is higher than the sender's limit. I don't know how to fix it yet. Ideas anyone????


Code:

    // Send message
    if(list($id,$user,$status) = $db->fetch_row($result)){

        // Check inbox status
        if($pun_user['g_pm_limit'] != 0 && $pun_user['g_id'] > PUN_GUEST && $status > PUN_GUEST)
        {
            $result = $db->query('SELECT count(*) FROM '.$db->prefix.'messages WHERE owner='.$id) or error('Unable to get message count for the receiver', __FILE__, __LINE__, $db->error());
            list($count) = $db->fetch_row($result);
            if($count >= $pun_user['g_pm_limit'])
                message($lang_pms['Inbox full']);
                
            // Also check users own box
            if(isset($_POST['savemessage']) && intval($_POST['savemessage']) == 1)
            {
                $result = $db->query('SELECT count(*) FROM '.$db->prefix.'messages WHERE owner='.$pun_user['id']) or error('Unable to get message count the sender', __FILE__, __LINE__, $db->error());
                list($count) = $db->fetch_row($result);
                if($count >= $pun_user['g_pm_limit'])
                    message($lang_pms['Sent full']);
            }
        }

This is the code I use for that section. The $gpmresult query, list($limit) and if ($count >= $limit) lines are the relevant parts.

Code:

                // Send message
                if (list($id,$user,$status) = $db->fetch_row($result))
                {
                        $gpmresult = $db->query('SELECT g_pm_limit FROM '.$db->prefix.'groups WHERE g_id='.$status) or error('Unable to get group PM limit', __FILE__, __LINE__, $db->error());
                        list($limit) = $db->fetch_row($gpmresult);

                        // Check inbox status
                        if ($pun_user['g_pm_limit'] != 0 && $pun_user['g_id'] <> PUN_GUEST && $status <> PUN_GUEST)
                        {
                                $result = $db->query('SELECT count(*) FROM '.$db->prefix.'messages WHERE owner='.$id) or error('Unable to get message count for the recipient', __FILE__, __LINE__, $db->error());
                                list($count) = $db->fetch_row($result);

                                if ($count >= $limit)
                                {
                                        require_once PUN_ROOT.'header0.php';
                                        message($lang_pms['Inbox full']);
                                }

                                // Also check users own box
                                if (isset($_POST['savemessage']) && intval($_POST['savemessage']) == 1)
                                {
                                        $result = $db->query('SELECT count(*) FROM '.$db->prefix.'messages WHERE owner='.$pun_user['id']) or error('Unable to get message count the sender', __FILE__, __LINE__, $db->error());
                                        list ($count) = $db->fetch_row($result);

                                        if ($count >= $pun_user['g_pm_limit'])
                                        {
                                                require_once PUN_ROOT.'header0.php';
                                                message($lang_pms['Sent full']);
                                        }
                                }
                        }

Offline

 

#355 2007-10-27 19:21:25

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

oh, I don't know how to use that - what does it ?

Offline

 

#356 2007-10-27 19:33:37

MattF
Member
From: South Yorkshire, England
Registered: 2007-03-16
Posts: 415

Re: Private Messaging System 1.2.x 1.2.2

no64 wrote:

oh, I don't know how to use that - what does it ?

It checks the recipients inbox limit, (as it should), instead of the senders inbox limit, (as it does), when you send a PM.

Offline

 

#357 2007-10-27 19:40:21

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

so, this is a bug in the pm , that I have to correct?

Do you know that other thing with the name in the notification mail?

Offline

 

#358 2007-11-08 19:44:01

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

guardian34 wrote:

In register.php, find…

Code:

    pun_setcookie($new_uid, $password_hash, ($save_pass != '0') ? $now + 31536000 : 0);

…before, add:

Code:

    // mod: Get name of admin who is "sending" the message
    $result = $db->query('SELECT username, id FROM '.$db->prefix.'users WHERE group_id=1 ORDER BY id LIMIT 1') or error('Unable to fetch admin name', __FILE__, __LINE__, $db->error());
    list($admin_name, $admin_id) = $db->result($result);

    // mod: "Send" message to welcome user
    $db->query('INSERT INTO '.$db->prefix.'messages (owner, subject, message, sender, sender_id, sender_ip, smileys, showed, status, posted) VALUES(
        \''.$new_uid.'\',
        \''.$db->escape('Welcome!').'\',
        \''.$db->escape('Welcome to our forum.').'\',
        \''.$db->escape($admin_name).'\',
        \''.$admin_id.'\',
        \'127.0.0.1\',
        \'1\',
        \'0\',
        \'0\',
        \''.time().'\'
    )') or error('Unable to send private message', __FILE__, __LINE__, $db->error());

...I cant get this to work - nothing happens. Any ideas?

Offline

 

#359 2007-11-08 19:55:44

FSX
Member
Registered: 2006-09-14
Posts: 593
Website

Re: Private Messaging System 1.2.x 1.2.2

It's working in my forum (local).

Offline

 

#360 2007-11-08 20:01:36

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

well, I put that code into register.php and tried to register, but no "new messages" was shown..... I don't know.

Offline

 

#361 2007-11-08 20:34:27

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.2

Because you don't have any?


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#362 2007-11-08 20:40:24

no64
Member
Registered: 2007-06-20
Posts: 179

Re: Private Messaging System 1.2.x 1.2.2

yes, no messages shown and no message came in

Offline

 

#363 2007-11-18 13:07:39

Madie
Member
Registered: 2007-11-16
Posts: 42

Re: Private Messaging System 1.2.x 1.2.2

I have a problem after install i get a white forum page... Doesent say anything :S
Can someone help me with this problem... im running PunBB 1.2.15

Offline

 

#364 2007-11-18 14:55:27

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.2

Install the newer version of this mod, try again.


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#365 2007-12-16 03:30:05

jafi
New member
Registered: 2007-12-16
Posts: 1

Re: Private Messaging System 1.2.x 1.2.2

Madie wrote:

I have a problem after install i get a white forum page... Doesent say anything :S
Can someone help me with this problem... im running PunBB 1.2.15

Similar problem here (Private Messaging System 1.2.3). I can login as Administrator and send private messages, but when logging in as someone else I get an empty page sad..  Administration > Private Messaging (AP_Private_messaging.php) also returns a blank page. Anyone know how to fix this? Thanks

Offline

 

#366 2007-12-19 19:54:13

dilauro
Member
From: New Milford, CT
Registered: 2007-09-06
Posts: 159
Website

Re: Private Messaging System 1.2.x 1.2.2

Is there a way to restrict PM usage down to a member level?
At our production site, we have a few members who have been (lets put it this way, doing things that are wrong, but not quite against forum rules).
We would like to stop a few members from using the ability to use Private Messaging? Is that possible?


Ron

30+ years with Big Blue  Main Frames and Personal Computers - And Still learning every day!

Offline

 

#367 2007-12-19 20:17:08

nifty-stuff.com
Member
Registered: 2006-12-09
Posts: 59
Website

Re: Private Messaging System 1.2.x 1.2.2

Ron, can you create a new user group and give that group no PM access then assign those members to that group?   The only concern would be them wondering why they are in a "special" group.

One thing I'd like to do is remove PM completely for me, the admin.   I get PMs for everything under the sun and would love to remove the ability to PM me.

Offline

 

#368 2007-12-20 03:51:27

dilauro
Member
From: New Milford, CT
Registered: 2007-09-06
Posts: 159
Website

Re: Private Messaging System 1.2.x 1.2.2

Thanks, I set that up on my own home system to demonsrate how that works.  We are thinkng about usign that


Ron

30+ years with Big Blue  Main Frames and Personal Computers - And Still learning every day!

Offline

 

#369 2007-12-25 13:07:51

ssdt
Member
Registered: 2007-12-19
Posts: 21
Website

Re: Private Messaging System 1.2.x 1.2.2

Mine is 1.2.15. will this work on that?

Offline

 

#370 2007-12-25 14:05:37

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Private Messaging System 1.2.x 1.2.2

Yes. But be sure to use 1.2.3


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#371 2007-12-27 18:53:48

ssdt
Member
Registered: 2007-12-19
Posts: 21
Website

Re: Private Messaging System 1.2.x 1.2.2

Thanks

Offline

 

#372 2008-01-04 21:04:44

Hob Bramble
Member
Registered: 2007-03-31
Posts: 57
Website

Re: Private Messaging System 1.2.x 1.2.2

Try not to double post, Nabila - you only need to ask once. I'll try to help you at your other post:
http://www.punres.net/viewtopic.php?id=4325


-Master Hob Bramble of Willowbottom

Those people who think they know everything are a great annoyance to those of us who do.
Perpetual Thursday | Alternative-Internet.com | hobbramble.deviantart.com

Offline

 

#373 2008-02-14 12:27:41

ssdt
Member
Registered: 2007-12-19
Posts: 21
Website

Re: Private Messaging System 1.2.x 1.2.2

I tried but I can't install it. There is a new plugin in my admin for the pm. But when I install everything, the page is blank. The index and all the pages doesn't show anything.

Offline

 

#374 2008-02-21 22:17:12

dilauro
Member
From: New Milford, CT
Registered: 2007-09-06
Posts: 159
Website

Re: Private Messaging System 1.2.x 1.2.2

This may have been asked before, but....
Is there a way to send a PM to multiple people?


Ron

30+ years with Big Blue  Main Frames and Personal Computers - And Still learning every day!

Offline

 

#375 2008-04-25 16:20:19

Ememone
Member
Registered: 2008-03-16
Posts: 18

Re: Private Messaging System 1.2.x 1.2.2

When I click "Delete multiple messages" I must checked lot of checkboxes and after click DELETE. It is possible to insert anywhere a BUTTON "check all" - and all checkboxes will be checked ??

I think - this is a good idea. Help!

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.