Closed (fixed)
Project:
Quote
Version:
6.x-1.1-beta
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2008 at 17:00 UTC
Updated:
7 Jun 2009 at 21:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
pobster commentedIf anyone is in the remotest bit interested in solving this problem, do this;
Add in at line 104;
It's not the best solution ever, but what it does is to strip away the
<p>and</p>tags either side of the original node content/ comment. This means that the quote module outputs this;<p>[quote=andré]getting in the team may prove difficult if paul has entered as well!!![/quote]</p>Rather than the above in the original post. That solves the problem.
Pobster
Comment #2
Zen commentedThis is something the FCKeditor needs to handle, not this module.
Thanks.
Comment #3
pobster commentedI disagree, if it were down to FCKeditor then it'd have to 'learn' every filter and whether to strip out the paragraphs or not from it, that's infeasible? I don't think you understand the problem perhaps? When the text is output with the paragraphs in it the nice box which gets drawn around quotes only covers the very first line with
[quote...]in it. The rest is just like normal text and hence looks awful? This isn't restricted to only FCKeditor either, it happens for all the rich text editors for Drupal 6.x I've tried so far?Pobster
Comment #4
PPLandry commentedTry this one liner:
Replace
$form['comment_filter']['comment']['#default_value'] = '[quote='. $author .']'. trim($quote) ."[/quote]\n". $form['comment_filter']['comment']['#default_value'];
with
$form['comment_filter']['comment']['#default_value'] = '
\n". $form['comment_filter']['comment']['#default_value'];
The trick is to simply enclose the quote in
Tested on D5
Comment #5
PPLandry commentedPlease ignore my last post. It worked only when clicking on the quote link. Here is a better solution, which works also when the [quote] is entered manually
function _quote_filter_process($text) {
// Thanks: function based on code from punbb.org
if (strstr($text, '[quote')) {
$pre = '
$post = '
';
$markup = $pre . t('Quote:') . $post;
$text = str_replace('[/quote]', '[/quote]
', $text);
$text = str_replace(array('[quote]', '[quote=]', '[/quote]'), array($markup, $markup, $post), $text);
$text = preg_replace('#\[quote=(?:"|\')?(.*?)["\']?(?:"|\')?\]#s', $pre . t('%name wrote:', array('%name' => '\\1')) . $post, $text);
}
return $text;
}
It is the same concept, making sure that the quote
I disagree, that this is a FCKEditor issue. HTML doc says that all text must be enclosed by a P or a DIV tag, so FCKEditor is just following guidelines.
Comment #6
pobster commentedI also disagree that this is FCKeditors problem and so I'm reopening this issue for discussion.
Pobster
Comment #7
Zen commentedConversely, all filters will have to contend with the fact that fckeditor mistakes markup for text... all this module does is replace [quote] tags with HTML.. what other filters and modules do beyond this is out of this module's control and is left up to the site admin to play with filter orders etc. to get things right.
-K
Comment #8
Ralla commentedC/P from admin/settings/quote:
That pretty much sums it up :)
Comment #9
hypertext200Apply this patch worked for me.
Comment #10
zyxifrash commentedAs per #8, installed the quote module with FCKEditor live, enabled the quote filter in my Filtered HTML input format, everything worked perfectly out of the box - well, except the theming, had to override that to match my site. I checked the source, looked exactly as the original poster said, but it output just fine. Nothing needs to be patched.
Comment #11
BradM commentedJust confirming, if you set up the filter order as outlined in #8, no patching is needed. Works as expected out of the box. Using tinyMCE here with 5.x.
Comment #12
Zen commented