PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2009-06-07 11:43:45

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Private Messaging mod folders add-on 1.0

Code:

##
##        Mod title:  Private Messaging mod folders add-on
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.*
##     Release date:  2009-06-07
##           Author:  Koos (pampoen10@yahoo.com)
##
##      Description:  Allows users to create pm folders and receive e-mail
##                    notifications of new pm's received.
##
##   Affected files:  message_delete.php
##                    message_list.php
##                    message_send.php
##                    include/pms/footer_links.php
##                    include/pms/functions_navlinks.php
##                    include/pms/header_new_messages.php
##                    include/pms/profile_delete.php
##                    include/pms/profile_send.php
##                    include/pms/viewtopic_PM-link.php
##                    lang/English/pms.php
##                    plugins/AP_Private_messaging.php
##
##       Affects DB:  New table:
##                       'messages_folders'
##                    New column in 'messages' table:
##                       'folder_id'
##                    New column in 'groups' table:
##                       'g_pm_folders_limit'
##                    New column in 'users' table:
##                       'email_pm'
##                    New option in 'config' table:
##                       'o_pms_email'
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

Offline

 

#2 2009-06-07 11:44:30

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

I have finally finished the folders add-on I have been working on for the Private Messaging mod.

Here are some of the features:

(1)Includes all the fixes made in Private Messaging System 1.2.4c.

(2)Adds a 'Manage folders' link in footer, allowing users to create, sort, rename and delete pm folders.

(3)Allows users to receive e-mail notification of new private messages received. This feature can be enabled/disabled by the user. (Enabled by default for all users)

(4)Can move multiple messages at once (multimove).

(5)Now possible to select all messages on a page with a single click, when doing a multidelete or multimove.

(6)Admin can set a 'folders limit' for each user group in admin cp - which is the number of folders users in a user group are allowed to add.

(7)Compatible with PostgreSQL, MySQL and SQLite databases.

(8)Very easy and quick to install/uninstall


Note: this is an add-on. If you have not yet install the Private Messaging mod, make sure to install the latest version first before installing this add-on.

Last edited by Koos (2009-07-06 15:33:58)

Offline

 

#3 2009-06-10 07:02:23

doki
Member
Registered: 2007-04-30
Posts: 149

Re: Private Messaging mod folders add-on 1.0

Wow another great mod!!! Thanks koos...

By the way i'm not sure if it is a bug. When i click move multiple messages, i can see the check boxes(no problem in here) but if i click page 2, the check box is missing. i have to click the "move multiple message" to show the check box on page 2 and so on...

Last edited by doki (2009-06-10 07:04:09)

Offline

 

#4 2009-06-10 13:07:18

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

That's actually how it's supposed to work. You will notice that multidelete works in the same way.

Offline

 

#5 2009-06-10 14:51:34

joe.banana
Member
From: ph
Registered: 2009-05-15
Posts: 30
Website

Re: Private Messaging mod folders add-on 1.0

very nice add on just tried it out.. works great!

hope the email notification is with the private messaging mod instead of an addon though.

But thanks a lot for the hardwork Koos..

Offline

 

#6 2009-07-06 15:02:52

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

Private Messaging mod folders add-on 1.0.1 now available for download.

Had to fix some bugs and security issues. Now also compatible with fluxbb 1.4.

Offline

 

#7 2009-07-07 14:21:34

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

Private Messaging mod folders add-on 1.0.2 now available for download.

There was a bug in the e-mail notification system I had to fix. Thanks to bgiddins for spotting this.

Offline

 

#8 2009-07-09 21:27:27

doki
Member
Registered: 2007-04-30
Posts: 149

Re: Private Messaging mod folders add-on 1.0

hi koos, its possible to add auto PM on register? like a welcome message?

Offline

 

#9 2009-07-23 13:36:51

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

Try the following:

Code:

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

register.php


#
#---------[ 2. FIND ]---------------------------------------------
#

$new_uid = $db->insert_id();


#
#---------[ 3. AFTER, ADD ]---------------------------------------------------
#

    $subject = 'Welcome';
    $message = 'Welcome to forum message.';

    // Get admin username
    $result = $db->query('SELECT username FROM '.$db->prefix.'users WHERE id=2') or error('Unable to get username', __FILE__, __LINE__, $db->error());
    $admin_username = $db->result($result);

    // "Send" message
    $db->query('INSERT INTO '.$db->prefix.'messages (owner, subject, message, sender, sender_id, sender_ip, smileys, showed, status, posted) VALUES(
            '.$new_uid.',
            \''.$db->escape($subject).'\',
            \''.$db->escape($message).'\',
            \''.$admin_username.'\',
            \'2\',
            \''.''.'\',
            \'1\',
            \'0\',
            \'0\',
            \''.time().'\'
        )') or error('Unable to send message', __FILE__, __LINE__, $db->error());

