Prev |  | Next

## 3.10. Page data handling

### 3.10.1. index

This hook can be used to modify the data for folders and forums that are shown on the index page.

Call time:

Just before the index page is shown.

Hook input:

An array containing all the forums and folders that will be shown on the index page.

Hook output:

The same array as the one that was used for the hook call argument, possibly with some updated fields in it.

Example code:

    function phorum_mod_foo_index($data)
    {
        global $PHORUM;

        foreach ($data as $id => $item)
        {
            if (!$item['folder_flag'])
            {
                $data[$id]['description'] .= '<sbr/>Blah foo bar baz';
            }
        }

        return $data;
    }

Prev | Up | Next
| Home |