Syntax Highlighter
Another day, another new module at eoinbailey.com, today it's the Syntax highlighter drupal module, which makes use of the javascript syntax highlighter library.
This module allows me to markup code in a very nice looking way, for example:
// This is a comment about this code
function trace_preprocess_page(&$variables) {
if ($variables['node']->type != "") {
$variables['template_files'][] = "page-node-" . $variables['node']->type;
}
// END OF FILE
The code above would go in a themes 'template.php' file, and with that you can now create a php file to theme each specific content type, with the name of the file being "page-node-
$(document).ready(function() {
$("#align-front-options").equalHeights();
});
The code above is javascript, and makes use of the rather handy plugin for jQuery that equalises the heights of elements contained within the container "#align-front-options".
Basically this new module is pretty cool! Also, you, the visitor to this site, can also view the code without line numbers, making it very easy to cut and paste. Just check out the buttons at the top right of each of the code boxes.



Comments
Post new comment