wrong bb-code ordered lists

Found a bug? Tell us!!
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

wrong bb-code ordered lists

Post by stm999999999 »

Code: Select all

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]
makes

Code: Select all

1. The first possible answer 
2. The second possible answer 
3. The third possible answer
and not

Code: Select all

a) The first possible answer 
b) The second possible answer 
c) The third possible answer
Ciao, Stephan
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

This is my first look at the bbCode plugin, so take this with a grain of salt.

Could be a problem with your CSS. The plugin just converts it to <ol class="bb-list-ordered,bb-list-ordered-la">. So if those aren't in your CSS, you'll just get a regular list.

Examining the plugin further, I see it attempts to provide CSS if none is already supplied. But it doesn't include the classes in question. Sounds like a problem with the plugin to me. You can try adding the following to your serendipity_event_bbplugin.php after the CSS around line 272:

Code: Select all

.bb-list-ordered-la {
    list-style-type: lower-alpha;
}
If it works, let me know, and I'll add it to the spartacus repository.
Judebert
---
Website | Wishlist | PayPal
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

I coul not add this to serendipity_event_bbplugin.php, because I am only guest at supersized.

But I add these in the head-nugget:

Code: Select all

<style type="text/css">

.bb-list-unordered li { 
color:orange;
font-size: 200%;
list-style-type: lower-alpha;
}

.bb-list-ordered li { 
color:red;
font-size: 200%;
list-style-type: lower-alpha;
}

.bb-list-ordered-la li { 
color:red;
font-size: 200%;
list-style-type: lower-alpha;
}

</style>
then I make an entry with

Code: Select all

[list]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]
ölkjklöjl
[list=a]
[*]alpha
[*]beta
[*]gamma
[/list]
ölkjklöjl
[list=1]
[*]eins
[*]zwei
[*]drei
[/list]
The result: http://mein-test.supersized.org/archives/12-sdfsdf.html

There are many problems:

first:

Code: Select all

[list]
makes an list with the class "unordered"

Code: Select all

<ul class="bb-list-unordered">
* The first possible answer 
* The second possible answer 
* The third possible answer 
</ul>
in nice, big orange letters

But the

Code: Select all

[list=a]
makes

Code: Select all

<ol class="bb-list-ordered,bb-list-ordered-la">
1. alpha 
2. beta 
3. gamma
</ol>
with NO effect on color, size or any thing, that is set in hte css.

Same on the List with =1.

It seems to me, that there could be a problem with assigning two classes to "class"?

And there is another problem:

In the bb-html-code there are three lists, each after the other, no one inlcudes a list in a list. But in the output, there comes:

Code: Select all

<ol class="bb-list-ordered,bb-list-ordered-la">
alpha 
beta 
gamma 
ölkjklöjl 
<ol class="bb-list-ordered,bb-list-ordered-d">
eins 
zwei 
drei 
</ol>
</ol>
A list opened wtih =a or =1 includes the next list, even if there is a [/list] between them :-(
Ciao, Stephan
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

You're right. That's the wrong way to specify multiple classes.

I'll work on getting that plugin updated. Expect a fix in a day or two.
Judebert
---
Website | Wishlist | PayPal
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Thanks!

But: The problem with the list in the list - is this another problem or does it relates to the multiple classes?
Ciao, Stephan
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

That's probably a problem in the regular expressions in the plugin. It probably searches incorrectly.

I'll check it out while I'm in there.
Judebert
---
Website | Wishlist | PayPal
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Okay, it's commited to SVN. Spartacus should have it in a day or so.

I tested it on my personal debugging site under 1.0-beta. The trouble with the non-alpha bullets was the bad multiple CSS class separation, as we expected. The nested lists was a bit more involved: [/list] gets translated to </ul>, which is no good for ending an <ol>. I turned all the lists to <ul>; my browser compatibility tables tell me there will be no problems with browsers newer than 4.0, but there is a small risk anyway.

While you wait for SPARTACUS and supersized.org to update, you can use [/list:o] to force a </ol>. Then your lists won't be embedded anymore. That'll still work after the update, too.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Judebert: Uhm, actually, the serendipity core and core plugins are NOT maintained via Spartacus. You'd need to install a new s9y version to get new core plugins. :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Really? I mean... yeah, of course. *cough* I knew that.

Seriously, I thought that only applied to the internal plugins (the stuff in plugin_internal.inc.php). The bbCode markup plugin is in the trunk plugin directory (serendipity_event_bbcode/). Those plugins don't get updated with spartacus, either?
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Judebert!

Jupp, those don't get updated with Spartacus, too.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Another fact learned. We'll see how long I retain this one.

Meanwhile, stm, at least there's a workaround. I don't know when or how often supersized.org updates, but I doubt this problem is significant enough to warrant an update.

For those who have access to their own files, you can get version 2.03 of the serendipity_event_bbcode.php from my server.
Judebert
---
Website | Wishlist | PayPal
Post Reply