Firefox PHP

Moderator control of forum layout

Posted by Peter Martin 
Moderator control of forum layout
February 18, 2011 06:40AM
I'd like to use Phorum as a multi-site (e.g, solution to host forums for others. I like the concept of having just one code base to run forums for dozens (hundreds?) of people, and the virtual root concept makes this attractive.

What would be helpful is the ability for moderators to make limited changes to their forum(s). Most people who opt for a hosted forum solution want the ability to make at least minor changes to their forum layout; e.g, maybe add a header/footer. I'm thinking in terms of custom variables inserted in the templates (like the Banner module) and a screen where the moderator access can define them.

I use a klutzy method of doing this by including files that match the forum ID:

Language: PHP
<?php $customFile = ';/home/foobar/phorum/'; . $PHORUM[';DATA';][';FORUM_ID';] . ';/custom.php';; if (file_exists($customFile)) include_once $customFile; ?>

The custom.php file contains something like

Language: PHP
$header = "Hello world."; $footer = "Goodbye cruel world.";

and in the templates I include

Language: PHP
<?php echo $header; ?> . . . <?php echo $footer; ?>

Having this stored in the database would be much better, but it's above my ability to code.

Hope this makes sense.

Peter Martin

Edited 2 time(s). Last edit at 02/18/2011 11:45PM by Peter Martin.
Sorry, only registered users may post in this forum.

Click here to login