Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Bbcode in news

Will be in version 9.2 solutions bbCode "code" for NEWS & ARTICLES?
Enabled BB Codes only works for messages.
Right now I believe not supporting yet, but I will try to see what I can do. Please make an issue in Github.
If it's not in the core 9. The Mods community may add BBCodes support to it in the near future.
Hi Craig:
I know your solution from Version 7.2 such as:
// BB Codes For Mod News - Fangree_Craig
if ((file_exists (INCLUDES. "na_bbcodes_settings.php")) && $ settings [ 'tinymce_enabled']! == 1) {
require_once INCLUDES. "na_bbcodes_settings.php";

The question is perhaps only to be implemented into infusions, where they are now and NEWS ARTICLES.
Anyone think before if we implement Markdown BBCode?

You see if I were to create a BBCode table....

[td]head 1[/td][td]head 2[/td]

It's gonna be very tough...

| head 1 | head 2|

Very fast..

So, I'm thinking if we add markdown capability to both PF's bbcode & html modes...

As for <code > tag....to print in letters, it's like this:

 <?php echo $code; ?>

to execute, i've made in carousel widget, it's like this

I'll give some thoughts on this before finalizing on this matter.
Guys try out the code bbcode on git 9.02 branch
Both code and


For this issue I propose an embedded bbcode in HTML and use a <bbcode> tag so everything inside translated into bbcode?

@Kvido, i think dont do just code bbcode, implement all if we do this.
WORKS bbCode editor, see. picture.
After saving but no display brands. This code is inserted:
echo „&lt;script type=’text/javascript’ src=’“.INCLUDES.“drag.js’&gt;&lt;/script&gt;n“;

Do stránky theme.php (své šablony vzhledu, kterou používáte) poté dáme následující kód-zápis:

echo „
 &lt;div id=’i1&#8242; style=’position:absolute; top:5px; left:750px; width:250px; height:300px; z-index: 11;’&gt;
 &lt;table width=’250&#8242; height=’300&#8242;border=’0&#8242;&gt;
 &lt;tr&gt;&lt;td&gt;&lt;img src=’../../images/xxxx.png’&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
 &lt;script language=’javascript’&gt;
 new dragElement(‘i1&#8242;);

The code can be seen in b&#345;lánku:

I note that the Administration bbCode I turned + Geshi.

]In Articles bbCode works perfectly !!!
Kvido attached the following file:
phpf-902_bbcode_test1_in-editor.png [63.19kB / 113 Downloads]
The News Text :


 $news_text = $data['news_extended'] ? parse_textarea("<p>".$data['news_news']."</p><p>".$data['news_extended']."</p>") : parse_textarea("<p>".$data['news_news']."</p>");

From what I can tell, it should be converting ASCII texts to HTML code, and is BBCode Supported already. So my thoughts are telling me that parse_textarea() is not working 'as intended'.

I'm thinking maybe:


These both lines switch, decode first, then parseubb. Please try.

$data = $bbcode ? parseubb($data) : $data;
    $data = $decode ? html_entity_decode(stripslashes($data), ENT_QUOTES, $locale['charset']) : $data;

$data = $decode ? html_entity_decode(stripslashes($data), ENT_QUOTES, $locale['charset']) : $data;
$data = $bbcode ? parseubb($data) : $data;

If ok, i'll make the amends on Github.
OK, I'm on it.
I made those adjustments.
I made those adjustments.
Once the code editor appears entities - &lt;
&gt; is not stored inside the enrollment ...


Miss something like this (the markdown):
# Remove UTF-8 BOM and marker character in input, if present.
      $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text);

      # Standardize line endings:
      #   DOS to Unix and Mac to Unix
      $text = preg_replace('{\r\n?}', "\n", $text);

There was indented 4 spaces. And entities appear !!!


echo < p >There was indented 4 spaces. And entities appear !!! < / p >
<p>This has been indented 4 spaces.</p>

It should work even when [bbcode]
@Chan Is the problem solved?
Sample code is properly embedded here:

 * Adds a rule to
 (markdown) to translate to <code>
$mcode_count = substr_count($text, "
[code] ````"); // obtained

Solutions for manual editing of the news.
The best course would be to automatically adjust the bbCode icon #code. Seeking how?
What is the source code change?
I expressed inaccurately.
I TEXT source code that inserts + characters [code] ... [/ code].
In short - all examples of encoders encoding we want to put across to the news editor Adminiostrace.
The problem is when it saves, we parsed the bbcode become HTML already saved into SQL. That is wrong if we want to use bbcode tags in the news. [strong][underline][color][code][quote].. We store the tags as is into SQL.

The fix was simply like this:




I see, wow!
Entities are automatically entered! It works!
There is therefore no need to activate the "#", therefore it is not in the News Editor.

That surprised me! Definitely a good solution for source code examples in text documents.

We just have to put spaces before and after - for example brackets - and will be replaced as HTML entities. Who wants to emphasize that it is the code that's wrapped in <pre> ... </ pre>
Great it did help.
Thread Information
14 posts
2,514 times
Last Post
Last updated on 4 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Craig, Kvido, Chan