Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-06-06 02:46:51

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

> greenrift wrote:

> Well, doing the article textiling is easy to do, its just the lite mode is much harder. The “process” function mentioned earlier is this 5 page function that does everything (Dean’s classTextile is much easier to follow). I’ve figured out a really dirty hack that would work, but the directions to follow them are a little complicated (you’d have to rename a bunch of stuff).

I’m gonna keep working on it and see what I can do. Oh crap, I’ve gone and done it.

  • Download TextilePHP for TXP and put into your “/textpattern/lib/” directory, then remove the “.txt” extension.
  • Using a good text editor, like Textpad do a search on all the files in your textpattern directory that have “classTextile.php” in them.
  • Replace everything after the “include” or “include_once” on the lines that have “classTextile.php” in them, with this: “$txpcfg[‘txpath’].’/lib/’.$txpcfg[‘textile_filename’];” (no quotes around the whole thing!)
  • Open up config.php and add $txpcfg[‘textile_filename’] = ‘classTextile.textilephp.php’;

That should put you in business with TextilePHP, and actually if you want to change back to original Textile, just change the $txpcfg[‘textile_filename’] to equal ‘classTextile.php’. If someone wanted to take Markdown and make it into a PHP Class with the requirements I posted above, you would have to just change ONE line (the $txpcfg[‘textile_filename’]) to be the filename of the Markdown tool.

Do what you want with it, just don’t kill or mame anything. Tell me about any bug’s and I’ll see if I can fix them. There really shouldn’t be though.

Oh yes, last thing, the way my modified TextilePHP handles excerpt and the way Dean’s Textile does is different. Mine will allow all Textile formatting (so like headers and tables and crazy stuff) but will strip out all paragraph tags (<p>). The reason that the paragraph tags are stripped out is because when you use excerpt like Dean’s Textile wants you to use it (short, text and links only description) my version would add paragraph tags around the excerpt. This behavior is really easy to change, just comment out line #752 (use two forwardslashes (“//”) to comment out a line).

You can get all new versions at my new projects site

Last edited by greenrift (2004-06-09 16:21:09)

Offline

#14 2004-06-12 04:56:35

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: TextilePHP -- port of Choate's "Textile 2" available

Greenrift,

Do the instructions you give above still work in &gamma;1.19?

Offline

#15 2004-06-13 00:17:01

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

> Logoleptic wrote:

> Greenrift,

Do the instructions you give above still work in &#947;1.19?

Yes

Offline

#16 2004-06-22 03:12:24

greenrift
Archived Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

I have updated it to version 0.2

It fixes the problem’s Brad was having and possibly some others. Also updated to the newest version of TextilePHP (2.0.3 Jun 6).

Offline

#17 2004-07-17 01:30:15

Spiller
New Member
From: Macedonia
Registered: 2004-02-24
Posts: 5

Re: TextilePHP -- port of Choate's "Textile 2" available

Too bad it doesn’t support Amazon and Imdb links like Brad’s version on MT. Hopefully someone will incorporate those too…

Great job greenrift:)

Offline

#18 2004-07-18 18:37:42

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: TextilePHP -- port of Choate's "Textile 2" available

Spiller wrote:

Too bad it doesn’t support Amazon and Imdb links like Brad’s version on MT. Hopefully someone will incorporate those too…

If you’ve tried this and it doesn’t work, you can submit a bug report asking Jim to add this feature.

Last edited by Logoleptic (2004-07-18 18:38:07)

Offline

#19 2004-09-10 15:09:44

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

Just to add. Don’t forget to check your plugins code too. I use chh_article_custom who also includes classTextile.php.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#20 2004-09-11 18:02:33

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

greenrift,

I found a bug in the processing. Try to add [underscore]0[underscore] to an article and “Textile” it with TextilePHP v0.2. It comes out as <em></em>.

Note: The “vanilla” Textile outputs the same line as [underscore]0[underscore].

Last edited by obeewan (2004-09-11 18:03:19)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#21 2004-09-11 23:39:13

hafnius
Archived Plugin Author
From: DK
Registered: 2004-09-02
Posts: 47

Re: TextilePHP -- port of Choate's "Textile 2" available

I have just installed textilephp instead of the native textile but i have problems with the charset. i use iso-8859-1 but none of the special char we have in denmark (æ, ø, å) are getting trough correctly they all gets converted to non-readable characters.

Any ideas?


– Nobody puts Baby in the corner !
Johnny Castle, Dirty Dancing

Offline

#22 2004-09-12 00:19:52

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: TextilePHP -- port of Choate's "Textile 2" available

hafnius,

Works like a charm here with both swedish and the danish ones you listed.

Where do you use the iso-8859-1 charset, and why not the utf-8?

Did it work earlier when you had not installed TextilePHP?


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#23 2004-09-12 16:23:36

hafnius
Archived Plugin Author
From: DK
Registered: 2004-09-02
Posts: 47

Re: TextilePHP -- port of Choate's "Textile 2" available

Obeewan

“Did it work earlier when you had not installed TextilePHP?”

yes everything worked before

“Where do you use the iso-8859-1 charset, and why not the utf-8?”

i send of in the header of the page and i dont know why i dont use the utf-8 :)

i downloaded the textilephp again and now it works except for two things:

1. Local characters in capitals, ie Ø are parsed to its htmlentitie but shows in the browser like the htmlentitie. This happens regardless of the doctype charset i specify. This does not happen with ø only Ø. of course i could solve it by using the macro for Ø, ie {O/}, but that would be to cumbersome.

2. my <txp:tags> are not working anymore should i use something instead?

/Hafnius

Last edited by hafnius (2004-09-12 16:24:31)


– Nobody puts Baby in the corner !
Johnny Castle, Dirty Dancing

Offline

Board footer

Powered by FluxBB