vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to Add Line Breaks in PM quickreply (https://vborg.vbsupport.ru/showthread.php?t=316151)

ozzy47 12-23-2014 11:49 PM

Ok lets do this. We will create a new plugin.

Product: vBulletin
Hook Location : private_newpm_reply
Title: Add Text To Pm
Execution Order : 5
Plugin PHP Code:
Code:

$pm['message'] = "

********* DO NOT WRITE BELOW THIS LINE **********
".$pm['message']."
";


joeychgo 12-24-2014 08:31 AM

PERFECT!!!!!!!!!!!!!!!!!!!

Thank you!

CAG CheechDogg 12-24-2014 08:37 AM

Ozzy... how would you do this so that when you start typing the predefined text disappears automatically .... that would be even GOODER !!!

ozzy47 12-24-2014 09:16 AM

Yeah I tried a couple of ways to make the line disappear, but to no avail. If I get some time I'll look into it more.

CAG CheechDogg 12-24-2014 09:18 AM

Ok good stuff ozzy once again thanks !!!!

kh99 12-24-2014 09:39 AM

Quote:

Originally Posted by joeychgo (Post 2528542)
But where? all I have is this



I don't know where to put it in the newpm_quote template and I don't see any indication of where any <br /> would go in there

I meant just put <br/><br/> at the beginning. But it sounds like you got it working a different way.

Edit: ...which is good because now that I get around to trying it, it doesn't seem to work. Sorry about that.

ozzy47 12-24-2014 09:50 AM

Ok lets do this, this will hide the line in the display of the PM's

Product: vBulletin
Hook Location : postbit_display_complete
Title: Hide Text In Pm
Execution Order : 5
Plugin PHP Code:
Code:

if (THIS_SCRIPT == 'private')
{
    $find = '********* DO NOT WRITE BELOW THIS LINE **********';
    $replace = ''; 

    $this->post['message'] = str_replace($find, $replace, $this->post['message']);
}


CAG CheechDogg 12-24-2014 11:43 AM

Quote:

Originally Posted by ozzy47 (Post 2528610)
Ok lets do this, this will hide the line in the display of the PM's

Product: vBulletin
Hook Location : postbit_display_complete
Title: Hide Text In Pm
Execution Order : 5
Plugin PHP Code:
Code:

if (THIS_SCRIPT == 'private')
{
    $find = '********* DO NOT WRITE BELOW THIS LINE **********';
    $replace = ''; 

    $this->post['message'] = str_replace($find, $replace, $this->post['message']);
}


Yeeerp !!! that did the job ...good stuff Ozzy !!! thanks once again ..

ozzy47 12-24-2014 11:46 AM

Not a problem, glad to help. :)

CAG CheechDogg 12-24-2014 11:49 AM

Only thing is that when you have a few pm's in the conversation you will see the message "********* DO NOT WRITE BELOW THIS LINE **********" over and over again lol ..


All times are GMT. The time now is 11:34 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
  • Page Generation 0.02387 seconds
  • Memory Usage 1,733KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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