HowTo show HTML / template code

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
User avatar
ghostrifle
Forum Members
Forum Members
Posts: 54
Joined: Wed Mar 02, 2005 11:03 pm

HowTo show HTML / template code

Post by ghostrifle »

Hey there,

I'm setting up my ghost-machinery website at present. On this site, I'm giving some examples for all the modules I've coded. That's the reason why I have to show HTML / template code etc. Is there a way to show this code by inserting it on a content page, or does anyone know a tool for LINUX which converts HTML code to HTML -formatted code ;)

Hope you understand what I mean.


Bye, ghostrifle
esmann

Re: HowTo show HTML / template code

Post by esmann »

I am not sure what you mean, but I think you want to show HTML code on the screen and wants to use the symbols "" without having the browser convert it into real code.

This is done by writing the symbols "" in this special way:

     
is written with the code >       

If you ex. wants to wite on the screen, you will have to write it like this:

</__body>
User avatar
ghostrifle
Forum Members
Forum Members
Posts: 54
Joined: Wed Mar 02, 2005 11:03 pm

Re: HowTo show HTML / template code

Post by ghostrifle »

Yeah exactly. Is there a php script, c programm or something else ? I could write it on my own but reinventing the wheel everytime sucks...

Regards, ghostrifle
raziel
New Member
New Member
Posts: 6
Joined: Sun Mar 27, 2005 10:56 am
Location: Germany

Re: HowTo show HTML / template code

Post by raziel »

Maybe this is something for you:
http://www.palfrader.org/code2html/

Or you can try to pack GeSHi (http://qbnz.com/highlighter/) into a cmsms plugin ;)
I'm currently trying to get GeSHi run with cmsms and make a highlighter plugin but it still won't work as i want it to do ;)
100rk

Re: HowTo show HTML / template code

Post by 100rk »

ghostrifle wrote: Is there a php script, c programm or something else ?
You are maybe looking for PHP functions highlight_file() or highlight_string()
;-)
Post Reply

Return to “Tips and Tricks”