Opened 6 years ago
Closed 5 years ago
#722 closed enhancement (duplicate)
Virtual areas in root
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Front-end | Version: | 0.8.2.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Currently to add an area to the forum, such as a memberlist, a file has to be added in root which then has to load a template file. I suggest that it is made possible to create these areas by passing a function in the plugin as reference which can then do stuff, in the exactsame way as this is possible for profile areas. They would then be accessible at the bburi/areaname/.
Change History (4)
Here's a workaround that I used to make this work for my needs,
ie. /forums/view/listplugins
{{{ function view_listplugins($view) {
if ($view=="listplugins") {bb_load_template( 'list-plugins.php'); exit();}
} add_action( 'bb_custom_view', 'view_listplugins' );
function view_listplugins_filter( $views ) {
global $views;
$viewslistplugins? = "List Plugins Used";
return $views;
} add_filter('bb_views', 'view_listplugins_filter'); }}}
The only problem is it will generate a mysql query as it thinks it has to fill a page. with $topics
- Milestone set to 1.0
- Version set to 0.8.2.1
We may want to consider switching over to something more like WordPress does: serve everything from index.php and determine what templates to use from the REQUEST_URI.
Or rather at ?areaname for setups without pretty permalinks.