Mod Name / Version: Email PM Hack v1.0.3 Description: This will allow users to email their PM's to their email address on file. Working under: UBB.threads 6.0.2 Any pre-requisites: None Author(s): written by JustDave, converted to v6 by Astaran, converted to v6.0.2 by Lisa_P Credits: Not sure, this one was around before I found you guys! Files Altered: (3) /languages/english/generic.php; /templates/viewmessages.tmpl; delete.php Database Altered: No New Files: none
If you're still waiting, I forgot something! We get the emails immediately. I was afraid of this, because it took so long for me to get it right. Lemme look . . . .
Great job on this. I only had a couple of suggestions:
In viewmessages.tmpl, change this:
code:{$ubbt_lang['TEXT_DELETE']}
To this:
code:{$ubbt_lang['TEXT_SELECT']}
Then, in generic.php, add the following line:
code:$ubbt_lang['TEXT_SELECT'] = "Select";
After this:
code:$ubbt_lang['PM_EMAIL'] = "Email PM";
What this will do is to change the column header from "Delete" to "Select". I think this helps to avoid confusion since users might not figure out that they need to check the "Delete" box in order to email messages to themselves. Changing it to "Select" still works for the "Delete Checked" button, so it shouldn't be confusing at all.
I figured it out (worked for me anyway). In the viewmessages.tmpl file, the "Delete Checked" button is named "option", so in the delete.php, instead of inserting:
if ($deletecheck == "{$ubbt_lang['DELETE_CHECKED']}")
it should be: if ($option == "{$ubbt_lang['DELETE_CHECKED']}")
I installed this hack last night but did not work at all. Following the posts of this thread I managed to make it delete messages (as it used to) but not to send emails.
Following the logic of the problem, I think I found a possible solution (which works very well for me).
In the delete.php the logic applied by the hack is to check if any of the checkboxes are checked and then delete the messages and after that email them.
I moved the emailing code which starts with:
code: // ---------------------------------------------------------------------------- // If they chose "Email PM" then we email the message instead of deleting it
if ($pmemail == "{$ubbt_lang['PM_EMAIL']}") {
in the instructions just below the line ~39
code: $Total=0;
and after that block of code I changed the:
code: if ($deletecheck == "{$ubbt_lang['DELETE_CHECKED']}")
This way once you select messages and click on the Email PM button, the messages will be sent to you via email (provided that you have completed the rest of the steps outlined in the instructions of this hack).
Once you return back to the messages screen you will have to select back the ones you emailed and click delete to delete them.
This is a feature that I wanted for my users. If you want to select messages and by clicking Email PM them to be emailed and deleted you need to first change the:
code: $ubbt_lang['PM_EMAIL'] = "Email PM";
to
code: $ubbt_lang['PM_EMAIL'] = "Email and Delete checked";
If you have it, do it I haven't started working on it and have several hacks to convert to 6.2 Maybe i get my forum-management for moderators before a new version is released this time. ;-)
I'm working on allowing for sending the pm's in html based on the user's prefs. Have a glitch with the same pm being looped in a number of times. Working on it now.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.