• Welcome to Simple Machines Community Forum. Please login or sign up.
January 20, 2022, 12:58:53 AM

News:

Wondering if this will always be free?  See why free is better.


Move Personal Messages

Started by floydpink, February 24, 2009, 12:34:41 AM

Previous topic - Next topic

floydpink

February 24, 2009, 12:34:41 AM Last Edit: February 24, 2009, 01:30:10 AM by floydpink
The way labels work for Personal Messages is really annoying as it takes so many clicks to move a message from the inbox to a sub-folder, is very easy to delete messages by mistake and can easily result in a very cluttered inbox.

This code moves the message to the sub-folder/inbox rather than just assigning labels.
sources/personal.message.php
Find: elseif ($label_type[$row['ID_PM']] !== 'rem')
$labels[] = $to_label[$row['ID_PM']];

Replace with: elseif ($label_type[$row['ID_PM']] !== 'rem')
{
$labels[] = $to_label[$row['ID_PM']];
// Floydpink INSERT - Remove existing label so that message is moved rather than copied
unset($labels[0]);
}


themes/default/languages/PersonalMessage.english.php
Find:$txt['pm_msg_label_title'] = 'Label Message';
$txt['pm_msg_label_apply'] = 'Add Label';
$txt['pm_msg_label_remove'] = 'Remove Label';

Replace with:
$txt['pm_msg_label_title'] = 'Move Message';
$txt['pm_msg_label_apply'] = 'Move to';
$txt['pm_msg_label_remove'] = 'Current Folder';


Find: $txt['pm_sel_label_title'] = 'Label Selected';


Replace with:$txt['pm_sel_label_title'] = 'Move Selected';


Find:$txt['pm_manage_labels'] = 'Manage Labels';
$txt['pm_labels_delete'] = 'Are you sure you wish to delete the selected labels?';
$txt['pm_labels_desc'] = 'From here you can add, edit and delete the labels used in your personal message center.';
$txt['pm_label_add_new'] = 'Add New Label';
$txt['pm_label_name'] = 'Label Name';
$txt['pm_labels_no_exist'] = 'You currently have no labels setup!';


Replace with:$txt['pm_manage_labels'] = 'Manage Folders';
$txt['pm_labels_delete'] = 'Are you sure you wish to delete the selected folders?';
$txt['pm_labels_desc'] = 'From here you can add, edit and delete the folders used in your personal message center.';
$txt['pm_label_add_new'] = 'Add New Folder';
$txt['pm_label_name'] = 'Folder Name';
$txt['pm_labels_no_exist'] = 'You currently have no folders setup!';


Find:$txt['pm_labels'] = 'Labels';


Replace with:$txt['pm_labels'] = 'Folders';


Find:$txt['pm_search_choose_label'] = 'Choose labels to search by, or search all';


Replace with:$txt['pm_search_choose_label'] = 'Choose folders to search by, or search all';

gbsothere

June 27, 2009, 10:04:58 PM #1 Last Edit: June 27, 2009, 10:12:10 PM by gbsothere
Forgive me for posting on this thread, but I feel that if I start a new one, I will be asked to post here, anyway, as this seems to be the relevant thread.    :)

Is there any way this code could be modified so that messages in the Outbox could be sorted by labeling, as well?   Right now, no pull-down for labeling appears when I am in the Outbox but for the Inbox, only.  As the admin of my forum, I find it difficult to locate things I've sent over time that would address similar poster concerns, that could just be copied and resent, saving me a bit of time.


Thanks so much.
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

gbsothere

*hopeful bump*

(Hope springs eternal.)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

floydpink

The above code tweaks SMF's existing functionality.
Your excellent suggestion of PM Templates or the ability to sub-categorise is completely new functionality needing much bigger changes to SMF.
The way I work around it is to send a template to myself and then move the received PM into a 'Templates' folder.

live627

How did you make he drop down boxes? Custom code?

Arantor

You know that items being removed from inbox when being given another label is an option in SMF already right? (I use that here all the time)
No good deed goes unpunished
All helpful urges should be circumvented

Advertisement: