Version: 1.3, by sv1cec
Developer Last Online: Mar 2022
Version: 3.0.7
Rating:
Released: 05-10-2005
Last Update: 05-17-2005
Installs: 5
No support by the author.
Well, this one was born, when I wanted to PM a user, and quoted a post he had made in my forums, in the PM.
Well, I could copy and paste, and then insert the quote tags, but instead, I did some code tweaking and here you go.
This hack will create a new menu item, in the drop-down menu which is shown when you click on a user's name in the postbit. When you click on that menu item, you will be taken to the PM form, with the Recipient field, filled with the poster, the title field filled with the original thread's title and in the message box, you will have the text of the post as a quote.
Also, it will add a small icon, in the first postbit line, which when clicked will redirect you to the new PM form, with only the text from the selected post, quoted. You are now free to enter any recipients you want. Thanks to Amykhar for this, more generic version.
Remember to save the third image below in your disk and then upload it in the images/buttons directory in your server.
Easy mod, just two edits.
Version 1.0
Initial version with only PM functionality, called from the user drop-down menu and sending the PM to the user who posted the post.
Version 1.1
More generic version, which allowed to send a PM with a quote of a post, to any member of your forums, via the small icon on the top of each postbit.
Version 1.2
This version added the same functionality as the one described above, but using an email instead of a PM. Users who want to upgrade, just scroll down in the installation instructions, until you find the section dealing with the email. Remember to save the fourth image below in your disk and then upload it in the images/buttons directory in your server, if you want to use the email functionality.
Version 1.3 (current)
One thing I didn't like about the way this hack worked, was that upon sending the PM or the email, it didn't return you to the post you were, when you started it. So I did some small changes to implement that functionality. Now, after the PM or the email is send, you are returned to the post you were before.
For a new installation, just follow the instructions in the txt file. For upgrading here is what you have to do:
1. Open your private.php file and find:
PHP Code:
// change for pm with post quote
if ($_REQUEST['postid'])
{
$text = $DB_site->query_first("
SELECT pst.threadid, thrd.title, pst.pagetext
FROM " . TABLE_PREFIX . "post AS pst
LEFT JOIN " . TABLE_PREFIX . "thread AS thrd ON(thrd.threadid = pst.threadid)
WHERE pst.postid=" . intval($_REQUEST['postid']) . "
");
if ($_REQUEST['stripquote'])
{
$pagetext = strip_quotes($text['pagetext']);
}
else
{
$pagetext = $text['pagetext'];
}
$pagetext = trim(htmlspecialchars_uni($pagetext));
This is code you added, when you installed the hack. Below that, add:
PHP Code:
$return_url="showthread.php?p=$_REQUEST[postid]";
In the same file find:
PHP Code:
// ############################### start insert pm ###############################
// either insert a pm into the database, or process the preview and fall back to newpm
if ($_POST['do'] == 'insertpm')
{
// get an array of incoming data
$pm = &$_POST;