vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Private Messages Enhancements - Quote Post in PM (https://vborg.vbsupport.ru/showthread.php?t=237291)

Makc666 03-01-2010 10:00 PM

Quote Post in PM
 
1 Attachment(s)
Quote Post in PM

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


This product adds a new option in user's popup menu "Quote this post in PM" with the new URL having the title attribute "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 "Private Message" with its own URL and 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[memberaction_dropdown_items]. 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/or the phrase for "Private Message" option with its own URL and/or phrase.
  • The hack uses its own template "qpipm_quote". You can change it as you like. The variables: "$originalposterandpostid", "$originalposter", "$originalpostid" and "$pagetext" can be 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 "{vb:raw qpipm}". Read "Notes:" below.
  • You can insert the template of this hack manually anywhere you want in postbit by using "{vb:raw 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 available.
  • 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 vBulletin 4.2.0 or greater.

For vBulletin 4.0.* or 4.1.* use version 4.0.106 which have the same functionality.


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.
Thanks goes to cellarius for his how to thread. (https://vborg.vbsupport.ru/showthread.php?t=228078)

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


Please, read Read_Me - About.txt file inside archive!

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


Code:

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

v4.0.100 - 10.01.2010
- Compatible with vBulletin 4.0.0 Gold

v4.0.102 - 02.03.2010
- Compatible with vBulletin 4.0.2 and above only
- New option "Use Left Popup Menu Column"
- Added one new phrase
- Updated some phrases

v4.0.103 - 03.03.2010
- Fixed PHP Warning:  Unexpected character in input:  '\\' (ASCII=92)
- Fixed option "Replace URL "Private Message" in Popup Menu" putting the same post number in every Popup Menu
- Added check that option "Replace URL "Private Message" will only work if the option "Update Popup Menu Automatically" is disabled!

v4.0.104 - 04.03.2010
- New option "Trim Post's Text"
- Fixed PHP Warning: fetch_template() calls should be replaced by the vB_Template class.
- Fixed PHP Warning: array_merge() [function.array-merge]: Argument #1 is not an array
- Old variables for template "qpipm_quote" replaced by new variables: "{vb:raw qpipm_originalposterandpostid}", "{vb:raw qpipm_originalposter}", "{vb:raw qpipm_originalpostid}" and "{vb:raw qpipm_pagetext}"
- Added one new phrase
- Updated some phrases

v4.0.105 - 18.10.2010
- Fixed plugin "Quote Post in PM (1)" (Thanks to Vitaly - post #2104969) - affected forums where option "Update Postbit Automatically" was set to "No" and option "Replace URL "Private Message" in Popup Menu" was set to "Yes".
- Replaced deprecated function split() with explode() function
- Updated template "qpipm_menu" to watch changes in latest revision of template "memberaction_dropdown"

v4.0.106 - 24.12.2010
- Updated dependency to 4.1.99
- Tested on Version 4.1.0 Patch Level 2
- Updated manually installation instruction

Code:

v4.2.107 - 13.12.2012
- Updated dependency from 4.2.0 to 4.2.99 (will work only with version 4.2.0 and greater)
- Updated templates "qpipm_menu", "qpipm_postbit" to fit version 4.2.0 and greater
- Added seperator to template "qpipm_postbit" (I know it must be spelled "separator", but vBulletin Team still use "seperator" in some templates)
- Replaced icon used in "qpipm_postbit" for button used in "postbit" and "postbit_legacy" templates
- Updated phpcode for hook "postbit_display_complete" to fit version 4.2.0 and greater
- Tested on version 4.2.0 Patch Level 3

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

Code:

v4.0.106 -> v4.2.107
- No update needed if you don't use vBulletin 4.2.0 or greater
- If you use vBulletin 4.2.0 or greater:
-- Import the product
-- Revert templates "qpipm_menu", "qpipm_postbit" if you changed them

v4.*.* -> Latest One
- Import the product
- Revert templates "qpipm_menu", "qpipm_postbit", "qpipm_quote" if you changed them
- 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 to get an email when an update is released! :D

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


Makc666 03-02-2010 01:35 PM

Reserved

ChopSuey 03-02-2010 02:50 PM

First! I'll check this out later thanks.

Allan 03-02-2010 03:24 PM

Very good idea :)

Xeyn 03-02-2010 04:08 PM

installed......now i get lots of errors in threads like

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/xxxxxx/public_html/forum/includes/class_postbit.php(314) : eval()'d code on line 345

using 4.0.2

Cableguy69 03-02-2010 11:04 PM

When I go to a thread I get this.

Quote:

Unable to add cookies, header already sent.
File: /home/clandigi/public_html/includes/class_postbit.php(314) : eval()'d code
Line: 369

OturanBoğa 03-03-2010 09:23 AM

Reserved. Very good...

Makc666 03-03-2010 11:42 AM

Quote:

Originally Posted by Allan (Post 1995317)
Very good idea :)

Quote:

Originally Posted by OturanBoğa (Post 1995909)
Reserved. Very good...

Thanks people!

Quote:

Originally Posted by Xeyn (Post 1995345)
installed......now i get lots of errors in threads like

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/xxxxxx/public_html/forum/includes/class_postbit.php(314) : eval()'d code on line 345

using 4.0.2

Quote:

Originally Posted by Cableguy69 (Post 1995622)
When I go to a thread I get this.

This one if fixed now!
Thanks!

archet1337 03-03-2010 02:02 PM

Nice mod but I get this error:

Code:

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: qpipm_quote in [path]/includes/functions.php on line 3932

ChopSuey 03-03-2010 02:13 PM

@Coder replace the fetch(templatename) with fetch(vB_Template)

Good luck.

Sworm 03-03-2010 05:41 PM

Quote:

Originally Posted by archet1337 (Post 1996102)
Nice mod but I get this error:

Code:

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: qpipm_quote in [path]/includes/functions.php on line 3932

Same error for me!! Only disable for the moment, waiting a fix.

Makc666 03-04-2010 08:39 AM

Quote:

Originally Posted by archet1337 (Post 1996102)
Nice mod but I get this error:

Code:

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: qpipm_quote in [path]/includes/functions.php on line 3932

Quote:

Originally Posted by Sworm (Post 1996262)
Same error for me!! Only disable for the moment, waiting a fix.

Get a new one, please! :cool:

v4.0.104 - 04.03.2010
- New option "Trim Post's Text"
- Fixed PHP Warning: fetch_template() calls should be replaced by the vB_Template class.
- Fixed PHP Warning: array_merge() [function.array-merge]: Argument #1 is not an array
- Old variables for template "qpipm_quote" replaced by new variables: "{vb:raw qpipm_originalposterandpostid}", "{vb:raw qpipm_originalposter}", "{vb:raw qpipm_originalpostid}" and "{vb:raw qpipm_pagetext}"
- Added one new phrase
- Updated some phrases

Quote:

Originally Posted by ChopSuey (Post 1996112)
@Coder replace the fetch(templatename) with fetch(vB_Template)

Good luck.

I know this one. I just forgot to update that code.
Fixed now!
Thanks for your comment! :)

