Thread: Commenting code
View Single Post
Old 05-23-2008, 08:17 AM   #5 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

I'm fairly simple with comment, I use it allot but just to make it quicker to understand for myself if i havent touched the code in months.

This is how I commented my blog frontpage:

PHP Code:
<?php

////////////////////////////////////////////////////////////////////
//
// Jimnet blogging system
// By Jimmy Bokhove, Minna Media <xxx>
//
// Create a blog by template
//
////////////////////////////////////////////////////////////////////

// Get Configs
require_once('config/sql.conf.php');
require_once(
'config/default.conf.php');

// Get functions
require_once('geshi.php');
require_once(
'function/default.func.php');
require_once(
'function/bbcode.func.php');

// Get classes
require_once('class/template.class.php');
require_once(
'class/blog.class.php');

// Loop blogs
$blogContent loop_posts(configNoPostFP());

// Create new template
$template = new template('main.tpl');

// Set template contents
$template->set('i_title''Jim\'s blog');
$template->set('i_description''Jim Bokhove\'s weblog');
$template->set('i_keywords''jim, jimmy, bokhove, weblog, blog');
$template->set('i_language''english');

// Main content (blogs)
$template->set('i_content'$blogContent);

echo 
$template->parse();

?>
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote