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.

Links [URL] and [IMG] on the php-fusion 8.00.23 news page

I have in PHP-Fusion 8.00.23, BBcode does not work in the news.
I do not know how it should be, maybe they should not work by default, and I need to edit the files.
There is bbcode_include.php in submit.php https://github.com/php-fusion/PHP-Fus...it.php#L21

I tried editing line 65 in news.php https://github.com/php-fusion/PHP-Fus...ws.php#L65
I added parseubb. Did so:
nl2br(parseubb(stripslashes($data['news_news']))) : parseubb(stripslashes($data['news_news']))));

This does not work for me. How to make html BBcode Url and Img work in the news?
In the Admin panel, I turned on the BBcode URL, it was previously disabled for me. Maybe I still need somewhere to turn it on?
For the test, I use this code:
<p>[ URL=http://vfl.ru/fo tos/2b0ebb3f29586832.html ][ IMG ]http ://images.vfl. ru/ii/1581787026/2b0ebb3f/29586832_m. png[ /IMG ][ /URL ]</p>

News does not support BBcodes. Only HTML.
Btw. I recommend updating to the latest version 8.00.40.


Btw. I recommend updating to the latest version 8.00.40.

I know about elFinder vulnerability and new improvements. But at the moment, it’s easier for me to restore the site from the backup if a hacking occurs than to update now.


News does not support BBcodes. Only HTML.

Very sorry. I wanted to try the old Polarfox development, BBcode URL redirection http://unlogic.info/forum/viewthread....p;pid=1018
I need coding of links for the ad unit that I wanted to show in the news and articles.
in news.php, you can add parseubb to
 $news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));

Thanks Falk for the tip. I tried to edit this line that contains preg_split. https://github.com/php-fusion/PHP-Fus...s.php#L121 To no avail.
Now I found that in my Administration / BBcode section, [Url] does not work there either.
I have never tested it in this section.
In this section, does the [Url] check work for you, or is it just me?
zizub attached the following image:
I figured out BBcode in the admin panel, validation now works well. This mistake was on my side.
But in the news, [Url] still doesn't want to work.
I try two methods for inserting links. 1 - I create a panel with html code. 2 - I insert the html code into the news.php file
All without result.
zizub attached the following image:
bbcodeer.jpg bbcodes.jpg
Try add a html_entity_decode before parsing through parseubb
html_entity_decode - also doesn't work for me.
My lines 65 and 121 in news.php now look like this:
$news_news = preg_replace("/<!?--\s*pagebreak\s*-->/i", "", ($data['news_breaks'] == "y" ? nl2br(html_entity_decode(parseubb(stripslashes($data['news_news'])))) : html_entity_decode(parseubb(stripslashes($data['news_news'])))));

$news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(html_entity_decode(parseubb(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])))) : html_entity_decode(parseubb(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']))));

In the news itself, a link like [URL] works. If I paste into a text editor, through the Admin / Add News panel.

$data['news_extended'] = html_entity_decode(parseubb($data['news_extended']), ENT_QUOTES, 'UTF-8');
$data['news_news'] = html_entity_decode(parseubb($data['news_news']), ENT_QUOTES, 'UTF-8');
$news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));

Thread Information
9 posts
307 times
Last Post
Last updated on 6 months 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: Falk, Chan, zizub, RobiNN