#1 2004-09-05 15:24:23

osei
Plugin Author
êta
Real name: Johan Nilsson
From: Stockholm, Sweden
Website

[archived] glx_code: Dunstans code presentation

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

 

#2 2004-09-05 15:54:19

Andrew
Plugin Author
xi
Real name: Mr. Andrew
From: California
Known languages: en, es
Website

Re: [archived] glx_code: Dunstans code presentation

That is definitely a good idea/implementation. Nice work. Color-coding would be a nice addition, but that is a much bigger endeavour.

Offline

 

#3 2004-09-05 18:10:58

ramanan
Plugin Author
iota
Real name: Ramanan Sivaranjan
From: Toronto
Website

Re: [archived] glx_code: Dunstans code presentation

Beautiful! Well done. I’m going to start using this right now.

Offline

 

#4 2004-10-06 17:42:06

Andrew
Plugin Author
xi
Real name: Mr. Andrew
From: California
Known languages: en, es
Website

Re: [archived] glx_code: Dunstans code presentation

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

 

#5 2004-10-06 20:28:34

osei
Plugin Author
êta
Real name: Johan Nilsson
From: Stockholm, Sweden
Website

Re: [archived] glx_code: Dunstans code presentation

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

 

#6 2004-10-06 20:29:41

Andrew
Plugin Author
xi
Real name: Mr. Andrew
From: California
Known languages: en, es
Website

Re: [archived] glx_code: Dunstans code presentation

thx!

Offline

 

#7 2004-10-26 18:32:50

domfucssion
Plugin Author
gamma

Re: [archived] glx_code: Dunstans code presentation

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

 

#8 2004-10-26 18:46:12

Andrew
Plugin Author
xi
Real name: Mr. Andrew
From: California
Known languages: en, es
Website

Re: [archived] glx_code: Dunstans code presentation

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

 

#9 2004-10-26 18:55:31

domfucssion
Plugin Author
gamma

Re: [archived] glx_code: Dunstans code presentation

thanks compooter, that got it working, cheers

Offline

 

#10 2004-10-26 20:38:43

osei
Plugin Author
êta
Real name: Johan Nilsson
From: Stockholm, Sweden
Website

Re: [archived] glx_code: Dunstans code presentation

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

 

Powered by PunBB
© Copyright 2002 – 2005 Rickard Andersson