OOC BBCODE not allowing Lists..!

Get help developing custom BBCodes or request one.
Post Reply
User avatar
RiTz21
Registered User
Posts: 205
Joined: Tue May 31, 2005 5:20 pm

OOC BBCODE not allowing Lists..!

Post by RiTz21 » Wed May 30, 2018 4:59 pm

Help!
I have a forum where Out Of Character is often used. I noticed that my current implementation of the OOC BBCODE does not allow for LIST BBCodes!

Example:

Code: Select all

[OOC][list]
[*] [b]One[/b]
[*] Two
[/list][/OOC]
Does:
BadOOC.jpg
BadOOC.jpg (6.27 KiB) Viewed 461 times
Any ideas why this isn't working? The BOLD seems fine.... Here is the relevant BBCODE for OOC:
BBCode usage

Code: Select all

[OOC title={TEXT1;optional}]{TEXT2}[/OOC]
HTML replacement

Code: Select all

<table style="width: 100%; float: left;" border="1" cellspacing="1" cellpadding="1">
	<tbody>
		<tr>
			<td><b>
			  <xsl:choose>
				<xsl:when test="@title">
					<span style="background-color: #ccffff; color: #000000;"> {TEXT1} <br /></span>
				</xsl:when>
				<xsl:otherwise>
					<span style="background-color: #ccffff; color: #000000;"> OUT OF CHARACTER <br /></span>
				</xsl:otherwise>
			  </xsl:choose>
</b>
			</td>
		</tr>
		<tr>
				<td bgcolor="#FFE5BA" width="100%"><span style="background-color: #ffe5ba;">{TEXT2}</span></td>
		</tr>
	</tbody>
</table>
<p>&nbsp;</p>
Help line

Code: Select all

[OOC=Optional title]Out of Character Text[/OOC]
THANKS for any help you can provide!!!
RiTz21
Image

User avatar
Ger
Recognised Extension Developer
Posts: 1659
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: OOC BBCODE not allowing Lists..!

Post by Ger » Wed Jun 06, 2018 10:05 am

I would think the issue is that <ol> is a block level element that you nest within a <span>, being an inline element. That's not allowed in HTML.

You can try to remove the span and add your style to the td:

Code: Select all

<table style="width: 100%; float: left;" border="1" cellspacing="1" cellpadding="1">
	<tbody>
		<tr>
			<td><b>
			  <xsl:choose>
				<xsl:when test="@title">
					<span style="background-color: #ccffff; color: #000000;"> {TEXT1} <br /></span>
				</xsl:when>
				<xsl:otherwise>
					<span style="background-color: #ccffff; color: #000000;"> OUT OF CHARACTER <br /></span>
				</xsl:otherwise>
			  </xsl:choose>
</b>
			</td>
		</tr>
		<tr>
				<td width="100%"  style="background-color: #ffe5ba;"><span>{TEXT2}</td>
		</tr>
	</tbody>
</table>
<p>&nbsp;</p>
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:
-Available for custom work-

User avatar
RiTz21
Registered User
Posts: 205
Joined: Tue May 31, 2005 5:20 pm

Re: OOC BBCODE not allowing Lists..!

Post by RiTz21 » Wed Jun 06, 2018 12:34 pm

I made the changes you proposed and tested the list inside the OOC.
I still get the same issue...

Is this a case where I need to 'refresh' something for the changed BBCODE to work?

Many thanks for helping out!!!
RiTz21
Image

User avatar
Ger
Recognised Extension Developer
Posts: 1659
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: OOC BBCODE not allowing Lists..!

Post by Ger » Wed Jun 06, 2018 1:19 pm

RiTz21 wrote:
Wed Jun 06, 2018 12:34 pm
I made the changes you proposed and tested the list inside the OOC.
I still get the same issue...

Is this a case where I need to 'refresh' something for the changed BBCODE to work?

Many thanks for helping out!!!
RiTz21
It will only work with either new messages or edited messages where there is a significant change leading to a different message checksum causing the message to be reparsed.

But I made an error I see. I've tested now with this replacement:

Code: Select all

<table style="width: 100%; float: left;" border="1" cellspacing="1" cellpadding="1">
	<tbody>
		<tr>
			<td style="background-color: #ccffff; color: #000000;"><b>
			  <xsl:choose>
				<xsl:when test="@title">
					{TEXT1} <br />
				</xsl:when>
				<xsl:otherwise>
					OUT OF CHARACTER <br />
				</xsl:otherwise>
			  </xsl:choose>
