PDA

View Full Version : Private Messages Enhancements - Quote Post in PM


Makc666
03-08-2009, 10:00 PM
Quote Post in PM

=================
Info:
=================

This product adds a new option in user's popup menu "Quote this post in PM to *username*".
This option passes to new personal message (PM): post's text, username of the post, post id, as well as the post title (if there is one), or thread title (if there is no post title).
It can also add image-link to 'postbit' and 'postbit_legacy' templates.
And even replace in popup menu the URL and the phrase for option "Send a private message to *username*" with its own phrase.

Futures of this hack:


There is option to enable/disable hack.
The hack is fully translatable.
The hack can update popup menu automatically using hook $template_hook[postbit_user_popup]. You can disable this one.
The hack can update postbit and postbit_legacy templates automatically using hook $template_hook[postbit_controls]. You can disable this one.
The hack can replace in popup menu the URL and the phrase for "Send a private message to" option with its own.
The hack uses its own template "qpipm_quote". You can change it as you like. The variables: "$originalposterandpostid", "$originalposter", "$originalpostid" and "$pagetext" are used in that template.
There is option "Automatically Quote Post / Thread Title". Setting this to "Yes" will automatically fill the title of new PM with either the thread or the parent post title, prefixed by 'Re: '.
You can change 'Re: ' for both threads' and posts' PMs. Search for phrases 'qpipm_re_thread' and 'qpipm_re_post'.
You can insert the template of this hack manually anywhere you want in user's popup menu by using "$qpipm". Read "Notes:" below.
You can insert the template of this hack manually anywhere you want in postbit by using "$qpipm_postbit". Read "Notes:" below.
You can translate this hack into your native language. Search for Phrases Containing "qpipm_".
You can set your own PM's title for both threads' and posts' PMs. Search for phrases 'qpipm_own_title_thread' and 'qpipm_own_title_post'.
Option "Use Post's Number in PM's Title". Setting this to "Yes" will use post's number instead of thread's or post's title in PM's title field where avaliable.
Option "Use Thread's Title even if there is Post's Title". Setting this to "Yes" will always fill the new PM's title field with thread's title, even if there is post's title.
Option "Trim Post's Text" allows you to trim the post's text been quoted to new PM.
And other great options.


Use this version only with 3.8.0 or greater.

Enjoy!

=================
Installation:
=================

Install the product :)

=================
Administration:
=================

To set up the products options go to: AdminCP > vBulletin Options > Quote Post in PM
Make translation of phrases containing "qpipm_"

=================
Greetings:
=================

