My personal home page is at http://alerque.com '''My Work''' I am a geek. I collect programming languages llike some people collect stamps on their passports. PHP, Perl, SH, Python, C, C++, ASP, Cold Fusion, Rebol, and GTK to name a few. I like php syntax, perl regular expressions, and I generally have more fun with interpreted languages than compiled ones. I do a variety of things with my knowledge -- design websites, build databases, write automation software, do security auditing, statistical analysis, and design user interfaces. I can also take any of the above and find a way to connect them to each other and make them work together. I am also a freelance architect and am proficient with several CAD packages. I have designed and drawn everything from starter homes to multi-million dollar resort homes as well as day care centers, retail spaces, industrial buildings, cabins and out-houses. '''My Faith''' ''For God demonstrated his love for us in this, that while we were still sinners, Christ died for us.'' What a great and precious gift that was! ''He has died as a ransom to set us free from sin. '' ---- God bless you, bro! "NO JESUS, NO PEACE. Know Jesus, Know Peace." BrucePennington ---- '''Links''' WikiEngines ---- Check out the (new) UserfiedWiki project at http://userfied.wiki.devel.org ---- Eventually I'ld like to post some examples of my work here, but for now there is just one of interest. I am currently working on a new PHP wiki engine called IWiki designed to be embeded in any existing page template system. It isn't designed to be the most advanced Wiki around, but to be one of the simplest to use and install in an already implemented site structure. It is all built inside a class and each method can be called independently of the others. Simply include the library in your scripts, then call each function at the appropriate places, for example $iwiki->toolbar(); and $iwiki->body(); and $iwiki->title(); See http://alerque.com/IWiki for more information For right now I'd love comments on the parseing engine! ---- /* Code Copyright 2003 Caleb Maclennan */ /* Please contact me for permission to use it! */ /* Full source at http://alerque.com/source.php?file=/usr/local/lib/php/iwiki.inc */ function para ($block) { return trim(htmlspecialchars($block)); } function render ($page) { $paras = preg_split('!^\s*$!m', $page); $page=array(); foreach ($paras as $block) { $block = preg_replace('!^\s*$!', '', $block); switch (true) { // horizontal rule case preg_match('!^-{4,}!m', $block): $block = "
\n$block\n"; break; // pre case preg_match('!\n[ \t][^ \t]!', $block): $block = htmlspecialchars($block); $block = "
$block"; break; // else make it a generic paragraph default: $block = $this->para($block); $block = preg_replace('!^\s*(\w*:) !Um', '\1 ', $block); $block = preg_replace('!^\s*:([\w\s]*:) !Um', '\1 ', $block); $block = preg_replace("!\n!m", "
\n$block\n
"; break; } $page[] = $block; } $page = join("\n\n", $page); return "$page\n\n"; } function parse_text ($text) { // bold & italic & underline $text = preg_replace("![\s\n>]/([\w].*)/!Um", ' \1', $text); $text = preg_replace("![\s\n>]\+([\w].*)\+!Um", ' \1', $text); $text = preg_replace("![\s\n>]_([\w].*)_!Um", ' \1', $text); // links $text = preg_replace_callback('!(([\s=+/>]|^)[A-Z]+[a-z]*([A-Z][a-z]{1,})([A-Z][a-z]*)*\d*)!', array($this, 'link'), $text); $text = preg_replace("!([^|])((http|ftp|news)://([^ <]+))!", '\1 \2', $text); $text = preg_replace("!\[(.*)\|(.*)]!U", ' \1', $text); $text = preg_replace("!(\s[^\s]*@[^\s]*\.\w{1,6})!", ' \1', $text); return $text; } function link ($loc) { if ( !empty($loc[2]) ) { preg_match('!^(.)(.*)!', $loc[0], $loc); } else { $loc[2] = $loc[1].$loc[2]; $loc[1] = ''; } $loc[1] = preg_replace('/!/', '', $loc[1]); $desc = preg_replace('!([a-z])([A-Z0-9])!', '\1 \2', $loc[2]); if ($this->file->is(IWIKI_DATA.$loc[2])) return "$loc[1]$desc"; return "$loc[1]$loc[2]?"; }