View Full Version : if [quote], prepend \n\n to $newpost[message]
whodah
05-07-2005, 04:41 PM
heya!
i'd like to prepend
$newpost[message]
w/ a couple of carriage returns if the first entry in
$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:
$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:
{$pagetext}
to:
{$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! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.