1 (edited by Johu 2008-06-30 17:05)

Topic: $type of extern.php

File extern.php Line 251 punBB RC1.3

// Determine what type of feed to output
    $type = 'html';
    if (isset($_GET['type']) && is_scalar($_GET['type']))
    {
        if (strtolower($_GET['type']) == 'rss')
            $type = 'rss';
        else if (strtolower($_GET['type']) == 'atom')
            $type = 'atom';
        else if (strtolower($_GET['type']) == 'xml')
            $type = 'xml';
    }

I wouldn't use this method to make sure that type is valid. Instead I would check if function 'output'.$type exists. This way it is easier to plugin and there would be no need for silly hook and it would still be secure.

I am adding output methods while 'feed' action suits well. At this point I have to make my own action just to add my new $type's.

Re: $type of extern.php

We have taken your request into account and added a new hook to add a new type of output. You can see the changes here