Closed Jimmi08 closed 2 years ago
Somehow it started to work (parse quote)
But this is code inserted in tinymce:
[html]<div class="indent bbcode-quote"><em> LAN_WROTE</em> ...<br>test</div>[/html]
Normally it should be:
if(deftrue('BOOTSTRAP'))
{
return '<blockquote class="blockquote">
<p>'.$code_text.'</p>
<small><cite title="'.$parm.'">'.$parm.'</cite></small>
</blockquote>';
}
return "<div class='indent {$class}'><em>$parm ".LAN_WROTE."</em> ...<br />$code_text</div>";
I switched to bootstrap3 theme and tested this constant. Result:
string(9) "BOOTSTRAP"
The solution above is not perfect but it works.
Example of using for bootstrap5:
.bbcode-quote {
@extend blockquote;
@extend .blockquote;
@extend .bg-info;
@extend .bg-opacity-25;
@extend .p-2;
}
.bbcode-quote-source {
@extend .blockquote-footer;
}
Example for bootstrap4 without sass:
.bbcode-quote {
background-color: rgb(0 153 218 / 25%) !important;
padding: 0.5rem !important;
margin-bottom: 1rem;
font-size: inherit;
}
.bbcode-quote p {
opacity: 0.75;
}
.bbcode-quote-source {
margin-top: -1rem;
margin-bottom: 1rem;
font-size: 0.875em;
color: #6c757d;
opacity: 0.75;
}
I fixed the main issue. (BOOTSTRAP not defined and deprecated LAN file being loaded) . PR no longer needed.
Excellent. Your way is always welcome. Thanks
Just a few notes (after synced with latest git):
Forum post output:
[html]<blockquote>
<p>any text </p>
<small><cite title=""></cite></small></blockquote>[/html]
<br>
was there to get on new line, because now you are in the same block and enter causes that your answer is inside blockquote block, latest Chrome, maybe related with tinymce settings
</p>
<p>my answer </p>
<small><cite title=""></cite></small></blockquote>[/html]
<blockquote>
on forum is different than<blockquote>
on pages (news etc) (maybe quote vs blockquote)
this part of legacy code <div class='indent {$class}'>
is important for bootstrap code too . At least $class
...[blockquote]
code:
return "<blockquote class='indent {$class}'>{$code_text}</blockquote>";
Bug Description
when you use quote in a forum, it should be visibly different.
This is not working:
$text = $tp->toText("[quote={$quoteName}]\n".$post."\n[/quote]\n",true);
Not sure why, but maybe because of this detection for bbcode use?
$bbsearch = array('[/img]', '[/h]', '[/b]', '[/link]', '[/right]', '[/center]', '[/flash]', '[/code]', '[/table]');
How to Reproduce
Steps to reproduce the behavior: