Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2010-01-26 22:47:17

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 816
Website

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

Woef* … :)

*Thank you in doggies!

Last edited by RedFox (2010-01-27 10:07:58)

Offline

#32 2010-01-27 11:50:31

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

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

I was hoping this would allow me to create hyperlinks in <txp:link_description />, but it doesn’t seem to work. It generates <p>s, just not links. The form is…

<txp:if_different><h3><txp:link_category title="1" /></h3></txp:if_different>
<h4><txp:link /></h4>
<txp:upm_textile><txp:link_description /></txp:upm_textile>

Is that a known limitation?

Offline

#33 2010-01-27 14:05:21

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

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

No, it’s because the link description has been santized. Make use of the escape attribute.

http://textbook.textpattern.net/wiki/index.php?title=link_description

Offline

#34 2010-02-24 21:05:30

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

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

Mary wrote:

No, it’s because the link description has been santized. Make use of the escape attribute.

Sorry for not replying earlier, but I got caught up with other things.
Changing the line to the following did the trick…

<txp:upm_textile><txp:link_description escape="" /></txp:upm_textile>

You’re a darling!  :-)

Offline

#35 2010-05-08 13:58:57

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.
If I try to use <txp:upm_textile lite="1"> ... </txp:upm_textile>, the plugin returns un-Textiled content. This is probably more an issue of classTextile.php than upm_textile, as I’ve enabled the lite attribute directly on classTextile.php and I get the same results: un-Textiled content.
On the other hand, the lite="1" attribute on upm_textile_restricted seems to work fine (at least, it textiles its contents). But, as per the help, it seems that upm_textile_restricted lite="1" will also render paragraphs, which is what I’m trying to avoid (without using a leading space, of course).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#36 2010-05-08 14:16:22

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

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

lite should just do stuff like links and bold, no block type tags. If it’s not working at all, you need to verify that what the tag is receiving is actually what it’s supposed to, and not escaped entities, for instance.

And yes, restricted and lite allows for p and bq block tags.

Offline

#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