textile

Creating and modifying plugins.
alio

textile

Post by alio »

hello everybody, i've recently switched from WP to serendipity, but before I god used to textile "language" and i don't like WYSIWYG editors. so I've installed markup:textile plugin but it ain't working properly.

for instance: headers and paragraphs tags remain unchaned (h1., h2., ... as well as p>., p<.)

is there any way how to make it working?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: textile

Post by garvinhicking »

We might use an older version of the textile markup language, which may not support all the latest and greatest tags?

However, the textile plugin is used VERY little by Serendipity Users, and I for myself also don't use it -- so we could use someone who maintains that plugin and updates its library?

Best 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/
Guest

Re: textile

Post by Guest »

garvinhicking wrote:We might use an older version of the textile markup language, which may not support all the latest and greatest tags?

However, the textile plugin is used VERY little by Serendipity Users, and I for myself also don't use it -- so we could use someone who maintains that plugin and updates its library?

Best regards,
Garvin
which one could you recommend? :wink:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: textile

Post by garvinhicking »

Have you had a look at GeSHI? Or BBCode? Or WikiMarkup?

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/
alex100
Regular
Posts: 18
Joined: Mon Jul 24, 2006 9:58 am
Location: Cologne
Contact:

Post by alex100 »

Did someone ever update textile yet?

I am used to work with textile and regard it to be just GREAT! :D and much easier to use than anything else. F. e. with BBCode i have to type 19 characters for a list with 3 itmes. With textile i have to type 3 characters. 3:19 that is a lot :cry:

Umlautproblems (or ß) i never had with textile... publishing code with textile is a bit tricky though.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Not that I'm aware of. I don't see anything on the SourceForge.net trackers, either.

I know that all our developers are overworked right now, with some sufferring from heat exhaustion.

Care to take a stab at it? We'd love to include your solution.
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!

I must admit I never touched the textile plugin. It had an ugly bunch of functions in it that did not work within the class context of s9y plugins.

We had to take a lot of effort to rewrite the textile library so that it calls $this->... instead of the function name only.

And I'm afraid that updating will revert all of this and introduce all of the painful work again. I'd like to leave that for a developer who actually uses textile ;-)

Best 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/
alex100
Regular
Posts: 18
Joined: Mon Jul 24, 2006 9:58 am
Location: Cologne
Contact:

Post by alex100 »

garvinhicking wrote: I'd like to leave that for a developer who actually uses textile
That makes sense. Unfortunately i am no coder otherwise i would not have asked. If i ever come across someone knowing textile very well, i will ask.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Alex!

Sure, it wasn't meant towards you! I just don't want to break anything. If you happen to find somebody, I would be thrilled to work with him. :)

Best 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/
MatthiasLeisi
Posts: 3
Joined: Sat Aug 05, 2006 9:21 am
Contact:

Post by MatthiasLeisi »

judebert wrote:Care to take a stab at it? We'd love to include your solution.
OK, I did a little digging in plugins/serendipity_events_textile/textile.php. It seems that the global variables for the various regexes (regices? ;) ) were not available properly through the globals keyword.

With the following:

* add a "function myglobals()"
* call it from within "function textile()"
* replace the calls to the non-existing function "pba" with "textile_pba"

all "extras" of Textile formatting (alignment etc) work again:

Code: Select all

182a183,198
>     function myglobals() {
>       global $textile_hlgn, $textile_vlgn, $textile_clas, $textile_lnge, $textile_styl,
>           $textile_cspn, $textile_rspn, $textile_a, $textile_s, $textile_c, $textile_pnct;
>         $textile_hlgn = "(?:\<(?!>)|(?<!<)\>|\<\>|\=|[()]+)";
>         $textile_vlgn = "[\-^~]";
>         $textile_clas = "(?:\([^)]+\))";
>         $textile_lnge = "(?:\[[^]]+\])";
>         $textile_styl = "(?:\{[^}]+\})";
>         $textile_cspn = "(?:\\\\\d+)";
>         $textile_rspn = "(?:\/\d+)";
>         $textile_a = "(?:$textile_hlgn?$textile_vlgn?|$textile_vlgn?$textile_hlgn?)";
>         $textile_s = "(?:$textile_cspn?$textile_rspn?|$textile_rspn?$textile_cspn?)";
>         $textile_c = "(?:$textile_clas?$textile_styl?$textile_lnge?|$textile_styl?$textile_lnge?$textile_clas?
|$textile_lnge?$textile_styl?$textile_clas?)";
>         $textile_pnct = '[\!"#\$%&\'()\*\+,\-\./:;<=>\?@\[\\\]\^_`{\|}\~]';
>     }
>
184c200
<
---
>       myglobals();
298d313
<         $tatts = textile_pba($matches[1],'table');
299a315
>         $tatts = textile_pba($matches[1],'table');
302c318
<                 $ratts = pba($rmtch[1],'tr');
---
>                 $ratts = textile_pba($rmtch[1],'tr');
310c326
<                     $textile_catts = pba($textile_cmtch[1],'td');
---
>                     $textile_catts = textile_pba($textile_cmtch[1],'td');

Thanks,
-- Matthias
[/list]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks a lot, I just fixed this!

Best 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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: textile

Post by stm999999999 »

garvinhicking wrote:Have you had a look at GeSHI? Or BBCode? Or WikiMarkup?
GeSHI is a markup language? I found only GeSHI as a syntax highlighter!?
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

there is still a problem with textile (which seems be great! :-)) and the media library:

the library makes such code:

Code: Select all

<!--s9ymdb:152--><img width='550' height='367' style="border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/artikel/homepage-dna.png" alt="" />
The !--s9ymdb:152-- seems to be a problem, because it outputs:

<!-<del>s9ymdb:166</del>-><img width='350' heig...

So s9ymdb:166 is displayed before the image .-(


You can see, what textile makes, here:

http://rpc.textpattern.com/help/?item=intro
http://www.textism.com/tools/textile/index.php


As I see, the problem can beo solved by a little change in the code of teh library:

Not

<!--s9ymdb:152-->

but

<!-- s9ymdb:152 -->

with a space between. Is this possible?

Because textile realy seems to be nice: easy lists, <p>xx</p> around each paragraph instead of the nl2br-plugin ...



BTW: Is there any documentation for the serendipity-text-markup?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Great suggestion. Altering the s9ymdb was no problem, just committed.
BTW: Is there any documentation for the serendipity-text-markup?
I'm afraid there isn't. You would need to look into the code to get it - it was there before I came around, and I never fully understood the rules in that plugin *g*

best 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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Great suggestion. Altering the s9ymdb was no problem, just committed.
Whats about old-styled-articles? I know, to make it work with textile, I have to make the spaces in old articles by hand, but: If someone do not make this (because he do not want to use textile at all), does the patched library recognice the old style, too?

BTW: Is there any documentation for the serendipity-text-markup?
I'm afraid there isn't. You would need to look into the code to get it - it was there before I came around, and I never fully understood the rules in that plugin *g*
Oh, a little Jannis' secret? ;-)
Ciao, Stephan
Post Reply