Topic: Manifests

I'm wondering - why there isn't any simple function that would allow developers to insert their code via php instead of this unfriendly xml manifests.

Something like this

function add_action( $hook_id, $function ) {
    global $forum_hooks;
    return NULL;

function test() {
    echo "foo";
    $i = 1;
    $j = 2;
    echo $i+$j;

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

Re: Manifests

In my opinion manifest files are awsome, and there is no need to changing anything. The best part is, that punbb stores hooks in the database, which allows to uninstall an extension even if it was accidentally deleted.

Putting hooks into functions will casuse some problems like variable scopes - getting access to variables, which were declared inside another function will be troublesome.

You can always make manifest like this:

<hook id="hook_1">
require $ext_info['path']./'.file_1.php';
<hook id="hook_2">
require $ext_info['path']./'.file_2.php';

After your extension is completed you can merge all files into manifest smile This approach will save you from installing and uninstalling extension all the time while coding.

If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);