A special thanks goes out to Dismounted for helping me with hook $template_hook[postbit_user_popup] problems. (https://vborg.vbsupport.ru/showthread.php?t=150769)
Thanks go to Abe1 for his comments. (https://vborg.vbsupport.ru/showthread.php?t=150769)
Thanks goes to amykhar for his original 'Quote Post in PM' hack idea.

=================
Notes:
=================

1.
If you want to change some phrases with strings like {1} then you can find some useful information in file "Read_Me - FAQ - Language strings values.txt"

2.
If you want to insert this hack in templates manually:

***************
For popup menu
***************
1.
Go to "AdminCP > vBulletin Options > Quote Post in PM"
Set "Update Popup Menu Automatically" to "No".

2.
Open Templates: (Note: there are two different templates to open!)


postbit
postbit_legacy


Find (for example):
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>

Add After:
$qpipm


****************************************
For postbit and postbit_legacy templates
****************************************
1.
Go to "AdminCP > vBulletin Options > Quote Post in PM"
Set "Update Postbit Automatically" to "No".

2.
Open Templates: (Note: there are two different templates to open!)


postbit
postbit_legacy


Find:
<!-- / controls -->

Add Before:
$qpipm_postbit

=================
History:
=================

v3.7.100 - 02.07.2007
- First release

v3.7.101 - 01.08.2007
- Just removed the code which is not needed any more if you have vBulletin 3.6.8 or greater

v3.7.102 - 17.09.2007
- Made phrase "qpipm_quote_post_in_pm" more comfortable for translation
- Fixed template "qpipm_menu"

v3.7.103 - 29.04.2008
- Compatible with vBulletin 3.7 Gold (may not work with Beta/RC releases)
- New options "USERGROUPS can use quote", "USERGROUPS not allowed to use quote", "USERS not allowed to use quote"
- New variable "$originalposterandpostid" introduced - it is returned with post number in it
- vBulletin function fetch_quote_username() is used now in generating user's name in variable "$originalposterandpostid"
- vBulletin function fetch_quote_username() is used now in generating user's name in variable "$originalposter"
- Variables "$originalposter" and "$originalpostid" was removed from template "qpipm_quote" but you can still use them there if you want

v3.7.104 - 01.05.2008
- New option "Automatically Add Title" allows you to switch quoted PM's title at all
- New option "Always Use Thread's Title"
- Option "Automatically Add Prefix To Title" was separated
- From this version the product doesn't use some Boofo's copyrighted code without his permission

v3.8.105 - 08.03.2009
- Compatible with vBulletin 3.8 Gold (may not work with Beta/RC releases)
- All Templates are cached now
- The image-link can be inserted in postbit and postbit_legacy templates automatically
- You can use your own titles for threads' and posts' PMs
- You can set your own PM's title for both threads' and posts' PMs
- New option "Use Post's Number in PM's Title"
- New option "Use Thread's Title even if there is Post's Title"

v3.8.106 - 05.08.2009
- New option "Replace URL "Send a private message to" in Popup Menu"
- New option "Replace Phrase "Send a private message to" in Popup Menu"
- Added ' rel="nofollow"' to templates "qpipm_menu" and "qpipm_postbit" to follow vBulletin standard
- Fixed some phrases for settings

v3.8.107 - 04.03.2010
- New option "Trim Post's Text"
- Added check that option "Replace URL "Private Message" will only work if the option "Update Popup Menu Automatically" is disabled!
- Added one new phrase
- Updated some phrases

=================
How to Update:
=================

v3.8.106 -> v3.8.107
- Import the product
- Revert template "qpipm_quote" if you changed it
- Update phrases

Any Old One -> Latest One
- Write down your settings for this product in "AdminCP > vBulletin Options > Quote Post in PM"
- Uninstall old version
- Import the product
- Set your settings back

=================
Mark as Installed:
=================

Click Mark as Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=207751) to get an email when an update is released! :D

=================
Other versions of modification:
=================


[4.0.x] Quote Post in PM (https://vborg.vbsupport.ru/showthread.php?t=237291)
[3.7.x] Quote Post in PM (https://vborg.vbsupport.ru/showthread.php?t=177502)
[3.6.x] Quote Post in PM (https://vborg.vbsupport.ru/showthread.php?t=151163)

Makc666
03-09-2009, 12:51 AM
Really you can use this one with 3.7.x and 3.6.8+

To do so you have to:


Open *.xml file.

Find:
<dependency dependencytype="vbulletin" minversion="3.8.0" maxversion="3.8.99" />

Replace with:
<dependency dependencytype="vbulletin" minversion="3.6.8" maxversion="3.8.99" />

vithorius
03-09-2009, 01:24 AM
PERFECT!!! :p :up:

I was just looking for this hack for soooo long...!


(I mean, I prefer the button instead of the popup menu...!

JUST PERFECT! :p :up: :up:

Fungsten
03-09-2009, 01:39 AM
I'm getting the double in the popup menu. Yes I did check the templates for $qpipm_postbit, and $qpipm and they were not there. TIA.

On Edit:

Both the pervious version and this new version were installed. So, this product does not write over the old version rather it add this version.

Sworm
03-09-2009, 09:33 AM
Hi,
i'm using on 3.81 your previous version,
for the upgrade, i have need to uninstall the previous one or i can upgrade simply over the old one from Admincp/product & plugin than adding the check on "overwrite"?

Makc666
03-09-2009, 10:30 AM
I'm getting the double in the popup menu. Yes I did check the templates for $qpipm_postbit, and $qpipm and they were not there. TIA.

On Edit:

Both the pervious version and this new version were installed. So, this product does not write over the old version rather it add this version.
Fungsten, yes, I know.
I decided not to implement auto uninstall of old version for this product for some reasons.

Hi,
i'm using on 3.81 your previous version,
for the upgrade, i have need to uninstall the previous one or i can upgrade simply over the old one from Admincp/product & plugin than adding the check on "overwrite"?
Sworm, yes, just read the note below and uninstall old one, but don't forget to write down you settings for this product.

That is why I wrote in the first post:
=================
How to Update:
=================

Any version -> v3.8.105

Write down your settings for this product in "AdminCP > vBulletin Options > Quote Post in PM"
Uninstall old version
Import the product
Set your settings back

Sworm
03-09-2009, 10:42 AM
Thanks , i try to Uninstall and install the new one.

Fungsten
03-09-2009, 04:56 PM
Fungsten, yes, I know.
I decided not to implement auto uninstall of old version for this product for some reasons.



I think a good idea would also be to first install the upgrade then uninstall the older version. Usually with uninstalls all the settings get erased then everything has to be reset.

ahmed-samara
03-10-2009, 12:36 PM
good work man .. also i see this hack in ASP forums for a long time and i hoped to see in vBulletin

thanks too much

Jasem
03-27-2009, 02:05 PM
good work, thank you

installed

peter_trucker
05-15-2009, 02:30 PM
thnx works fine for me :D

cSh
05-21-2009, 10:33 PM
not auto pm ?

Brandon Sheley
05-21-2009, 10:53 PM
great mod, this is anything thing that should be built into vb :)
* Brandon Sheley clicks install

Makc666
05-22-2009, 04:02 AM
not auto pm ?
What do you mean "not auto pm"?

It is not auto PM it is manual PM :)

Vitaly
08-04-2009, 05:36 AM
Thanks for mod. Could you add option to use the same menu item in popup menu? I mean, the same place, the same text, but with link changed to add quote.

Makc666
08-05-2009, 11:52 AM
v3.8.106 - 05.08.2009
- New option "Replace URL "Send a private message to" in Popup Menu"
- New option "Replace Phrase "Send a private message to" in Popup Menu"
- Added ' rel="nofollow"' to templates "qpipm_menu" and "qpipm_postbit" to follow vBulletin standard
- Fixed some phrases for settings

Thanks for mod. Could you add option to use the same menu item in popup menu? I mean, the same place, the same text, but with link changed to add quote.

As Vitaly PMed me and explained what he wanted in his message I have released the new version. :)

Sunka
08-10-2009, 01:30 AM
Installed!
Working OK...
Thank you.

What Exit?
09-08-2009, 11:19 PM
Very impressing add-in. It works great and was one of the things missing in vB compared to phpBB.

Thank you.

xyzmary2001
09-09-2009, 09:44 AM
It is not working for me. I install the product, make the changes in postbit / postbit legacy, then, when I press "Quote" appears the "new message", but without any text quoted.

Any idea what can cause this?

The forum is quite filled with addons, may have a conflict with one of them?

Makc666
09-15-2009, 07:10 AM
It is not working for me. I install the product, make the changes in postbit / postbit legacy, then, when I press "Quote" appears the "new message", but without any text quoted.

Any idea what can cause this?

The forum is quite filled with addons, may have a conflict with one of them?

Sorry, about what "Quote" you speak?
"Quote" button in vBulletin is for replying messages.

If you have made changes in postbit / postbit legacy you have to switch off (set to "No") option(s) "Update Popup Menu Automatically" and/or "Update Postbit Automatically".

xyzmary2001
09-18-2009, 06:12 AM
Thank you for the reply!

I am talking about the Quote post in PM, not about the quotes button. It leads me to the PM box, but shows no quote there. I have already switched off those two options, this is the main problem. I did everything I could and still nothing.

Makc666
09-21-2009, 07:18 AM
Thank you for the reply!

I am talking about the Quote post in PM, not about the quotes button. It leads me to the PM box, but shows no quote there. I have already switched off those two options, this is the main problem. I did everything I could and still nothing.

What version of vBulletin do you use?

When you install this product and don't use any templates modification for it do you see the link "Quote this post in PM to <user name>" in pop-up menu?

About what modification in you templates you had made do you speak? Tell me.

What setting in ACP for this mod do you use?

Sworm
09-21-2009, 02:21 PM
Hi,
i have installed the previous mod of this (for vb 3.7),
should be better to upgrade to this one?
If so is necessary to uninstall the other one or i must overwrite?

Makc666
09-22-2009, 08:13 AM
Hi,
i have installed the previous mod of this (for vb 3.7),
should be better to upgrade to this one?
If so is necessary to uninstall the other one or i must overwrite?

In the first post there is a HISTORY of changes.

Also there is a section "How to Update".
Follow the instructions there for section "Any version -> v3.8.105"

I recommend you to update to the latest one.

Sworm
01-01-2010, 07:58 AM
I don't have test your mod on my live vb4, can i use it on vb4 gold?

Thanks

Makc666
01-05-2010, 12:26 AM
I don't have test your mod on my live vb4, can i use it on vb4 gold?

Thanks

No. You can use this one on vb4 gold.

I already made a new one but there are some things I need to clear out before releasing this one to 4.*.

Sworm
02-14-2010, 05:53 PM
I'm always waiting for your great vb4 version :) Thanks for your work Mack666

imedic
02-18-2010, 12:36 PM
Great job with this mod. It should be default in VB but better we have it as a mod.
Thx.

Makc666
02-19-2010, 08:11 PM
I'm always waiting for your great vb4 version :) Thanks for your work Mack666

Great job with this mod. It should be default in VB but better we have it as a mod.
Thx.

As 4.0.2 is here I am testing version for 4 with it.

If all will be OK I will release this one in the middle of the next week.

Thanks for you patience!

Makc666
03-03-2010, 11:46 AM
Version for vBulletin 4.0.2+ is out!

You can find it here:
https://vborg.vbsupport.ru/showthread.php?t=237291

Makc666
03-04-2010, 09:21 AM
v3.8.107 - 04.03.2010
- New option "Trim Post's Text"
- Added check that option "Replace URL "Private Message" will only work if the option "Update Popup Menu Automatically" is disabled!
- Added one new phrase
- Updated some phrases

Jah-Hools
12-14-2011, 08:32 AM
My members want PM notification when their post text has been quoted by another member - will this mod do this?

(sorry if I haven't understood the description properly)

Thanks in advance!

career
12-14-2011, 12:51 PM
My members want PM notification when their post text has been quoted by another member - will this mod do this?

This mod doesn't have such feature.

volodja
02-05-2012, 06:13 PM
Hello, Maksim. Great mod! Can you suggest where I should put the link to my own button?

wangyu1314
01-13-2016, 02:37 PM
thank you,it is work fine in vb3.6.8.
but I have modified it as same as vb.org.

Makc666
01-26-2016, 04:51 PM
Hello, Maksim. Great mod! Can you suggest where I should put the link to my own button?
Sorry for such long reply.

You have to modify the template:
qpipm_postbit
<if condition="$show['pmlink']">
<a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]&amp;postid=$post[postid]" rel="nofollow"><img src="$stylevar[imgdir_button]/sendtofriend.gif" alt="<phrase 1="$post[username]">$vbphrase[qpipm_quote_post_in_pm_postbit]</phrase>" border="0" /></a>
</if>

Look for this code to change the path to the image.
img src="$stylevar[imgdir_button]/sendtofriend.gif"

Pay attention that $stylevar[imgdir_button] leads to the default directory with the buttons of your Style directory.


thank you,it is work fine in vb3.6.8.
but I have modified it as same as vb.org.

You are welcome!

TTayfun
12-20-2017, 06:20 PM
you can use with 3.8.11 with php 7

open xml files and find split, change with explode, than you can use again healthly.

thanks again..

Makc666
12-24-2017, 04:55 PM
you can use with 3.8.11 with php 7

open xml files and find split, change with explode, than you can use again healthly.

thanks again..

Thank you, TTayfun!

split function ( http://php.net/manual/en/function.split.php ) was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.

I didn't thing I will make changes for this one in original package.

I need time to test this one with explode function ( http://php.net/manual/en/function.explode.php ) and may be I will release it as a separate zip pack for PHP 7+.

Thank you one more time!

TTayfun
12-24-2017, 06:56 PM
Thank you, TTayfun!

split function ( http://php.net/manual/en/function.split.php ) was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.

I didn't thing I will make changes for this one in original package.

I need time to test this one with explode function ( http://php.net/manual/en/function.explode.php ) and may be I will release it as a separate zip pack for PHP 7+.

Thank you one more time!

Thank you for support your mod Makc666, great hack :up: