Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-04 01:16:52

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

History:

So the current state of affairs is that original TextilePHP modder, greenrift is no longer hosting his hacked version of TextilePHP. Furthermore, the mod instructions are rather imprecise and missing some critical steps.

I really dig Textile, but have found it unsuitable for posting HTML and PHP snippets (something I plan to do a lot of in my new development blog). Brad’s Textile2 helps quite a bit, but it’s difficult to integrate with TextPattern. So I’m taking it upon myself to see if I can extend TextilePHP without any horrible hacks, to more easily be used as an alternative to the built-in classTextile.php that comes with TextPattern. I’m hoping Jim Riggs will take my patches back into the main TextilePHP tree so we don’t get yet another Textile fork, but at any rate I’ll keep everyone here posted on my progress (or if I decide to give up).

The one new feature that I want to add is PHP syntax highlighting. Given the Textile2 Syntax, I’m wondering how you guys think PHP code blocks should be specified. Currently my only idea is bcphp. (bc. stand for blockcode). Anyone have any other thoughts?


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

#2 2005-10-04 02:40:14

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

You might like to take a look at classMarkup.php, in the crockery branch.

We plan on improving the built-in Textile in future, but it’s unlikely we’ll switch to the Textile2 codebase – it’s far too big and complex.


Alex

Offline

#3 2005-10-04 02:49:01

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

Yeah, it’s kind of big and crazy. I’m retrofitting the TextileThis function into it so it can be dropped into Textpattern relatively seamlessly. So far I’ve implemented the actual prefs (ie. lite, strict, etc), but only further investigation will reveal if their functionality can be approximated without mangling things too much.

The original classTextile code is much easier to follow and has a nice modularity to it. The TextilePHP code is much better commented, but is a beast to work with. Anyway, though, I like the Textile2 features enough to at least get it functioning at a basic level.


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

#4 2005-10-04 03:19:47

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

By the way, what exactly is the purpose of the ‘strict’ parameter to TextileThis()? As far as I can tell it is not used throughout the current 4.0.1 codebase… the functionality looks a little troublesome to replicate in TextilePHP so I’m leaving it alone, but is it just meant for third-party use of classTextile?


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

#5 2005-10-04 04:34:22

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

I’m retrofitting the TextileThis function into it so it can be dropped into Textpattern relatively seamlessly.

classMarkup.php is intended to make that easy and complete.


Alex

Offline

#6 2005-10-04 05:28:47

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

I see that classMarkup abstracts the libraries/functions for marking up text, but wouldn’t I then have to change the TextPattern source in numerous places to make use of this API? Creating a replacement function TextileThis() just seems easier.


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

#7 2005-10-04 08:23:47

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

Okay, I hacked the hell out of TextilePHP and now have it working in TextPattern 4.0.1 with PHP syntax hiliting!

However, I’m still waiting to hear back from Jim Riggs as to whether he wants my patch or not. I’ll give him a day or two before posting my own copy. I’ll also update the mod instructions on textpattern.org.


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

#8 2005-10-05 00:22:52

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

I see that classMarkup abstracts the libraries/functions for marking up text, but wouldn’t I then have to change the TextPattern source in numerous places to make use of this API?

That’s what we’re planning on doing. Help is always welcome.


Alex

Offline

#9 2005-10-05 07:45:05

alice_c
Plugin Author
From: Karlsruhe, Germany
Registered: 2004-07-03
Posts: 33

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

there are some more ;)

Last edited by alice_c (2005-10-05 07:45:42)

Offline

#10 2005-10-05 16:41:01

jiblet
Member
From: Santa Fe, NM
Registered: 2004-02-26
Posts: 10
Website

Re: Brad Choate Textile 2 & Jim Riggs TextilePHP Development.

Thanks for the link. I’ve got TextilePHP pretty well dialed in now. The code is 3 times as long as regular classTextile, and quite a bit harder to understand (though the API is well-documented, which is something), but the extreme modularization of the whole thing makes it easier to add features. Now that I understand the codebase I’m suitably impressed and I’ll probably stick with it.

zem – I’m just now getting into the guts of Textpattern. If I have some time I might be interested in contributing, but I’m hesitant to jump right without knowing what the plan is. I’m kinda busy right now, but i’ll be in touch.


[url=“http://templation.websaviour.com/”]Templation • Design Management System[/url]

Offline

Board footer

Powered by FluxBB