MyBB Community Forums

Full Version: [F] Quotes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I think that was already reported once, but I can't find it AND it still exists in beta 3.

After a quote without specification of who wrote it, you have a bigger space then after a code block, php block or quote:
[attachment=9908][attachment=9909][attachment=9910]
I believe this was marked as bogus.
Isn't that bug? If All the boxes like that haven't such a big space after them, only the quote without specification of who wrote it.

When it isn't bug, why is it hen like it is?

EDIT:
When I look in the code of class_parser.php, I see the reason why that happens:

Quote without specification of name, ...:
				"</p>\n<blockquote><cite>$lang->quote</cite>$1</blockquote><p>\n"

Quote with specification of name, ...:
			return "<p>\n<blockquote><cite>{$span}".htmlspecialchars_uni($username)." $lang->wrote{$linkback}</cite>{$message}</blockquote></p>\n";

PHP Code:
		return "<div class=\"codeblock phpcodeblock\"><div class=\"title\">$lang->php_code\n</div><div class=\"body\">".$code."</div></div>\n";

Code:
		return "<div class=\"codeblock\">\n<div class=\"title\">".$lang->code."\n</div><div class=\"body\" dir=\"ltr\"><code>".$code."</code></div></div>\n";

Like you see: The simple quote (quotes without specification) closes the </p> and opens a new <p>, but there is no <p> used ...

When you have this MyCode:
[quote]dd[/quote]

[quote=Paretje]dd[/quote]

[php]gg[/php]

[code]gg
[/code]

You get this HTML:
					</p>
<blockquote><cite>Quote:</cite>dd</blockquote><p>
<br />
<p>
<blockquote><cite>Paretje Wrote:</cite>dd</blockquote></p>

<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">gg&nbsp;<br /></span></code></div></div></div>
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>gg</code></div></div>

As you see, there is a mistake.

When you change the simple quotes to this:
				"/p>\n<blockquote><cite>$lang->quote</cite>$1</blockquote></p>\n"

You get this HTML code WITHOUT errors:
					<p>
<blockquote><cite>Quote:</cite>dd</blockquote></p>
<br />
<p>
<blockquote><cite>Paretje Wrote:</cite>dd</blockquote></p>

<br />
<div class="codeblock phpcodeblock"><div class="title">PHP Code:<br />
</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">gg&nbsp;<br /></span></code></div></div></div>
<br />
<div class="codeblock">
<div class="title">Code:<br />
</div><div class="body" dir="ltr"><code>gg</code></div></div>

Now, you have only a difference when you have two quotes after each other. To stop that difference, you have to stop using the <p>, and then you have to change the CSS. But without the HTML-errors, it's already much better, and it happens then always with all quotes, and not with one special type of quotes Wink
Ow, and here, you have a screenshot with this patch:
[attachment=9920][attachment=9921]
Ah okay, well it's just such a small issue I just didn't know if going through and fixing it and possibly breaking other things would be worth it at this stage.
Well, I've done it now, just do that little change Wink

For that space between quotes, well I think indeed it will be difficult to find a solution, you have to find a fix with the CSS, but the HTML bug and the difference between quotes will be fixed with that single little change.
Eh not sure how this:

  "/p>\n<blockquote><cite>$lang->quote</cite>$1</blockquote></p>\n" 

is xhtml valid? Why do we only have a partial closing </p> tag and why do we have two of them?
Can't you remove the \n at the end of the quote format?
I did Wink I fixed this, just wanted to point out that thing is not xhtml valid
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
(2008-07-19, 10:47 PM)Tikitiki Wrote: [ -> ]I did Wink I fixed this, just wanted to point out that thing is not xhtml valid

Oh, haha yeah.
Pages: 1 2