List Info

Thread: bbcode formatting




bbcode formatting
user name
2007-08-18 11:25:00
Hi,
I am repeatedly having layout issues with the [code] and
[php] bbcode
options which, short of someone correcting something I am
doing wrong
during the input/creation on an entry with these tags, I
find is
corrected by saving the state of the line breaks when the
input is being
recoded through the bbcode plugin. can anyone confirm either
that this
diff works or am I just blowing hot air? 
I use Serendipity v.1.2-beta5 and new entries are added in
plaintext

a code entry is inserted like this:
[code]
line one of code...
line 2 of code...
line 3 of code...
[/code]

Here is what the diff does:
http://www.subnetsurfer.com/uploads/code/old_new_code.p
ng
http://www.subnetsurfer.com/uploads/code/old_new_php.png



-- 
Byron Morton | Key: 0x9843253E

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
php-blog-devs mailing list
php-blog-devslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-blog-
devs

  
Re: bbcode formatting
user name
2007-08-18 13:41:18
Hi Byron!

Actually, you should be able to fix this much more easier by
making sure that
the bbcode plugin is placed BEFORE the nl2br markup plugin
in your plugin
listing. The order of event plugins plays a role in which
markup is passed from
one to the other!

Your patch isn't wrong, but it fixes one thing, whereas
other issues with the
ordre of markup plugins would still remain. Thus I find it
better to find a way
that users can better see how the order of event plugins
affects the output?

Regards,
Garvin

<quote who="Byron Morton">
> Hi,
> I am repeatedly having layout issues with the [code]
and [php] bbcode
> options which, short of someone correcting something I
am doing wrong during the
> input/creation on an entry with these tags, I find is
corrected by saving the
> state of the line breaks when the input is being
recoded through the bbcode
> plugin. can anyone confirm either that this diff works
or am I just blowing hot
> air?  I use
Serendipity v.1.2-beta5 and new entries are added in
plaintext
>
>
> a code entry is inserted like this: [code]
> line one of code... line 2 of code... line 3 of code...
[/code]
>
>
> Here is what the diff does:
> http://www.subnetsurfer.com/uploads/code/old_new_code.p
ng
> http://www.subnetsurfer.com/uploads/code/old_new_php.png

>
>
>
> --
> Byron Morton | Key: 0x9843253E
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? 
Stop.
> Now Search log events and configuration files using
AJAX and a browser.
> Download your FREE copy of Splunk now >>
> http://get.splunk.com/_____________________
__________________________
> php-blog-devs mailing list php-blog-devslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/php-blog-
devs
>
>


-- 
++ Garvin Hicking | Web-Entwickler [PHP]    | www.garv.in |
ICQ 21392242
++ Developer of   | www.phpMyAdmin.net      | www.s9y.org

++ Make me happy  | http://wishes.garv.in


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
php-blog-devs mailing list
php-blog-devslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-blog-
devs

Re: bbcode formatting
user name
2007-08-18 17:50:50
I see!
That makes much sense. Thanks for the direction (and
correction for my
configuration). I would not have thought processing of the
inputs would
have relied on the order of plugin loading, but it does make
sense.

Yeah, Ordering. I suppose you have thought of an init-style
system? Like
assigning a numerical value to each plugin in the system, so
a pri10
would always load befora pri12 etc...? Or would that be too
much
overhead to maintain through event hooks having to check
that ordering
when calling a plugin?

What are the challenges you are considering in a controlled
plugin
loading environment? (or is this something which merely is
waiting for
some kind of documentation on the plugin management page to
state the
obvious issue of one event hook altering another events
output in a
chain)

-b
 
+++ Garvin Hicking [Sat, Aug 18, 2007 at 08:41:18PM +0200]:
> Hi Byron!
> 
> Actually, you should be able to fix this much more
easier by making sure that
> the bbcode plugin is placed BEFORE the nl2br markup
plugin in your plugin
> listing. The order of event plugins plays a role in
which markup is passed from
> one to the other!
> 
> Your patch isn't wrong, but it fixes one thing, whereas
other issues with the
> ordre of markup plugins would still remain. Thus I find
it better to find a way
> that users can better see how the order of event
plugins affects the output?
> 
> Regards,
> Garvin
> 
> <quote who="Byron Morton">
> > Hi,
> > I am repeatedly having layout issues with the
[code] and [php] bbcode
> > options which, short of someone correcting
something I am doing wrong during the
> > input/creation on an entry with these tags, I find
is corrected by saving the
> > state of the line breaks when the input is being
recoded through the bbcode
> > plugin. can anyone confirm either that this diff
works or am I just blowing hot
> > air?  I use
Serendipity v.1.2-beta5 and new entries are added in
plaintext
> >
> >
> > a code entry is inserted like this: [code]
> > line one of code... line 2 of code... line 3 of
code... [/code]
> >
> >
> > Here is what the diff does:
> > http://www.subnetsurfer.com/uploads/code/old_new_code.p
ng
> > http://www.subnetsurfer.com/uploads/code/old_new_php.png

> >
> >
> >
> > --
> > Byron Morton | Key: 0x9843253E
> >
------------------------------------------------------------
-------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?
 Stop.
> > Now Search log events and configuration files
using AJAX and a browser.
> > Download your FREE copy of Splunk now >>
> > http://get.splunk.com/_____________________
__________________________
> > php-blog-devs mailing list php-blog-devslists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/php-blog-
devs
> >
> >
> 
> 
> -- 
> ++ Garvin Hicking | Web-Entwickler [PHP]    |
www.garv.in | ICQ 21392242
> ++ Developer of   | www.phpMyAdmin.net      |
www.s9y.org
> 
> ++ Make me happy  | http://wishes.garv.in

-- 
Byron Morton | Key: 0x9843253E

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
php-blog-devs mailing list
php-blog-devslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-blog-
devs

Re: bbcode formatting
country flaguser name
Germany
2007-08-19 07:07:13
Hi Byron!

> Yeah, Ordering. I suppose you have thought of an
init-style system? Like
> assigning a numerical value to each plugin in the
system, so a pri10 would always
> load befora pri12 etc...? Or would that be too much
overhead to maintain through
> event hooks having to check that ordering when calling
a plugin?

Actually, that's not so easy, because the order of plugins
is often dependant on
which plugins are used and what the user prefers. In some
cases it does make
sense to put one plugin AFTER the other depending on what
the user wants to
achieve. Using a init-style priority system wouldn't proove
flexible enough.

An example: The Wiki plugin formats HTML code into HTML
entities. Some people
might now want to use another markup plugin that transforms
"bla" into
"<strong>bla</strong>". Now one sort
of people would like in the final output to
see the rendered, strong 'bla', while others specifically
use the wiki markup 
plugin to show the un-rendered
'<strong>bla</strong>' instead.

It might also be strange if people can adjust the order of
plugins, but they
'magically' reorder themselves?

> What are the challenges you are considering in a
controlled plugin
> loading environment? (or is this something which merely
is waiting for some kind
> of documentation on the plugin management page to state
the obvious issue of one
> event hook altering another events output in a chain)

Yeah, it might simply be missing in the documenation. But in
the german book I'm
writing right now (which hopefully gets translated to
english soon), I will be
putting my thumb on this issue. 

Regards,
Garvin

-- 
++ Garvin Hicking | Web-Entwickler [PHP]    | www.garv.in |
ICQ 21392242
++ Developer of   | www.phpMyAdmin.net      | www.s9y.org

++ Make me happy  | http://wishes.garv.in


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
php-blog-devs mailing list
php-blog-devslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/php-blog-
devs

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )