MyBB Community Forums

Full Version: Theming the Quote Box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm trying to theme my quote and code boxes, and it is proving to be a very frustrating experience, mainly because the stupid quote/code html is 'tardcoded and unchangeable, at least for individual themes. I managed to get my code box to look at least reasonable, but the quote box is missing but a single wrapping element to allow me to achieve a consistent look. My last resort will be using some JS to manually write in the stupid code I want, but if I can achieve the look I want without it that would be okay.

[attachment=18321]
I want the quote box to look like the code box.

CSS code:
blockquote, .codeblock {
	background: #333;
	border: 1px solid #06081B;
	width: 95%;
	margin: auto;
}

blockquote cite, .codeblock .title {
	background: #444;
	font-weight: bold;
	text-shadow: 0px 1px 3px #000;
	font-size: 10px;
	text-align: left;
	display: block;
	border: 1px solid #888;
	border-bottom: 1px solid #000;
	padding: 2px 3px;
}

blockquote cite span {
	padding-right: 3px;
}

.codeblock .body {
	border: 1px solid #666;
	padding: 3px;
}

Relevant unchangeable (Angry) HTML code:
<blockquote>
 <cite>
  <span>Time Originally Posted</span>
  User Wrote: <a href="jump/url" class="quick_jump">&nbsp;</a>
 </cite>
 Quote Contents
</blockquote>

<div class="codeblock">
 <div class="title">Code:<br /></div>
 <div class="body" dir="ltr">
  <code>
   Code Contents
  </code>
 </div>
</div>
Somebody? Anybody? No fancy CSS tricks or secret templates to edit? Nothing? This is frustrating me. Why make everything except these customizable? What were the devs thinking? This is one of the two things that frustrates me most about theming for MyBB. I just want to make a simple change without any core edits!
edit your class_parser.php and find the quote
(2010-05-19, 03:52 PM)Firestryke31 Wrote: [ -> ]without any core edits!

I don't want to edit the core files because I don't want to have to do that every update. I also might want to distribute the themes I make and requiring core edits would dissuade many people from using them.
It's not possible with the way MyBB has it set up. The code box has the code wrapped in a <code> tag, and you can style that, but since the text in the quote box isn't wrapped in anything, you can't do it. Simply editing the core file and putting <quote> and </quote> around the line that parses the user's text will achieve what you want, and it won't mess anything up in any other themes unless you style it in those themes as well.
What makes you think these are hard coded? You can use css to edit them.

I'm not sure what you want to achieve from your screenshot and why you can't achieve it.
If you look at the code box in his screenshot, the actual code has some padding and a light grey border to it. You can do that by adding CSS styles to the <code> tags, because the code is wrapped in a <code> tag.
Quote:<div class="codeblock">
<div class="title">Code:<br /></div>
<div class="body" dir="ltr">
<code>
Code Contents
</code>

</div>
</div>
He wan'ts the same padding and light grey border on the text in the quote box, but he can't do it the same way he can with the code box because the actual text isn't wrapped in anything like the codebox is.
Quote:<blockquote>
<cite>
<span>Time Originally Posted</span>
User Wrote: <a href="jump/url" class="quick_jump">&nbsp;</a>
</cite>
Quote Contents
</blockquote>
(2010-05-19, 07:01 PM)labrocca Wrote: [ -> ]What makes you think these are hard coded? You can use css to edit them.

It's the HTML that's hardcoded. I can edit the CSS all I want, but it's useless if there's no tags to style. The code box has a border around both the title bar and the code itself, as well as a dark border around the whole box. I want the same thing around the quote contents but there's no tags around them that only affects them.

What I really want to do is create a whole fancy style using image corners and whatnot, but the CSS border version doesn't stand out too much so I'm putting up with it, at least on the code box.
Have you considered a custom mycode? I'm wondering if it's possible to get it to parse before the original. At worse you can add a custom mycode then just comment the one in class_parser.
Meh, if it will require something like forcing core edits to redistribute, I'd rather find another style that looks reasonable with my theme. Out of all of the customizability, this one little thing has to be such a problem. And it's even something a lot of people might want to change, too.
Pages: 1 2