darren1981 03-04-2010 10:40 AM

Very impressive :)

Sunka 04-11-2010 11:11 PM

Installed!

iadventure 04-21-2010 06:29 PM

can I get the 4.01 version?

Makc666 04-23-2010 08:27 AM

Quote:

Originally Posted by iadventure (Post 2025040)
can I get the 4.01 version?

I can't understand your question.

vBulletin prior to version 4.0.2 has some bugs which don't allow this product (and some others) to work.

ChopSuey 05-21-2010 02:04 AM

Can you make a version without template edits? Thanks.

Vitaly 09-30-2010 07:44 AM

Because of wrong variable use, this mod crash nicks in threads sometime.

in hook postbit_display_complete

Find all
Code:

htmlspecialchars(\'' . "$post[username]" . '\'))
Replace for
Code:

htmlspecialchars($memberinfo[username]))

Makc666 10-18-2010 09:14 AM

Updated

v4.0.105 - 18.10.2010
- Fixed plugin "Quote Post in PM (1)" (Thanks to Vitaly - post #2104969) - could affect some forums if "Update Postbit Automatically" was not used (set to "No")
- Replaced deprecated function split() with explode() function
- Updated template "qpipm_menu" to watch changes in latest revision of template "memberaction_dropdown"

Quote:

Originally Posted by ChopSuey (Post 2040927)
Can you make a version without template edits? Thanks.

This Modification is Auto-Template version.

You can use Manual-Template option in this Modification if you want to edit your templates manually if they are heavy modified.

Quote:

Originally Posted by Vitaly (Post 2104969)
Because of wrong variable use, this mod crash nicks in threads sometime.

in hook postbit_display_complete
...

Thanks, Vitaly!

I have replaced:
Code:

htmlspecialchars(\'' . "$post[username]" . '\')
with:
Code:

htmlspecialchars(\' . $memberinfo[\'username\'] . \')

Hippy 10-18-2010 06:50 PM

thanks for the great mod Makc666.
I am going to instlall this later tonight
can't believe I missed this mod..

Vitaly 10-19-2010 01:43 AM

Last fix is incorrect. I've lost nicks again.

Attached my one, wich works.

Makc666 10-20-2010 07:36 AM

Quote:

Originally Posted by Hippy (Post 2111406)
thanks for the great mod Makc666.
I am going to instlall this later tonight
can't believe I missed this mod..

Don't forget to download the archive today as there was a silent update of it :)

Quote:

Originally Posted by Vitaly (Post 2111526)
Last fix is incorrect. I've lost nicks again.

Attached my one, wich works.

Thanks, Vitaly, one more time.

I have replaced the archive with more correct fix.

The bug affected forums where option "Update Postbit Automatically" was set to "No" and option "Replace URL "Private Message" in Popup Menu" was set to "Yes".

Hippy 10-20-2010 06:57 PM

2 thumbs up Makc666
the one I install before you upgraded, I did not find any issues with
But I will upgrade all the same
thank for your hard work
Regards
Hippy

murekhalir 10-30-2010 09:06 PM

is there any way to just make it a button on a postbit without looking at someone's profile name?

Hippy 10-30-2010 10:44 PM

Quote:

Originally Posted by murekhalir (Post 2116170)
is there any way to just make it a button on a postbit without looking at someone's profile name?

https://vborg.vbsupport.ru/attachmen...4&d=1267544298

should be in the instructions

Taurus1 12-05-2010 05:28 AM

Can we get an update for vb4.1 PL2 please. Seems that after upgrading there is now some extra text in the text field:

<!-- BEGIN TEMPLATE: qpipm_quote -->
<!-- END TEMPLATE: qpipm_quote -->

Hippy 12-05-2010 09:56 AM

Quote:

Originally Posted by Taurus1 (Post 2129489)
Can we get an update for vb4.1 PL2 please. Seems that after upgrading there is now some extra text in the text field:

<!-- BEGIN TEMPLATE: qpipm_quote -->
<!-- END TEMPLATE: qpipm_quote -->

running vb4.1 PL2 here and I am not getting this ..

live board or the test board

Jman423 12-05-2010 01:35 PM

I'm not getting the button below the post, even with the option enabled. This might be because I am running 4.1 PL2.

Hippy 12-05-2010 06:12 PM

add the xml file again.. allow overwrite

working 100% wit the lastest 4.0.1pl2

smirkley 12-07-2010 02:40 AM

Just downloaded and installed....

Note to coder: update dependancies to reflect current versions as at the moment will not install with 4.1.0PL2.

Made changes and works as designed.

Thanks

8thos 12-22-2010 03:15 AM

I love it!

OldSchoolDSL 12-22-2010 05:05 AM

Installed and working on 4.1 PL2

Important:

To install on 4.1, you will need to open quote_post_in_pm_v4-0-105.xml

find

PHP Code:

<dependency dependencytype="vbulletin" minversion="4.0.2" maxversion="4.0.99" /> 


replace with

PHP Code:

<dependency dependencytype="vbulletin" minversion="4.0.2" maxversion="4.2.99" /> 


The proceed with normal install. :)

Makc666 12-24-2010 02:53 PM

Quote:

Originally Posted by OldSchoolDSL (Post 2137504)
Installed and working on 4.1 PL2

Important:

To install on 4.1, you will need to open quote_post_in_pm_v4-0-105.xml

The proceed with normal install. :)

Thanks OldSchoolDSL for a note!

I have updated this one.

Updated

v4.0.106 - 24.12.2010
- Updated dependency to 4.1.99
- Tested on Version 4.1.0 Patch Level 2
- Updated manually installation instruction

OldSchoolDSL 12-27-2010 12:56 AM

Quote:

Originally Posted by Makc666 (Post 2138638)
Thanks OldSchoolDSL for a note!

I have updated this one.

Updated

v4.0.106 - 24.12.2010
- Updated dependency to 4.1.99
- Tested on Version 4.1.0 Patch Level 2

As expect. Update works also.

BaanFarsang 12-27-2010 09:42 AM

What's wrong locate after installed process of v4.0.106 - 24.12.2010

https://vborg.vbsupport.ru/

Makc666 12-27-2010 03:11 PM

Quote:

Originally Posted by Sriubol (Post 2139514)
What's wrong locate after installed process of v4.0.106 - 24.12.2010

http://img375.imageshack.us/img375/7...2553183942.png

This mod doesn't add any separator to postbit.

So look for some other mod which does this one.

The code for postbit of this MOD looks like:

HTML Code:

                <template name="qpipm_postbit" templatetype="template" date="1249473893" username="Makc666" version="4.0.102"><![CDATA[<vb:if condition="$show['pmlink']">
                        <a style="background:url({vb:stylevar imgdir_button}/sendtofriend.gif) no-repeat scroll left center transparent; padding-left:20px;" href="private.php?{vb:raw session.sessionurl}do=newpm&amp;u={vb:raw post.userid}&amp;postid={vb:raw post.postid}" rel="nofollow" title="{vb:phrase qpipm_quote_post_in_pm_postbit, {vb:raw post.username}}">&nbsp;</a>
                        </vb:if>]]></template>


As you can see there is no any separator image in it.

BaanFarsang 12-27-2010 04:04 PM

Problem : Modified on postbit_legacy following by your method step

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

4.10 Patch Level 2

Makc666 12-28-2010 06:32 AM

Quote:

Originally Posted by BaanFarsang (Post 2139667)
Problem : Modified on postbit_legacy following by your method step

I got your problem.

Try this one:

Code:

****************************************
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:
---------------------
                                        {vb:raw post.iplogged}
---------------------

Add Before:
---------------------
                                        {vb:raw qpipm_postbit}
---------------------


BaanFarsang, try to understand that you can add {vb:raw qpipm_postbit} any were you like.

The instructions I gave is just an example. Just an example.

BaanFarsang 12-28-2010 07:33 AM

Quote:

Originally Posted by Makc666 (Post 2140005)
I got your problem.

Try this one:

Code:

****************************************
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:
---------------------
                                        {vb:raw post.iplogged}
---------------------

Add Before:
---------------------
                                        {vb:raw qpipm_postbit}
---------------------


BaanFarsang, try to understand that you can add {vb:raw qpipm_postbit} any were you like.

The instructions I gave is just an example. Just an example.

OK, worked, thanks.

Makc666 12-29-2010 08:49 AM

I am glad that the problem is solved.


All times are GMT. The time now is 10:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01950 seconds
  • Memory Usage 1,874KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete