[DISC] Advanced Private Messages - beta 0.0.7 (on hold)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

Backup up your files and database. If something goes wrong, restore the original files and database. That goes without saying for any mod.


It does go without saying, and that is not what I was asking. That method doesn't revert PMs sent after the mod was installed. I have no issues with uninstalling the mod, but I don't want to lose PMs if we need to revert.

I see that the script to migrate exists, I was just wndering if the script to uninstall exists or if I'll have to do it myself if we need to uninstall.

-JEEP

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

  • Delete rule on edit page
    I think it is, but anyway if missing it is not hard to add,
  • Word filter on title only
    As titles are of poor use for most of the users, I'm not sure it will bring anything. Actually this ability was present in the first stages of dev, and removed,
  • Apply new rule to box
    Synchornise a box is already planed as a feature to add,
  • Moving subfolders
    A sub-folder moving from one box to another won't be able to keep the same messages natures (an inbox message can't be transfered to an un-sended message). That's why you are asking to first clear the sub-folder before moving it,
  • Rules question: Do they work on the savebox?
    That won't make a lot of sense : to save a message, you have to choose it and point where you want to move it. I may consider it if I introduce an automated archiving process based on rules,
  • Mark/UnMark all
    Where you can manipulate a whole set of messages, there is one checkbox in the title row to allow this. Where it makes no sense to select whole a folder, there is not. BTW, this is only a templating issue, not a script one.
  • is there an uninstall script to move the PMs back to the default tables
    Not yet, but it is a really easy one to wrote : it may appears for the final, or to upgrade process to next versions of phpBB if required. BTW, don't use the mod on a live board, it is a beta version, not a released one.

jeep
Registered User
Posts: 93
Joined: Mon May 19, 2003 8:57 pm

Post by jeep »

Thank you for the answers.
Ptirhiik - RPGnet-fr wrote: [*]Delete rule on edit page
I think it is, but anyway if missing it is not hard to add,


Excellent. It's in the page where you edit the rule itself, but not on the page where you can copy it... Or if it is, I didn't find it.
[*]Word filter on title only
I'm not sure it will bring anything.


It's highly desirable on my board, so I may look at it to see if I can add it myself.
[*]Rules question: Do they work on the savebox?
That won't make a lot of sense ...


This was mostly with respect to the request for the feature to apply a rule to an existing folder. In that case, it would make sense.
BTW, don't use the mod on a live board, it is a beta version, not a released one.


The Test board is virtually live... Otherwise, we couldn't thorooughly test features. After my testing, I had planned on using it on the live board if I found no security issues/major bugs. It's not like the site generates revenue or anything. However, people get touchy about their PMs for some reason, so I wanted to be able to roll back.

If it works on the test site for a couple weeks, I'm ready to accept the risk of using Beta code because it is highly desired. I take full responsibility if there are any problems, of course.

-JEEP

User avatar
Dio2
Registered User
Posts: 94
Joined: Sun Jun 15, 2003 5:02 pm

Post by Dio2 »

Anyone who wants to do it, until the next release if you want to remove the PM link on the Home panel rename

profilcp/profilcp_home_privmsga.php

to
profilcp/xxx_profilcp_home_privmsga.php

This will not affect the the PM Tab

sunlord
Registered User
Posts: 66
Joined: Wed Jan 16, 2002 5:28 am

Post by sunlord »

I've got your Categories hierarchy mod installed so i can't install this mod...

It's looking for this

Code: Select all

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr>
		<td align="left"><span  class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
		<!-- BEGIN switch_not_privmsg -->
		-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
		<!-- END switch_not_privmsg -->
	</tr>
</table>
but with Categories hierarchy it looks like this

Code: Select all

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr> 
		<td align="left"><span  class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
		<!-- BEGIN switch_not_privmsg --> 
		{NAV_CAT_DESC}
		<!-- END switch_not_privmsg -->
		</span></td>
	</tr>[/code)

How should i go about fixing this? 

source
Registered User
Posts: 119
Joined: Fri Sep 26, 2003 2:00 am

Post by source »

see later post
Last edited by source on Thu May 27, 2004 4:13 am, edited 1 time in total.

source
Registered User
Posts: 119
Joined: Fri Sep 26, 2003 2:00 am

Post by source »

bleh, now I have to make this code check the user_notify preference....it's emailing on all pms regardless of user preference.

Evito
Registered User
Posts: 53
Joined: Thu Mar 11, 2004 10:13 am

Post by Evito »

source wrote:

Code: Select all

$main_pgm = defined('ADMIN_FOUNDER') ? "./profile.$phpEx?mode=privmsg" : "./privmsga.$phpEx?";
should be

Code: Select all

$main_pgm = defined('ADMIN_FOUNDER') ? "./profile.$phpEx?mode=privmsg" : "privmsga.$phpEx?";
in

Code: Select all

#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : avanced privmsg -------------------------------------------------------------------------
//-- add
$mode = htmlspecialchars($HTTP_GET_VARS['mode']);
if ($mode == 'read')
{
	$mode = 'view';
}
$user_id = intval($HTTP_GET_VARS[POST_USERS_URL]);
$privmsg_id = intval($HTTP_GET_VARS[POST_POST_URL]);
$main_pgm = defined('ADMIN_FOUNDER') ? "./profile.$phpEx?mode=privmsg" : "./privmsga.$phpEx?";
if ( empty($user_id) )
{
	redirect(append_sid("$main_pgm&pmmode=$mode&" . POST_POST_URL . "=$privmsg_id"));
}
else
{
	redirect(append_sid("$main_pgm&pmmode=$mode&tousers=$user_id&" . POST_POST_URL . "=$privmsg_id"));
}
//-- fin mod : avanced privmsg ---------------------------------------------------------------------