Last edited by Koos (2010-02-16 05:27:50)

Offline

 

#10 2009-07-29 14:56:57

RexRon
Member
From: Norway
Registered: 2007-09-16
Posts: 71
Website

Re: Private Messaging mod folders add-on 1.0

Hello.

Installed the mod. Thanks for your great work...

On my site I have some menu boxes on the left. My Forum

When I go to Manage folders page these boxes dissapear. How can I get these boxes included?

Sincerely
RexRon

PS. Sent you the Norwegian Language file...

Last edited by RexRon (2009-07-29 14:57:18)


Sincerely RexRon
_______________________________________________________________________________________
Only two things are infinate. The universe and human stupidety and I´m not sure about the universe.
Albert Einstein

Offline

 

#11 2009-07-30 13:07:14

RexRon
Member
From: Norway
Registered: 2007-09-16
Posts: 71
Website

Re: Private Messaging mod folders add-on 1.0

Hello again.

Here are two screenshots that may help explaining my previous post.
In the first pic you see the boxes to the left. They are there for all the pages exept Folder Manager as shown in the second pic.
Cannot for the life of me remember how I got those boxes in the first place.

Please help anyone....


Pic 1
http://www.eterya.com/Privat/Untitled-11.jpg

Pic 2
http://www.eterya.com/Privat/Untitled-22.jpg


Sincerely RexRon
_______________________________________________________________________________________
Only two things are infinate. The universe and human stupidety and I´m not sure about the universe.
Albert Einstein

Offline

 

#12 2009-08-01 06:39:38

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

RexRon wrote:

Cannot for the life of me remember how I got those boxes in the first place.

Open message_list.php, and apply the same code that generates those boxes for all instance where you call the generate_pms_menu() function in the 'Manage folders' section of the file.

Offline

 

#13 2009-08-01 10:11:56

RexRon
Member
From: Norway
Registered: 2007-09-16
Posts: 71
Website

Re: Private Messaging mod folders add-on 1.0

Yes. I tryed looking for something like that. Ivé been looking through other files as well to find what generats those boxes but with no luck. If I remember correctly it is a mod.
Allso I should say that I have not edited message_list.php. Just uploaded it.
I believe it has something to do with include/common.php or something like that but I am not a programmer smile The funny thing is that most of message_list.php includes the boxes while some of it doesn´t.


Sincerely RexRon
_______________________________________________________________________________________
Only two things are infinate. The universe and human stupidety and I´m not sure about the universe.
Albert Einstein

Offline

 

#14 2009-08-02 03:03:08

Koos
Member
Registered: 2007-01-14
Posts: 336
Website

Re: Private Messaging mod folders add-on 1.0

If you e-mail me your forum files (in a zip archive file) I'll try to get it working for you.

Offline

 

#15 2010-02-18 12:00:56

Multitasker
New member
Registered: 2009-07-14
Posts: 3

Re: Private Messaging mod folders add-on 1.0

I have some trouble with this addon.
Everything works fine, but create folders wont work.

I get the HTTP_REFERER error and it tells me to edit the Base URL in the database.

But the thing is that the Base URL is correct, and i cannot find in the files/code where the h*ll its checking this?

Any solution or thing i can try to get it to work?

Offline

 

#16 2010-02-18 21:34:18

scalemaster
New member
From: Russia, Balakovo
Registered: 2010-01-18
Posts: 1

Re: Private Messaging mod folders add-on 1.0

Look at URL-bar of your browser. There are may be symbols, which not be provided.

Last edited by scalemaster (2010-02-18 21:36:43)

Offline

 

#17 2010-02-19 00:50:31

Multitasker
New member
Registered: 2009-07-14
Posts: 3

Re: Private Messaging mod folders add-on 1.0

My Base-URL are: http://www.domain.xx/forum

URL to manage folders: http://www.domain.xx/forum/message_list … w=foldercp

When i click on "add folder" it goes to: http://www.domain.xx/forum/message_list.php?action=foo

Edit: Its the foo that gives bad referrer, same problem in the administration
Admin works after i deleted the "lazy referer check", is there any similar check on message_list i just can delete do get rid of the problem ?

Edit 2
I deleted referrer check in functions.php , and it all works.

Then i tried to replace that ref-check with this code.

function confirm_referrer($script)
{
    global $pun_config, $lang_common;

    dump('"'.$pun_config['o_base_url'].'/'.$script.'"', '"'.$_SERVER['HTTP_REFERER'].'"');
}

Im not 1337 on PHP, but what i can understand this code puts out o_base_url from the config, and what the server gave as referrer?

Anyways, i get this

"http://www.domain.xx/forum/message_list.php"

""

Is my problem related to that the server/forum does not "give" a referrer ?
Maybe this is not related to this addon

Last edited by Multitasker (2010-02-19 01:50:37)

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.