Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] ptv_code_transform

#1 2005-03-13 21:18:39

Borisch
Archived Plugin Author
From: Sweden
Registered: 2004-05-30
Posts: 15
Website

[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.

Download

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 default

Tag 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 directory

Example 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

#2 2005-03-13 21:36:27

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [archived] ptv_code_transform

Searching saves time…

glx_code

Offline

#3 2005-03-13 22:41:26

Borisch
Archived Plugin Author
From: Sweden
Registered: 2004-05-30
Posts: 15
Website

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

#4 2005-03-13 22:49:56

Borisch
Archived Plugin Author
From: Sweden
Registered: 2004-05-30
Posts: 15
Website

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

#5 2005-03-14 00:25:16

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

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

#6 2005-03-14 07:27:20

Borisch
Archived Plugin Author
From: Sweden
Registered: 2004-05-30
Posts: 15
Website

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

  1. Index
  2. » Archives
  3. » [archived] ptv_code_transform

Board footer

Powered by FluxBB