Page 1 of 1

wrong bb-code ordered lists

Posted: Thu Apr 20, 2006 8:16 pm
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

Posted: Fri Apr 21, 2006 2:53 am
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.

Posted: Sat Apr 22, 2006 2:41 pm
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 :-(

Posted: Sun Apr 23, 2006 5:52 pm
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.

Posted: Sun Apr 23, 2006 5:59 pm
by stm999999999
Thanks!

But: The problem with the list in the list - is this another problem or does it relates to the multiple classes?

Posted: Sun Apr 23, 2006 6:03 pm
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.

Posted: Sun Apr 23, 2006 10:54 pm
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.

Posted: Sun Apr 23, 2006 11:01 pm
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

Posted: Sun Apr 23, 2006 11:26 pm
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?

Posted: Mon Apr 24, 2006 10:27 am
by garvinhicking
Hi Judebert!

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

Regards,
Garvin

Posted: Mon Apr 24, 2006 4:34 pm
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.