</b>
			</td>
		</tr>
		<tr><td width="100%"  style="background-color: #ffe5ba;">{TEXT2}</td></tr>
	</tbody>
</table>
<p>&nbsp;</p>
When I post this message, it works for me:

Code: Select all

[OOC=ME is me]
[list=1][*]One
[*]Two
[*]Trio[/list]
[/OOC]
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:
-Available for custom work-

User avatar
RiTz21
Registered User
Posts: 205
Joined: Tue May 31, 2005 5:20 pm

Re: OOC BBCODE not allowing Lists..!

Post by RiTz21 » Wed Jun 06, 2018 4:00 pm

It works!!!

THANK YOU Sir !

RiTz21
Image

User avatar
Lumpy Burgertushie
Registered User
Posts: 64837
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: OOC BBCODE not allowing Lists..!

Post by Lumpy Burgertushie » Wed Jun 06, 2018 4:29 pm

there are days that can be humbling.
I have read this topic several times and still have no idea what in the world any of it is talking about. apparently there is a lot more to bbcode than I have ever heard of . It is like I stumbled into a topic written in russian or something.

:oops: :oops:

rob ert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
RiTz21
Registered User
Posts: 205
Joined: Tue May 31, 2005 5:20 pm

Re: OOC BBCODE not allowing Lists..!

Post by RiTz21 » Wed Jun 06, 2018 6:26 pm

Lumpy Burgertushie wrote:
Wed Jun 06, 2018 4:29 pm
there are days that can be humbling.
I have read this topic several times and still have no idea what in the world any of it is talking about. apparently there is a lot more to bbcode than I have ever heard of . It is like I stumbled into a topic written in russian or something.

:oops: :oops:

rob ert

HEHHE Well here is a small explanation: The forum hosts Play By Post games, where people play their Characters (If you dunno what an RPG is, you can google it!) - So there are times where the players want to ask something to the Game Master - thus they can use the OOC bbcode which stands for Out Of Character (meaning it is the players asking - and not the Character he's playing!) - it is a bbcode to allow the distinction between the Player and his character...

Does this explains a bit?

RiTz21
Image

User avatar
Lumpy Burgertushie
Registered User
Posts: 64837
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: OOC BBCODE not allowing Lists..!

Post by Lumpy Burgertushie » Wed Jun 06, 2018 6:54 pm

yep, it helps. yes I know what RPG means. as a matter of fact, I played one of the first PC based RPGs back in the early 80s
no graphics, just text in DOS. no instructions because it was a game created in house at Xerox back when they came out with one of the very first PCs.

you had a cabin in the old west. you had a door, a window, a rifle on the wall and bad guys/indians coming to kill you.

you just had to make up stuff to type in to see if it was actually part of the program. After that, I played a game similar to pacman.

all of this came on 8 inch floppy disks. the PC itself had a huge hard drive of 20MB, something like 64KB of ram, no mouse, etc. etc.

ah , the good old days.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
RiTz21
Registered User
Posts: 205
Joined: Tue May 31, 2005 5:20 pm

Re: OOC BBCODE not allowing Lists..!

Post by RiTz21 » Wed Jun 06, 2018 7:22 pm

Lumpy Burgertushie wrote:
Wed Jun 06, 2018 6:54 pm
yep, it helps. yes I know what RPG means. as a matter of fact, I played one of the first PC based RPGs back in the early 80s
no graphics, just text in DOS. no instructions because it was a game created in house at Xerox back when they came out with one of the very first PCs.

you had a cabin in the old west. you had a door, a window, a rifle on the wall and bad guys/indians coming to kill you.

you just had to make up stuff to type in to see if it was actually part of the program. After that, I played a game similar to pacman.

all of this came on 8 inch floppy disks. the PC itself had a huge hard drive of 20MB, something like 64KB of ram, no mouse, etc. etc.

ah , the good old days.

robert
Ah you're reminding me of the "zork' text games back in the days!!! (i.e. in the late 80's ...)
Well, table top RPGs (with friends at a table) are awesome!! Been playing Dungeons & Dragons for decades, and I'm taking my dice to my grave (even that annoying d20, which rolls too many 1's !!)
Image

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: nascimento.rapha and 7 guests