![]() |
OK, I wrote this hack seeing as my users were nagging about it and I could not find one here (if there is one, I apologise - please give me the URL).
This works exactly like post preview: http://www.atlasf1.com/personal/bira/privmsgpreview.gif How to install: Open private.php 1) First we need to move "newmessage" after "dosend". Highlight the entire section between: Code:
// ############################### start new message ############################### Code:
// ############################### start send message ############################### Cut this entire section (a total of 83 lines in 2.2.1) and paste it right above: Code:
// ############################### start do stuff (move, etc) ############################### a) Find: Code:
$savecopy=iif($savecopy=="yes",1,0); Code:
Code:
if ($pmquota>0 and $touserinfo[usergroupid] != 6 and $bbuserinfo[usergroupid] != 6) { Code:
Code:
} #end dosend Code:
Code:
//show new message form Code:
Code:
if ($bbuserinfo[userid]!=0 and !$previewpost and $bbuserinfo[signature]!="") { Code:
Code:
// /enhanced Code:
g) Find: Code:
// enhanced Code:
// enhanced Save private.php and upload to server. In the Administration control panel -> Templates 1) ADD template priv_sendpreview and insert to it: Code:
2) Open template priv_sendprivmsg a) place $postpreview where you want the message preview to appear (normally would be under $cpnav). b) Find: Code:
<textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="3">$message[message]</textarea> Code:
<textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="3"> $privmessage</textarea> Code:
<input type="checkbox" name="parseurl" value="yes" checked> Code:
<input type="checkbox" name="parseurl" value="yes" $parseurlchecked> Code:
<input type="checkbox" name="savecopy" value="yes" checked> Code:
<input type="checkbox" name="savecopy" value="yes" $savecopychecked> Code:
<input type="submit" class="bginput" name="submit" value="Send Message" accesskey="s" tabindex="4"> Code:
<input type="submit" class="bginput" name="submit" value="Send Message" accesskey="s" tabindex="4"> 3) Open template priv_requestreceipt Find: Code:
<input type="checkbox" name="pmreceipt" value="yes" checked> Code:
<input type="checkbox" name="pmreceipt" value="yes" $pmreceiptchecked> Comments and additions welcome. Cheers, Bira |
Sorry, forgot to attack the instructions in a txt file as well (the same instructions as posted above).
|
bira, in the attached text file, you left a [/code] in. :o
It's in this part: PHP Code:
|
:o
fixed, thanks |
Not that I think anyone managed to install this hack so fast, but just in case - I made the following change to the above hack installation instructions:
In the private.php: Quote:
|
[QUOTE]Originally posted by bira
Not that I think anyone managed to install this hack so fast, but just in case... |
Thanks :)
|
If you haven't installed the hack, ignore this message -- the installation instructions in the first thread and the downloadable attachment txt file have been modified.
I've had a bug on my BB after installing this hack, so if anyone who installed this hack experiences the same problem, here's the fix: Problem: even if you select the option to "request read receipt", the PM doesn't appear in the message tracking page. Fix: in private.php find: Code:
// enhanced Code:
// enhanced |
After reading your message, I tested, and found I had the same problem. Your fix works fine. But I have to wonder, since it looks like this isn't part of your hack code, but rather part of the original code...does this fix have any other side effects?
|
JJR512 it shouldn't.
There is no difference as far as the private.php script goes between $pmreceipt=="yes" and just $pmreceipt not NULL. For some reason, the preview hack alters the "yes". But it's still either NULL (empty) or not (has value). So, the original code does: Code:
if ($pmreceipt=="yes") { Code:
if ($pmrecepit) { //does $pmreceipt have a value? Cheers, Bira |
All times are GMT. The time now is 06:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|