vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   if [quote], prepend \n\n to $newpost[message] (https://vborg.vbsupport.ru/showthread.php?t=81110)

whodah 05-07-2005 04:41 PM

if [quote], prepend \n\n to $newpost[message]
 
heya!

i'd like to prepend
Code:

$newpost[message]
w/ a couple of carriage returns if the first entry in
Code:

$newpost[message]
is the quote bbcode
[/code][quote...[/code]

thus, when someone clicks 'quote' and it goes to the editor to type in your message, the quote is 2 or 3 lines down rather than on the 1st line.

any tips on where i might be able to edit this variable:
Code:

$newpost[message]
thanks! :)

Marco van Herwaarden 05-07-2005 05:45 PM

Think you would best of by hacking the functions_bbcodeparse.php for that.

whodah 05-07-2005 06:03 PM

would that then induce the new lines on all quotes? (as opposed to just the first one when a user clicks 'quote')

i.e. if someone quotes 5 things in one reply, come parse time, wouldn't each of the 5 quotes have extra carriage returns?

Marco van Herwaarden 05-07-2005 06:17 PM

Probably yes, unless you code a test for it.

whodah 05-08-2005 05:10 PM

oh geez. the solution was VERY simple if anyone else wants to do this. i betcha it's on the forums somewhere, i just didn't know what to search for and it's difficult searching for array variables w/ how the search engine parses them...

at any rate, edit template:
newpost_quote
from:
Code:


       
Quote:

       
       
               
       
       

                       

                       
                               

                                        Originally Posted by $originalposter
                                       
                               

                               
{$pagetext}

                       
                       

               


to:
Code:



       
Quote:

       
       
               
       
       

                       

                       
                               

                                        Originally Posted by $originalposter
                                       
                               

                               
{$pagetext}

                       
                       

               


(note extra carriage returns)

then when anyone hits 'quote' or replies to a PM w/ a quote, the quote starts however many lines down u entered above.

edit:
yikes... the code/quote combo freaks out my reply...

just edit that tempate and add carriage returns as you see fit... really easy! :)


All times are GMT. The time now is 02:30 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.00990 seconds
  • Memory Usage 1,724KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete