Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-29 19:54:39

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

[textile] Textile 2.5 and beyond

Hello folks,

The next release of textile (v2.5) is going to see a cleanup of some of the internal functions in textile and with the increased support for PHP5.3 I intend moving it towards PSR-0 compatibility (probably in a parallel branch) shortly afterwards.

To facilitate textile’s uptake in other projects I’d also like to consider moving it towards PSR-1 but need to know what use, if any, people are making of the defines used by textile to customise various glyphs/functionality that it provides. I know that textpattern itself uses the hu define and that textile, being a conjoined twin, uses this internally so that’s 1 point at which the code in both twins needs surgery to fix but I need to know if there are any more or if you are all using textile in exactly it’s default configuration with respect to defines.

Thanks in advance.


Steve

Offline

#2 2012-12-04 23:02:37

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Textile 2.5 and beyond

As a follow-up to the above, and just in case anyone around here is aware of any installations that might be impacted, please note: I also intend to bring textile into the PHP5.2+ world by dropping its compatibility with PHP4’s way of doing Object Orientation. This should only impact your installation if you are calling any methods in textile other than the constructor method, TextileThis() and TextileRestricted() or accessing any of the class variables directly. I intend to make all the other currently existing methods and class variables protected or private.

In summary: textile is changing, starting with v2.5 If you use it independently of textpattern, be aware that your usage will be impacted if…

  1. you are calling any methods in textile other than the constructor method, TextileThis() and TextileRestricted().
  2. you are accessing any of the class member variables. These will all become either protected or private.
  3. you are have a define called hu setup before you construct any textile object (Textpattern itself does do this.) From v2.5 you will need to call a public set method to setup the image path prefix instead of having textile pick it up via this define behind the scenes.
  4. you use any of the existing txt_ defines listed here. If you are, you will need to start using setSymbol() prior to calling TextileThis() or TextileRestricted() and drop these defines as textile will no longer be using them.

Steve

Offline

#3 2012-12-05 00:32:59

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [textile] Textile 2.5 and beyond

Erm, the fact that I post here should not imply that I’m fancying myself as this topic’s target group :)

But I want it to not completely stay like this: Where can I read about defines? I searched across the Textile forum and via Block level Textile plugins finally got here. Is that the right spot?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2012-12-05 00:41:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [textile] Textile 2.5 and beyond

Sorry, for my eyes the link in post #2 apparently hid itself a little too much in code blocks. But although I also came across these incidences of the term define in my research, I couldn’t imagine what I can do with these, i.e. I can’t really read code, only as much as it contains spoken language. Is there some documentation available?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2012-12-05 01:13:35

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Textile 2.5 and beyond

Hi uli and thanks for the responses. The defines I’m talking about here are ones someone might use if they wanted to change what character were used for something like the Copyright symbol in textile (or other symbols like those listed here). Basically you’d need a plugin for textpattern (or some PHP code somewhere) that actively did something like…

define('txt_copyright', '®');

…before textile was loaded. If the above were to happen then textile would use your defined entity as a replacement for it’s copyright glyph. (c)

If you’re not doing anything like that in your TxP installations you probably don’t need to spend any time on this stuff.


Steve

Offline

Board footer

Powered by FluxBB