Build web site

Build an own community web-site. A samurai path. A tutorial on Drupal

Saturday, December 03, 2005

Installing source code highlighting. Part 1

To add the source-code highlighting we will use the codefilter module and patch it with the geshi highlighting engine

Installing codefilter

Codefilter module formats everything between the <code></code> tags so that everything looks like nicely preformatted source code. Not that much, but we'll fix it with the Geshi coloring a bit later


Intalling codefilter is very strightforward:
1. Download the latest codefilter module (Direct link to the release 4.6.0 from 13/04/2005)

2. Copy it to your site "modules" directory


3. Visit administer->modules and enable the codefilter


4. Go to administer->"input formats" and enable codefilter in at least one input format. I did it in the default "Filtered HTML" only.


That's it, now whenever you create a new post you can surround the source code with the tags.


The resulting post will have a grey background and all the "<" and ">" characters will be displayed correctly


You are welcome to create an account on Symbian Example and try it yourself.

Next step in the web site creation will be enhancing the codefilter module to add the source code highlighting to it.

Stay tuned.

2 Comments:

At 11:07 AM, Anonymous hebiryu said...

thanks man..

I am waiting for other tutorials

 
At 11:37 AM, Blogger Artem said...

I afraid, hebiryu, there aren't going to be any new tutorials anytime soon.

This blog has been born to reflect my own learnings in Drupal and.. I don't really have big problems anymore. In fact, I would probably donate this blog to whoever would continue posting on the topic.

 

Post a Comment

Links to this post:

Create a Link

<< Home