Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-21 21:05:10

kadis
New Member
Registered: 2005-08-11
Posts: 3

Turn off textile in a plugin

I’ve searched and searched and I can’t seem to find an answer, so I decided to post, sorry if this is a duplicate.
Is there a way to turn off textile within a plugin?
e.g.
<pre>&lt;txp:my_plugin&gt;“test”&lt;/txp:my_plugin&gt;</pre>
will turn into:
<pre>&lt;txp:my_plugin&gt;&amp;#8220;test&amp;#8221;&lt;/txp:my_plugin&gt;</pre>
I know I could have the user do:
<pre>&lt;txp:my_plugin&gt;&lt;notextile&gt;“test”&lt;/notextile&gt;&lt;/txp:my_plugin&gt;</pre>
but is there a way to make it so the user doesn’t have to do that? I want my plugin to be as simple as possible.

Offline

#2 2005-08-21 21:11:58

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: Turn off textile in a plugin

You can turn off textile for an article. It is just a little checkbox in the options on the left, or you can turn it off by default in the preferences. I don’t understand why you want a plugin to do this.

Offline

#3 2005-08-21 22:07:28

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: Turn off textile in a plugin

I think what he wants is to leave Textile on for the site, and for articles, but be able occasionally to drop in this tag and not have Textile parse its contents. That’s a valid concern, and I’d be interested to see if there’s a solution.

Last edited by ubernostrum (2005-08-21 22:07:49)


You cooin’ with my bird?

Offline

#4 2005-08-21 22:29:24

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: Turn off textile in a plugin

I think it would be better if something was included into Textile itself to completely stop marking code between certain signs. I’ve often wanted to use the windows slash “\” to cancel Textile from changing an asterisk into the strong tag.

Last edited by paularms (2005-08-21 22:30:19)

Offline

#5 2005-08-22 00:07:55

kadis
New Member
Registered: 2005-08-11
Posts: 3

Re: Turn off textile in a plugin

I think ubernostrum gets it but I better explain the purpose of my plugin. It uses the built in PHP functions to highlight given PHP strings. By doing so it also converts html characters into their entities (e.g. a &amp;amp; into &amp;amp;amp;), thus the entities are converted twice which creates odd results. I would like to turn off (via php) textile when some text is in between my plugin tags. This would eliminate the need for a user to use the &lt;notextile&gt; tags when using my plugin.

If it isn’t already possible, consider this my request for doing so. :D (if it’s possible)

I hope this makes my request clearer.
Thank you ahead of time for your response!

Last edited by kadis (2005-08-22 00:08:37)

Offline

#6 2005-08-22 00:53:12

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

Re: Turn off textile in a plugin

Yeah, its still a Textile thing. The markers for “no Textile” don’t work.

Offline

#7 2006-09-15 18:02:58

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Turn off textile in a plugin

kadis, did you ever your plugin to turn off textile?

I just ran into a similar situation and have been searching the forums and Textbook for an answer.

Offline

#8 2006-09-15 21:10:43

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

Re: Turn off textile in a plugin

It’s not possible to “turn off” Textile after the fact, short of writing a new class to convert Textiled text back into (X)HTML. It’s for that reason I wrote this (a much simpler way to go about it).

Offline

#9 2006-09-15 21:47:21

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Turn off textile in a plugin

Mary, I came across your plugin in my searches and I’m having a look at it.

Offline

#10 2006-09-16 02:33:58

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: Turn off textile in a plugin

@kadis:

It seems like you’re looking for a plugin to hilight PHP code, eh? Have you checked out this ?

I think this will take care of what you’re looking to do.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

Board footer

Powered by FluxBB