What file is this and what is going wrong due to the error?

Issues I've come up with:
The known issue about the PM-notification
The home PCP home panel doesn't redirect users properly to their private message when they click the link (probably some definition of $main_pgm missing)
Pagination doesn't seem to work with private messages, although I must admit I have installed a pagination mod, that creates a combobox (aka jumpbox or dropdownlist) for pagination, so I'm not really sure if it's due to me or due to the apm.

Evito
Registered User
Posts: 53
Joined: Thu Mar 11, 2004 10:13 am

Post by Evito »

Btw, what I find somewhat annoying, when having sent a private message, the message box you get lets you go back to either Outbox or Forum Index. I'd rather have that made Inbox...was it ment to be outbox or is it a bug?

Evito
Registered User
Posts: 53
Joined: Thu Mar 11, 2004 10:13 am

Post by Evito »

Also, when replying it keeps stacking "Re:"'s, which is not so very charming...

source
Registered User
Posts: 119
Joined: Fri Sep 26, 2003 2:00 am

Post by source »

In privmsg.php, change this

Code: Select all

$main_pgm = defined('ADMIN_FOUNDER') ? "./profile.$phpEx?mode=privmsg" : "./privmsga.$phpEx?";
to

Code: Select all

$main_pgm = defined('ADMIN_FOUNDER') ? "./profile.$phpEx?mode=privmsg" : "privmsga.$phpEx";
and

Code: Select all

redirect(append_sid("$main_pgm&pmmode=$mode&" . POST_POST_URL . "=$privmsg_id"));
}
else
{
	redirect(append_sid("$main_pgm&pmmode=$mode&tousers=$user_id&" . POST_POST_URL . "=$privmsg_id"));
to

Code: Select all

redirect(append_sid("$main_pgm?pmmode=$mode&" . POST_POST_URL . "=$privmsg_id"));
}
else
{
	redirect(append_sid("$main_pgm?pmmode=$mode&tousers=$user_id&" . POST_POST_URL . "=$privmsg_id"));
to fix two errors in this mod. If you have a pm popup box and click on it, it will spawn a new window if you don't. It also fixes the extra ./ in the url which has been giving some people a 404 error.

source
Registered User
Posts: 119
Joined: Fri Sep 26, 2003 2:00 am

Post by source »

use the following fix to make this mod check the user's preferences as to whether they want to be notified via email of new pms:

source
Registered User
Posts: 119
Joined: Fri Sep 26, 2003 2:00 am

Post by source »

in /includes/functions_messages.php
replace:

Code: Select all

// read the mail recipients
	$sql = "SELECT user_id, user_email, user_lang, username
				FROM " . USERS_TABLE . "
				WHERE user_id IN ($s_to_user_ids)
					AND user_id NOT IN (0, " . ANONYMOUS . ")
					AND $sql_where";
	if ( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, 'Could not read recipient mail list', '', __LINE__, __FILE__, $sql);
	}
	$count = 0;
	$bcc_list_ary = array();
	while ( $row = $db->sql_fetchrow($result) )
	{
		$count++;
		$bcc_list_ary[$row['user_lang']][] = array('user_id' => $row['user_id'], 'mail' => $row['user_email'], 'username' => $row['username']);
	}

	if ( $count > 0 )
	{
		// read the message recipients
with

Code: Select all

// read the mail recipients
     $sql = "SELECT user_id, user_email, user_lang, username, user_notify_pm 
                    FROM " . USERS_TABLE . "
                    WHERE user_id IN ($s_to_user_ids)
                         AND user_id NOT IN (0, " . ANONYMOUS . ")
                         AND $sql_where";
     if ( !$result = $db->sql_query($sql) )
     {
          message_die(GENERAL_ERROR, 'Could not read recipient mail list', '', __LINE__, __FILE__, $sql);
     }
     $count = 0;
     $bcc_list_ary = array();
   while ( $row = $db->sql_fetchrow($result) )
     {
       if(1 != $row['user_notify_pm']) //Check whether the row of user_notify_pm is *checked*. If NOT checked, return.   
                  return '';
        $count++;
          $bcc_list_ary[$row['user_lang']][] = array('user_id' => $row['user_id'], 'mail' => $row['user_email'], 'username' => $row['username']);
     }

	if ( $count > 0 )
	{
		// read the message recipients
Last edited by source on Fri May 28, 2004 1:09 pm, edited 1 time in total.

odie3
Registered User
Posts: 145
Joined: Thu Mar 04, 2004 6:48 pm
Location: Kyle USA
Contact:

Post by odie3 »

I did both of your fixes above. However, when I click on the PM link in the title bar it takes me to my "Home Panel" not to the Private Messages area.

When I get a PM the pop-up box does not have the PM-POP up message but is Profile Panel - "Home Panel".




I am checking for what I did wrong but I do not see it as of yet.

odie3
Registered User
Posts: 145
Joined: Thu Mar 04, 2004 6:48 pm
Location: Kyle USA
Contact:

Post by odie3 »

source wrote: use the following fix to make this mod check the user's preferences as to whether they want to be notified via email of new pms:


I am also having a different issue with PM and Email being sent. When ever a non-Admin sends me a PM (which is always I am the only Admin) I do not get a email saying there is a new PM. Might you know the cause of that?

Locked

Return to “[2.0.x] MODs in Development”