You are not logged in.
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
Version: 0.3
Name: glx_code
Hi!
I have made a txp plugin of Dunstans code presentation php code that is demonstrated here
Here is an example from my own site.
dont forget to make a /code folder to place your code txt files in.
Edit: new version
Last edited by osei (2005-01-18 09:20:19)
Johan Nilsson
Offline
Hey I just noticed that it doesn’t recognize comments that use ‘#’.
EDIT
Add this line near the comment type definitions:
<pre>$pound_pos = strpos($line, "#");</pre>
Change this line about 10-15 lines past that,
FROM:
<pre>// if its a single line comment
if (($slashslash_pos===0) || ($apos_pos===0))</pre>
TO:
<pre>// if its a single line comment
if (($slashslash_pos===0) || ($apos_pos===0) || ($pound_pos===0))</pre>
Last edited by compooter (2004-10-06 17:48:19)
Offline
ahh thanks compooter, ive updated the plugin with your code hope thats okey, link is found in the first post.
Last edited by osei (2004-10-06 20:29:00)
Johan Nilsson
Offline
hi, being a bit thick and not being able to understand languages like swedish, I can’t get it to work…
i have a made a code folder inside my site folder and a txt file called 1.txt. the tag i am using in my article looks like:
txp:code file=“1”
but nothing shows up in the browser – any one got any ideas?
Last edited by domfucssion (2004-10-26 18:33:16)
Offline
Try:
<code><txp:glx_code file=“1” /></code>
instead of:
<code><txp:code file=“1” /></code>
D’oh! ;-)
Last edited by compooter (2004-10-26 18:46:24)
Offline
thanks compooter, that got it working, cheers
Offline
oops… my bad here, the example in the plugins documentation says it should be <code><txp:code file=“1” /></code> but ofcourse like compooter says it should be <code><txp:glx_code file=“1” /></code>
The plugin has now been updated with a correct example. sorry.
edit: haha i did it again (typed wrong)
Last edited by osei (2004-10-27 07:17:55)
Johan Nilsson
Offline