Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Preview Private Message Before Sending Details »
Preview Private Message Before Sending
Mod Version: 1.00, by bira (Member) bira is offline
Developer Last Online: Jun 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (1 vote - 5.00 average) Installs: 31
Released: 26 Nov 2001 Last Update: Never Downloads: 2
Not Supported  

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:



How to install:

Open private.php

1) First we need to move "newmessage" after "dosend". Highlight the entire section between:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Until (but not including):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Cut this entire section (a total of 83 lines in 2.2.1) and paste it right above:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2) Now we need to insert the following code:

a) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right under it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

b) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right above it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

c) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right above it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

d) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right under it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

e) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right under it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

f) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right above it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


g) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (the code to remove is marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Save private.php and upload to server.


In the Administration control panel -> Templates

1) ADD template priv_sendpreview and insert to it:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(you may edit this to your liking).

2) Open template priv_sendprivmsg

a) place $postpreview where you want the message preview to appear (normally would be under $cpnav).

b) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (change marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

c) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (change marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

d) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (change marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

e) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (change marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


3) Open template priv_requestreceipt

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace it with (change marked in red):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That's it!

Comments and additions welcome.

Cheers,

Bira

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Private Messages Enhancements Prevent members sending private message to others abus3d vBulletin 3.7 Add-ons 27 18 Jul 2009 08:35
Private Messages Enhancements Can't Use Private Message Before X posts and Before X days Atakan KOC Modification Graveyard 14 13 Feb 2007 18:50

Comments
  #2  
Old 26 Nov 2001, 04:39
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Sorry, forgot to attack the instructions in a txt file as well (the same instructions as posted above).
Attached Files
File Type: txt previewprivmsg.txt (5.2 KB, 348 views)

Last edited by bira; 27 Nov 2001 at 20:00.
Reply With Quote
  #3  
Old 26 Nov 2001, 04:55
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
bira, in the attached text file, you left a [/code] in.

It's in this part:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #4  
Old 26 Nov 2001, 04:59
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001


fixed, thanks
Reply With Quote
  #5  
Old 26 Nov 2001, 05:12
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
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:

f) Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Right above it insert:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
And, in editing template priv_sendprivmsg please remove $message[message] from the textarea code.
Reply With Quote
  #6  
Old 26 Nov 2001, 05:21
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
Originally posted by bira
Not that I think anyone managed to install this hack so fast, but just in case...
Yeah, actually I did...and I was just about to post my problems, like the extra space showing up in the textarea and the first character repeating... But just the very instant before I could switch back here, I got the new email alert sound, saw it was a reply notice for this thread, and sure enough, your fixes fixed the minor problems I was having. Excellent timing! (And great hack, BTW.)
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #7  
Old 26 Nov 2001, 05:24
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Thanks
Reply With Quote
  #8  
Old 27 Nov 2001, 17:45
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace with:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(the part removed is coloured in red in the original code).

Last edited by bira; 27 Nov 2001 at 20:05.
Reply With Quote
  #9  
Old 27 Nov 2001, 17:55
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
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?
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #10  
Old 27 Nov 2001, 18:51
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

My fix does:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Hope I;m clear

Cheers,

Bira
Reply With Quote
  #11  
Old 27 Nov 2001, 19:00
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
A-ha!!!!

Silly me, I found the culprit :blush:

In the hack details, I have the following code added:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This alters $pmreceipt's value from "yes" to "1" (which for this matter is the same thing.)

In any event, doing this fix will NOT harm your script.

Last edited by bira; 27 Nov 2001 at 19:07.
Reply With Quote
  #12  
Old 27 Nov 2001, 19:10
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Real name: Justin J. Rebbert
OK, I think it makes sense.

BTW, I just noticed that the name of this hack doesn't really suit what it does..."Preview Sent Private Message"...you haven't really sent the message yet, when you preview it.
__________________
-Justin J. "JJR512" Rebbert
www.JJR512.com: Chat about anything!
Reply With Quote
  #13  
Old 27 Nov 2001, 19:21
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
yeah, it should have been 'Preview Private Message before Sending' -- but I can't change it :/
Reply With Quote
  #14  
Old 27 Nov 2001, 20:05
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
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.


ok, found - and corrected - another bug.

Problem: if you are replying to a PM or forwarding it, the icon in the folder for that PM does not change from a regular "read PM" to a "replied to PM" or a "forwarded PM".

The reason is that if you preview a message, the values for "privatemessageid" and "forward" -- hidden fields in the form -- are not stored.

For this, we have to redclare them in the 'preview' part of the hack.

If you already installed this hack, find in private.php:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And add below or above it:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #15  
Old 28 Nov 2001, 17:00
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Love it, installed here.

Thanks.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

chen@avinadav.com
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:17.

Layout Options | Width: Wide Color: