20
Just to recap I'm trying to modify the newbb 'Latest posts' block so that it can be used to show the latest posts according to the page of the website being viewed.
So for example i have a module which is all about colleges, each category in that module is a different college. It would be great if on each category page I could display forum posts which mention that college. I think this might be useful for a lot of sites.
So the aim is to have the block return posts according to the page currently being viewed
within this file: /modules/newbb/blocks/newbb_block.php
this function: b_newbb_show
controls the latest posts block
but how can i tell this function what the page name is of the page in which the block is currently being viewed.
I'm using this hack inside the category's template page to call the block:
<{php}>
include XOOPS_ROOT_PATH.'/mainfile.php';
include_once XOOPS_ROOT_PATH.'/class/template.php';
include_once(XOOPS_ROOT_PATH.'/modules/newbb/blocks/newbb_block.php');
$result = b_newbb_show(explode('|','time|10|360|0|1|0|0'));
$tpl = new XoopsTpl();
$tpl->assign('block', $result);
$tpl->display('db:newbb_block_cover.html');
<{/php}>
As this is within the module's category page is there some way I can send the $category.name to newbb_block.php
Thanks a lot for bearing with me!