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.
Not a member yet? Click here to register.
Forgot Password?

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

Asked Modified Viewed 1,258 times
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
asked
Member

I have in PHPFusion 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/PHPFusion/PHPFusio...it.php#L21

I tried editing line 65 in news.php https://github.com/PHPFusion/PHPFusio...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>
 <?php
 //
Edited by zizub on 25-05-2020 21:55,
0 replies

7 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

News does not support BBcodes. Only HTML.
Btw. I recommend updating to the latest version 8.00.40.
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

Quote

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.

Quote

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.
Edited by Falk on 26-05-2020 00:21,
1 reply
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

Thanks Falk for the tip. I tried to edit this line that contains preg_split. https://github.com/PHPFusion/PHPFusio...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?
Edited by zizub on 26-05-2020 01:27,
zizub attached the following image:
Image not found
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

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.
Edited by zizub on 26-05-2020 02:38,
zizub attached the following image:
Image not found Image not found
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Try add a html_entity_decode before parsing through parseubb
0 replies
Z
zizub
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
answered
Member

html_entity_decode - also doesn't work for me.
My lines 65 and 121 in news.php now look like this:
65
$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'])))));

121
$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.
Edited by zizub on 26-05-2020 11:00,
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

https://github.com/PHPFusion/PHPFusio...s.php#L121

$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']));
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
Z
Z
zizub 10
  • Member, joined since
  • Contributed 156 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet