MyBB Community Forums

Full Version: Quote Box Template (NOT STYLE!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where can I edit the Quote box template? I don't want the style, I want to edit the actual template, which is something like:
<div class="quote_header">{NAME} Wrote:</div><div class="quote_body">{QUOTE_TEXT}</div>
Where can I find this, as simply using CSS for what I want to do with my quote boxes isn't going to cut it.
Well can I ask what you want to do with the quotebox that css can't handle? You would be suprised at the creative ways you can use css.]

btw..admincp template area has a search function. You could search for quote_header I bet and find all it's instances.
The quote box is styled using CSS. In Admin CP > Themes > Modify / Delete > Edit
At the botton under additional CSS, you will be able to find

.quote_header {
	background: #fff;
	border: 1px dashed #000;
	border-bottom: 0;
	color: #000;
	font-weight: bold;
	margin: 8px auto 0 auto;
	padding: 4px;
}

.quote_body {
	background: #fff;
	border: 1px dashed #000;
	border-top: 0;
	color: #000;
	padding: 4px;
	margin: 0 auto 8px auto;
}


As for its template, there is actualy no template, the box is formed inside a php file. In ./inc/class_parser.php you can find

$replace = array("</p>\n<div class=\"quote_header\">".htmlentities('\\1')." $lang->wrote\n</div><div class=\"quote_body\">$2</div>\n<p>\n",
						 "</p>\n<div class=\"quote_header\">$lang->quote\n</div><div class=\"quote_body\">$1</div>\n<p>\n");

These are the HTML codes of the box compiled in the php file so that we transform BB codes into real HTML.
BTW about talking about quote box,
it's displayd like that
"pepo wrote" where can I edit to make it like that "wrote by pepo"
In ./inc/class_parser.php
Find
$replace = array("</p>\n<div class=\"quote_header\">".htmlentities('\\1')." $lang->wrote\n</div><div class=\"quote_body\">$2</div>\n<p>\n",
Replace with
$replace = array("</p>\n<div class=\"quote_header\">$lang->wrote by ".htmlentities('\\1')."\n</div><div class=\"quote_body\">$2</div>\n<p>\n",

As you can see i have only swapped the location.. and i have also added "by" manually. If you don't want to type BY in this code, you can edit ./inc/languages/english/global.lang.php

Find
$l['wrote'] = "Wrote:";
labrocca Wrote:Well can I ask what you want to do with the quotebox that css can't handle?  You would be suprised at the creative ways you can use css.]

btw..admincp template area has a search function.  You could search for quote_header I bet and find all it's instances.
What about a dual background, one repeated x and y, the other in the upper-left hand corner not repeating either? Something like this (which now works and is what I was looking for. Yay! Smile)

The PHP answer was what I was looking for, thanks. Smile