Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] ptv_code_transform
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
Saw Dunstan Orchards article about tag redefinition and thought that this could / would be an useful plugin.
No documentation site or anything like that yet as I am still building my website. One will pop up in time.
I would like to point out that all credit for this belongs to Dunstan. I basically made some minor alterations and packaged his code. Although, find bugs, please report them to me instead and not him.
Documentation:
Provides one tag
*<txp:ptv_code_insert> </txp:ptv_code_insert>
Attribute(s)
* filename – Name of file to display. This file should ALWAYS have the ending .txt which must be omitted from the filename attribute. * download – Include a download link? (0 | 1). 1 is defaultTag content
* Tag content should contain path to file. Absolute according to webserver root or relative from current path. * Tag can also be self enclosing in which case it is assumed that the code document resides in current folder.Examples
* <pre><txp:ptv_code_insert filename=“ptv_code_transform.php”>/code</txp:ptv_code_insert></pre> * Will dsplay the file ptv_code_transform.php.txt in the directory http://www.webserver.com/code/ * <pre><txp:ptv_code_insert filename=“ptv_code_transform.php”>../code</txp:ptv_code_insert></pre> * Will dsplay the file ptv_code_transform.php.txt in parent directory * <pre><txp:ptv_code_insert filename=“ptv_code_transform.php” download=“0” /></pre> * Will dsplay the file ptv_code_transform.php.txt in current directoryExample css in the plugin.
Off to write a condition plugin…tataa.
/Borisch
Last edited by Borisch (2005-03-13 21:31:32)
Instead of conquering the world, I’m collecting it in my attic.
Offline
Re: [archived] ptv_code_transform
Searching saves time…
Offline
Re: [archived] ptv_code_transform
poo
What irritates me is that I actually did search:
http://forum.textpattern.com/search.php?action=search&keywords=code&author=&forum=-1&search_in=all&sort_by=0&sort_dir=DESC&show_as=topics
Last edited by Borisch (2005-03-13 22:42:22)
Instead of conquering the world, I’m collecting it in my attic.
Offline
Re: [archived] ptv_code_transform
it seems searching doesnt do that much at all actually.
Tried searching for
Dunstan
dunstan[wildcard]
code
code[wildcard]
And either Im blind or no hits.
What I didnt search for was [wildcard]code and [wildcard]code[wildcard] Which actually popped up the correct thread.
Anyways. The work is done and the time is wasted. Most of it writing the doc’s. Anyways, this one has support for relative/absolute directorynames (based on webroot)
Last edited by Borisch (2005-03-13 23:26:18)
Instead of conquering the world, I’m collecting it in my attic.
Offline
Re: [archived] ptv_code_transform
hi Borisch, maybe you could help contribute to the ‘searchability’ of things by posting this plugin (and any others) at the Textpattern Resources site ? ‘can’t keep up with all of them on my own, and i’m falling very far behind…
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: [archived] ptv_code_transform
Absolutely. Will do so as soon as I’m off today =)
Last edited by Borisch (2005-03-14 07:27:48)
Instead of conquering the world, I’m collecting it in my attic.
Offline
Pages: 1
Topic closed