Thread: hook sytem
View Single Post
Old 06-19-2009, 06:55 AM   #1 (permalink)
ChrisR
The Wanderer
 
Join Date: Dec 2008
Posts: 16
Thanks: 2
ChrisR is on a distinguished road
Default hook sytem

Okay after hours and hours of Google i have had it.

So what i am trying to do is make a hook system but unsure on how to do it.

so i can have a pages with say

Code:
<?php

code here blah blah
$hook->load('me_start');
more code b;lah blah
$hook->load('me_end');
and in the page that gets included some where it has
Code:
<?php
$hook->use('me_start', 'coolfunc');

function coolfunc () {
$wow = 'sup';
echo $sup;
}

?>
so all up it will just put that code whats in that function to were $hook->load is.

something along them lines.
ChrisR is offline  
Reply With Quote