Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2010-05-08 15:02:46

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

Hi Mary. Thanks for the prompt reply.

The content fed to upm_textile is escaped.
In fact, upm_textile will textile the content if the lite="1" parameter is not present. In other words, feeding the same content, upm_textile will textile it, while upm_textile lite="1" won’t textile it, returning just the raw content.

My goal is: to textile a chunk of text (an image caption), including breaklines, but avoid generating any block wraptags.

So, I was expecting something like this:

<txp:upm_textile lite="1">*Cool* photo.
Photo by "this guy":http://www.thisguy.com</txp:upm_textile>

to return just:

<strong>Cool</strong> photo. <br /> 
Photo by <a href="http://www.thisguy.com">this guy</a>

As you can see, I expect the output not to include any wrapping block tags (p in this case), and that’s why I’m trying to enable lite version. Adding a leading blank space won’t help here, as I expect also to “textile” breaklines into <br />.

<txp:upm_textile_restricted lite="1"> would be an option if it would remove p and bq tags, but that’s what I expect to do with just <txp:upm_textile_restricted lite=“1”> <txp:upm_textile lite=“1”> (currently broken…).

Edit: fixing typos

Last edited by maniqui (2010-05-08 17:38:46)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#38 2010-05-08 15:57:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

It could very well be that Textile was changed in how it works – the plugin was last updated in May 2007.

Offline

#39 2010-05-08 17:44:17

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

What seems to be broken is Textile itself, not your plugin. More precisely, Textile seems to be broken when lite parameter is true, and only on the TextileThis, not on the TextileRestricted function.
Both seems to call the function block if lite is true, algthough TextileRestricted uses some kind of wrapper around that function, and probably that’s related to why it works on upm_textile_restricted but not on upm_textile.

Thanks anyway, Mary!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#40 2010-06-14 18:26:27

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

I have a created a custom_field and the value of the form is <txp:output_form form="myFunkyForm">plusExtraContents</txp:output_form>

I believe this plug should allow me to parse the contents but it just outputs the unparsed string?

<!-- contents of custom_field -->
<txp:upm_textile_restricted parse_tags="1">
    <txp:output_form form="-body-single-form">
        Plus more textpattern yielded stuff and lots of html tags
    </txp:output_form>
</txp:upm_textile_restricted>

I am using 4.2. Am i missing something?

Last edited by Timid&friendly (2010-06-14 18:30:41)


I think, therefore I AM, … … er … I think :-?

Offline

#41 2010-06-15 08:58:06

woof
Member
Registered: 2004-08-01
Posts: 128

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

Try adding escape="" to your custom field tags

See here for detail

edit: fixed my stupid typo :)

Last edited by woof (2010-06-15 19:20:25)

Offline

#42 2010-06-15 17:50:43

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: [plugin] [ORPHAN] upm_textile: Parse any text with Textile.

That was it. Thx! Though it is wierd because i already read the whole thread and of course tried that????

In the end i used the <txp:upm_textile > tag and escape="" without the white space.


I think, therefore I AM, … … er … I think :-?

Offline

Board footer

Powered by FluxBB