TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

October 06, 2024, 08:21:31 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,395
  • Total Topics: 21,244
  • Online today: 162
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 61
  • Total: 62
  • @rjen

Links not working and more

Started by Kokoro, January 29, 2023, 01:34:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kokoro

Link to my forum: http://www.animerpgs.com/
SMF version: 2.1.3
TP version: 2.2.2
Default Forum Language: English
Theme name and version: Windows XP
Browser Name and Version: Firefox 109.0 (64-bit)
Mods installed: Discord Web Hooks (2.0.1), SMFPacks Social Login (2.3.2), Discord Who's Online (1.0.1), Board Sorting Method (1.0.1), Forum Width Setting (1.2), Login Menu Button (2.0), Members Online Today (1.0), Avatars Display Integration (1.5.4), Post as Another Member (1.6), Dice Roller BBcode (2.0), SMF Post Prefix (4.1.0)
Related Error messages: (none)

I checked on the source code of my document and saw all of this.  I have redone the post, and it comes back.  See screenshot for more information.

@rjen

#1
Hi, I am not 100% what the issue is, but I suspect that you are seeing that the url's in a bbc articles are broken, after you have changed the article, that was ok at first?

This is an issue that was reported before and caused by a bug in version 2.2.2. that will incorrectly 'parse'  BBC articles after changing them.

This has been fixed in the next version of TinyPortal (2.3.0) which we hope to release soon.

The only workaround in 2.2.2 is to manually fix the broken links and save the article: the first time the link will be parsed correctly, but then chanhing the article will break them again...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

The fix involves fixing two source files..

TParticle.php
line 430

find
}
$article_data[$setting] = $value;
break;


replace
}
// BBC we need to encode quotes
if (TP_SMF21) {
if( ($_REQUEST['tp_article_type'] == 'bbc') && ($setting == 'body') ) {
$value = $smcFunc['htmlspecialchars']($value, ENT_QUOTES);
}
}
$article_data[$setting] = $value;
break;


and

TPortalAdmin.php
line 1009

find
$context['TPortal']['editing_article'] = true;
$context['TPortal']['editarticle']['body'] = $smcFunc['htmlspecialchars']($context['TPortal']['editarticle']['body'], ENT_QUOTES);
$smcFunc['db_free_result']($request);


replace
$context['TPortal']['editing_article'] = true;
if (TP_SMF21) {
if($context['TPortal']['editarticle']['type'] != 'bbc') {
$context['TPortal']['editarticle']['body'] = $smcFunc['htmlspecialchars']($context['TPortal']['editarticle']['body'], ENT_QUOTES);
}
}
else {
$context['TPortal']['editarticle']['body'] = $smcFunc['htmlspecialchars']($context['TPortal']['editarticle']['body'], ENT_QUOTES);
}
$smcFunc['db_free_result']($request);
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Just curious, as this is only displayed on the front page, would it not be better added to a front page block instead of an article? Or perhaps even a TOP/Upper/Lower/ block and just tell it to only display on the front page.

Kokoro

I may just rewrite the article/frontpage as an HTML document instead.

@rjen

Running Latest TP on SMF2.1 at: www.fjr-club.nl