Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

color code script source output

0 views
Skip to first unread message

arno

unread,
Feb 24, 2009, 6:52:03 PM2/24/09
to
Hi,

I sometimes put scripts, as plain text, on the web, for easy
downloading.

However, as plain text they are a bit hard to read. I would like to
color code the source (in the browser). I was wondering if there are
any PHP tools that allow me to do that. The idea being that PHP will
parse the text/script file and output the source code as color coded
webpage. (the extension is always txt, so I would have to tell PHP
what language to expect)

I did some googling and found surprisingly little.

Do any of you know whether such a tool exists? If so, could you give
me some pointers as to where to get me started? I am primarily looking
for a tool that will allow me to color code vbscript files.

tia
arno

Curtis Dyer

unread,
Feb 24, 2009, 7:41:03 PM2/24/09
to
<arno <rnospam_AT_xs4all_DOT_nl>> wrote:
> Hi,
>
> I sometimes put scripts, as plain text, on the web, for easy
> downloading.
>
> However, as plain text they are a bit hard to read. I would like to
> color code the source (in the browser). I was wondering if there are
> any PHP tools that allow me to do that.

<snip>

> tia
> arno

Try GeSHi.

<http://qbnz.com/highlighter/>

--
Curtis
$email = str_replace('sig.invalid', 'gmail.com', $from);

arno

unread,
Feb 24, 2009, 7:53:19 PM2/24/09
to
Looks interesting, will give it a whirl, tx

arno

On Wed, 25 Feb 2009 00:41:03 GMT, Curtis Dyer <dye...@sig.invalid>
wrote:

>Try GeSHi.
>
><http://qbnz.com/highlighter/>

C. (http://symcbean.blogspot.com/)

unread,
Feb 25, 2009, 7:40:14 AM2/25/09
to
On 25 Feb, 00:41, Curtis Dyer <dye...@sig.invalid> wrote:
>  <arno <rnospam_AT_xs4all_DOT_nl>> wrote:
> > Hi,
>
> > I sometimes put scripts, as plain text, on the web, for easy
> > downloading.
>
> > However, as plain text they are a bit hard to read. I would like to
> > color code the source (in the browser). I was wondering if there are
> > any PHP tools that allow me to do that.
>
> <snip>
>
> > tia
> > arno
>
> Try GeSHi.
>
> <http://qbnz.com/highlighter/>

Or just RTFM:

http://uk2.php.net/manual/en/function.highlight-file.php

C.

C. (http://symcbean.blogspot.com/)

unread,
Feb 25, 2009, 7:41:40 AM2/25/09
to
On 25 Feb, 12:40, "C. (http://symcbean.blogspot.com/)"

Whoops - I didn't read the last line of the OP

C.

Curtis Dyer

unread,
Feb 25, 2009, 5:40:18 PM2/25/09
to

The OP mentioned wanting to highlight VBScript, which may or may not
be done satisfactorily with PHP's built-in highlighting functions.
Sorry, I snipped that portion of the OP's post.

arno

unread,
Feb 26, 2009, 5:28:26 PM2/26/09
to
GeSHi is perfect for the job, many tx
0 new messages