No Line-Breaks possible in BBCode(s) in 3.2.*

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Ger »

ViolaF wrote: Fri Sep 15, 2017 10:35 am I dont want to argue, cause all what i said, i said in my last 120.000 posts.
I know from several others, that they have also this problem with no parsing
line-breaks, bbcodes, smilies in other bbcodes in 3.2.1, which works perfect
fine with 3.0.14 and 3.1.*. It cant be any css or JS, because nothing is parsed
at all within the bbcode, which works fine before...
Things change... I think you should add the BBcode in another way. However, 1 person knows the Textformatter better than anyone:
JoshyPHP wrote:Poke
@JoshyPHP: to make things easier, I made a simpler BBcode to narrow things down:

usage

Code: Select all

[tabbed]tab={TEXT1} || {TEXT2}[/tabbed]
Replacement

Code: Select all

<h3>{TEXT1}</h3><br>
<strong>{TEXT2}</strong>
Input

Code: Select all

[tabbed]tab=Heading || no
line
break
 :idea:[/tabbed]

Output

Code: Select all

<h3>Heading</h3><br><strong>no
line
break
 :idea:</strong>
Expected output

Code: Select all

<h3>Heading</h3><br><strong>no<br>
line<br>
break<br>
<img src="./images/smilies/icon_idea.gif" width="15" height="17" alt=":idea:" title="Idea" /></strong>
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by ViolaF »

Of course this looks like not near, like what i want to have.

So my request is still open:
ViolaF wrote: Thu Sep 14, 2017 8:53 pm Now the Code minimum/minified (for test-set)

To check out this bbcode you need not all bbcodes from the original instruction.
This should be enough to test.
Not important for test-set, so just for info... wrote:The {NUMBER} thing must be a unique-number,
so you can only post one tabmenu per topic-site with this test-set.
Normally an additional script gives here a number via RAND,
so i change it here (for test-set) from {NUMBER} to 33.
just in case and you do not wonder....
------------------

Instruction
BBCode wrote:BBCode usage:

Code: Select all

[tabmenue2=33]{TEXT1}###{TEXT2}###{TEXT3}###{TEXT4}[/tabmenue2]
HTML replacement:

Code: Select all

<div id="dynamicTabMenu-33" class="hidden">
	<div class="tabMenu">
		<ul id="dynamicTabMenu-33-item">
					<li id="dynamicTabMenu-33-item-0"><a onclick="dynamicTabMenu.showSubTabMenu('33','0');"> <span>{TEXT1}</span></a></li>
					<li id="dynamicTabMenu-33-item-1"><a onclick="dynamicTabMenu.showSubTabMenu('33','1');"> <span>{TEXT2}</span></a></li>
				</ul>
	</div>
	<div class="subTabMenu">
		<div class="containerHead"><div> </div></div>
	</div>
	<div id="dynamicTabMenu-33-content">
			<div class="border tabMenuContent" id="dynamicTabMenu-33-content-0">
			<div class="container-1">
{TEXT3}<div class="tabMenuBBCodeClear"> </div>
			</div>
		</div>
			<div class="border tabMenuContent" id="dynamicTabMenu-33-content-1">
			<div class="container-1">
{TEXT4}<div class="tabMenuBBCodeClear"> </div>
			</div>
		</div>
		</div>
</div>

<div class="border tabMenuContent" id="dynamicTabMenuNoScript-33">
	<div class="container-1">
			<h3>{TEXT1}</h3>
		<div class="border tabMenuContent">
			<div class="container-2">
{TEXT3}<div class="tabMenuBBCodeClear"> </div>
			</div>
		</div>
			<h3>{TEXT2}</h3>
		<div class="border tabMenuContent">
			<div class="container-2">
{TEXT4}<div class="tabMenuBBCodeClear"> </div>
			</div>
		</div>
		</div>
</div>

<script type="text/javascript">
	//<![CDATA[
	dynamicTabMenu.init('33');
	//]]>
</script>
Display on posting page:

Code: Select all

yes
Help line:

Code: Select all

Tabmenu Test (2 Tabs)
File Edit wrote:Open

Code: Select all

styles/prosilver/template/overall_header.html
Find

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
After Add

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/tabmenu.js"></script>
<link href="{T_THEME_PATH}/tabmenu.css" rel="stylesheet" type="text/css" />
--------------

Files

http://www.loaditup.de/files/841752_kp2ste65pt.zip

Upload Files from *.* to *.* (but just prosilver)

--------------

Clear all available Caches

-------------------------

Result in 3.0.14 and 3.1.*

Image

----

Result in 3.2.1

Image
kinerity wrote: Fri Sep 15, 2017 11:25 ama problem with your BBCode, not phpBB's parser.
To make it more clear: The problem is not the function of the tabmenu-BBCode itself, that works.

My problem is, that the content within the tabemenu-BBCode is not parsed (line-breaks, bbcodes, smilies),
which was correctly parsed in 3.0.14 and 3.1.*.

3.2.0 breaks the whole bbcode, when i use line-breaks within the bbcode,
3.2.1 breaks not the whole bbcode, but let the content within the tabmenu-BBcode still unparsed.

So there must be some check in the new text-formatter, which breaks html-parsing within some BBCodes.
Ger wrote: Fri Sep 15, 2017 11:36 amThings change... I think you should add the BBcode in another way. However, 1 person knows the Textformatter better than anyone:
JoshyPHP wrote:Poke
New things can also have bugs, even when it counts only for some people ;)

But i understand, those code-god's never make errors, of course...
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Ger »

