Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#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><txp:my_plugin>“test”</txp:my_plugin></pre>
will turn into:
<pre><txp:my_plugin>&#8220;test&#8221;</txp:my_plugin></pre>
I know I could have the user do:
<pre><txp:my_plugin><notextile>“test”</notextile></txp:my_plugin></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
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
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
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; into &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 <notextile> 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
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.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
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
Re: Turn off textile in a plugin
Mary, I came across your plugin in my searches and I’m having a look at it.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
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.
Offline
Pages: 1