And that right there is the exact reason I won't be bothering to install any quote feature on my site :P
Don't let that deter you, the extension is used quite properly outside of that thread. They were just loving the brand new quote feature, in the appropriate discussion too I might add. They celebrated by going nuts with the quoting!
The extension doesn't work for me.... it shows only <blockquote><cite>Posted By: uzi</cite>hallo</blockquote> but not the formatted quotation... :(((
P.S. Text Mode is not enabled
Is there a way of testing for the existence of other extensions?
Bergamot, as you wrote, if I change the variables at the top of quote.js as follows it will work with textile too:
var tagOpenQuote = "bq. ";
var tagOpenCite = "??";
var tagCloseQuote = "";
var tagCloseCite = "??";
but the TextileFormatter wraps an extra set of p-tags around all of "commentText" resulting in invalid code. It's easy enough to take out of the relevant textile function to get it working, but it would be better if it did that "when the quotations extensions is active". How would I go about testing for that in the following php function:
As you can see, the "// commented out" lines are the original code. Possibly it would be better to have an entirely separate replacement textile-bq-function-when-quotes-extension-active to make it easier to manage updating.
Alternatively, would it be better to test around the other way, i.e. from the quotation extension to test if textileformatter or markdownformatter is active? I guess it depends upon the order in which they're processed.
BTW: Bergamot, I like the ability to highlight just a portion of the text and then click "quote". Neat.
will this extension work if you have the BBcode extension installed? I also have the same problem as uzi
edit: The only way I got this working was by installing the HTMLFormatter extension and it ONLY worked when I chose the HTML as the comment format type.
Hm... but I don't want to enable HTML in the comments. BBcode would be much better solution for me and for all others, who want to use the extension with BBcode.
To jaredb & LoOkHerE: without enabling HTML it doesn't work
It will work fine with BBCode once someone modifies the javascript to output BBCode instead of HTML. The code was designed so this would be pretty easy to do.
Hmmmm, I took a look at it, and changed the script to output BBCode.
Two problems though: 1. The BBCode extension doesn't support the blockquote or cite elements. This is easy to fix. 2. The BBCode extension doesn't support nesting similar tags. This is a major problem, and I don't know how to fix it.
Ok, I wrote a new Better BBCode Extension that fixes both of those problems, and quoting works great! I'll release the files once I'm sure there aren't any glaring bugs.
Ok because I don't have time to put together packages for the addin page tonight, you can get the Better BBCode Extension 1.0 here, and the BBCode javascript file for the Quotations Extension here.
Comments
This is of course a personal preference, but you might want to think about adding a commentField.focus(); to the quote function.
but when i install it manually in settings/extensions.php it works.
Extension Url:
to
Extension Url: null
it will show up in the extensions list.
Bergamot, as you wrote, if I change the variables at the top of quote.js as follows it will work with textile too:
var tagOpenQuote = "bq. "; var tagOpenCite = "??"; var tagCloseQuote = ""; var tagCloseCite = "??";
but the TextileFormatter wraps an extra set of p-tags around all of "commentText" resulting in invalid code. It's easy enough to take out of the relevant textile function to get it working, but it would be better if it did that "when the quotations extensions is active". How would I go about testing for that in the following php function:
if ($tag == "bq") { $cite = $this->checkRefs($cite); $cite = ($cite != '') ? ' cite="' . $cite . '"' : ''; // $start = "\t<blockquote$cite>\n\t\t<p"; $start = "\t<blockquote$cite>\n\t\t"; // replacement without opening-p-tag // $end = "</p>\n\t</blockquote>"; $end = "\n\t</blockquote>"; // replacement without closing-p-tag } // return "$start$atts>$content$end"; return "$start$atts$content$end"; // replacement without closing-angle-bracket
As you can see, the "// commented out" lines are the original code. Possibly it would be better to have an entirely separate replacement textile-bq-function-when-quotes-extension-active to make it easier to manage updating.
Alternatively, would it be better to test around the other way, i.e. from the quotation extension to test if textileformatter or markdownformatter is active? I guess it depends upon the order in which they're processed.
BTW: Bergamot, I like the ability to highlight just a portion of the text and then click "quote". Neat.
edit: The only way I got this working was by installing the HTMLFormatter extension and it ONLY worked when I chose the HTML as the comment format type.
Eventually I'd like to assemble scripts for each different markup language.
To jaredb & LoOkHerE: without enabling HTML it doesn't work
Until then, it's HTML only.
Two problems though:
1. The BBCode extension doesn't support the blockquote or cite elements. This is easy to fix.
2. The BBCode extension doesn't support nesting similar tags. This is a major problem, and I don't know how to fix it.
ban bbcode from the earth for all eternity.