But i understand, those code-god's never make errors, of course...
Urhgh...Don't you see I'm trying to help you here? :?
You might want to change your attitude.
ViolaF wrote: Fri Sep 15, 2017 11:56 am Of course this looks like not near, like what i want to have.
Of course not. That's what I mentioned, but I took the time and try to strip everything that's irrelevant for the issue to make it easier to pinpoint and fix it. Once the concept is fixed, yours will be fixed as well.

Now, take a cup of tea, be patient and wait for JoshyPHP to take a look at this. He's a nice guy and I've never found him not to respond to polite questions.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by JoshyPHP »

Ger wrote: Fri Sep 15, 2017 11:36 am @JoshyPHP: to make things easier, I made a simpler BBcode to narrow things down:
I looked at that BBCode and the issue is that extra markup like || is impossible to support fully. A regular BBCode would only have one or two spans of markup in the form [x] or [x]...[/x]. Irregular BBCodes that use custom delimiters and extra markup are partially supported but it's impossible to make them work recursively, that's why it will not convert line breaks or replace smilies.

The only way to support that kind of custom markup is via an extension, by adding custom replacements or implementing a custom parser for it. Here's a proof of concept, although that's not something I'd recommend using:

Code: Select all

$configurator = new s9e\TextFormatter\Configurator;
$configurator->BBCodes->addCustom(
	'[table #createChild=TR]{TEXT}[/table]',
	'<table><xsl:apply-templates/></table>'
);
$configurator->BBCodes->addCustom(
	'[tr #createChild=TD]{TEXT}[/tr]',
	'<tr><xsl:apply-templates/></tr>'
);
$configurator->BBCodes->addCustom(
	'[td]{TEXT}[/td]',
	'<td><xsl:apply-templates/></td>'
);
$configurator->Preg->match(
	'! +\\|\\| +(.*?)(?= +\\|\\||\\[/table\\])!i',
	'TD'
);
extract($configurator->finalize());

$text = '[table]cell1 || cell2 || cell3[/table]';
$xml  = $parser->parse($text);
$html = $renderer->render($xml);

die("$html\n");

Code: Select all

<table><tr><td>cell1</td><td>cell2</td><td>cell3</td></tr></table>
Ger wrote: Fri Sep 15, 2017 12:07 pm Urhgh...Don't you see I'm trying to help you here? :?
You might want to change your attitude.
The topic's author is already on my ignore list because I noticed a pattern of toxic behaviour.
I wrote the library that handles markup in phpBB 3.2+.
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Ger »

I see. Thanks for explaining.
JoshyPHP wrote: Fri Sep 15, 2017 12:58 pm The topic's author is already on my ignore list because I noticed a pattern of toxic behaviour.
Looking at this topic I'm not surprised.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Brf »

JoshyPHP wrote: Fri Sep 15, 2017 12:58 pm extra markup like || is impossible to support fully.
I bet -- especially when using {TEXT} tags. How would the parser know that the custom delimiter is not part of the TEXT? I cannot see how a bbcode with two consecutive TEXT tags would ever work...
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Ger »

Yeah, that's what I meant with this thing being too complicated to start with. I'd just add a wrapper [tabmenu] BBcode and than separate BBcodes for each tab, like [tab={TEXT1}]{TEXT2}[/tab], where the attribute holds the title and the content holds the tab content.

However, the TS doesn't seem to be open to suggestions...
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by RMcGirr83 »

Maybe the TS should ask on the forum where the TS got the bbcode?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by ViolaF »

RMcGirr83 wrote: Fri Sep 15, 2017 3:32 pm Maybe the TS should ask on the forum where the TS got the bbcode?
Ok, the pack hunts the individual.
No problem with this, bcs. thats my life.

The original "BBCode(!)" was pure html,
which i transformed in uncountable hours to
a really working, nice looking phpBB-BBCode,
which works perfect for many years.

3.2.* comes out and everything is over.
Uncountable forums and clients are pissed,
bcs. all was crap after the update from 3.1.* to 3.2.*

But thats funny yeah, piss on me, no prob....
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by Ger »

If all is crap, than please go and use MyBB or SMF or whatever instead of ranting here.

Several folks including myself tried to help you. All you do in return is complaining and ranting.

Bye bye
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by ViolaF »

you all are so good and i'am evil.
what a nice, clean world :D

I understand, so i must pay uncountable hours to eleminate the error-by-design.
Thanks to all, and esp. to Ger. He's a good guy, dont wonder :)
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by RMcGirr83 »

ViolaF wrote: Fri Sep 15, 2017 5:21 pm
RMcGirr83 wrote: Fri Sep 15, 2017 3:32 pm Maybe the TS should ask on the forum where the TS got the bbcode?
Ok, the pack hunts the individual.
No problem with this, bcs. thats my life.
Get over yourself, I'm not hunting anyone just telling you to seek support from 4 seven. It's his/her code after all. Whether you like that fact or not is something you have to deal with. Not me and not anyone else on here.

Toxic posts indeed.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by ViolaF »

what a greet post.
you are legend :geek:
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by david63 »

ViolaF wrote: Fri Sep 15, 2017 5:21 pm 3.2.* comes out and everything is over.
Uncountable forums and clients are pissed,
bcs. all was crap after the update from 3.1.* to 3.2.*
I think that it is bit unfair to blame anyone at phpBB for issues created by PHP changing their functionality.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: No Line-Breaks possible in BBCode(s) in 3.2.*

Post by ViolaF »

I will make an official ticket, so everything is good now.
No need to crossover :D
Locked

Return to “phpBB Custom Coding”