I made an attempt at making a generic page that uses the specific forum's header/footer/style that I wanted. Instead of the default header, this grabs the header/footer/stylesheet for a sepecific forum before calling send_header. This is used if the page was associated with a specific forum, that had it's own look and header for example.
Note: This works on 6.2, not tested on 6.3. This will use the header/footer/stylesheet options for a specific forum. If a user is not using the default style, the page will have the user's selected style.
Directions.
I'm assuming the generic.php for the template version is being used. It has to appear between the authenticate() and send_header() basically.
[/code]
Find:
$user = $userob -> authenticate();
Add the following under this, changing 'MyBoard' to the forum's keyword the page should look like:
// ------ START Generic Page with forum look ------
$Board = "MyBoard"; //** Set to the keyword for the forum's style/header to use
// ------------------
// Get the board info
$Board_q = addslashes($Board);
$query = "
SELECT Bo_Title,Bo_HTML,Bo_Markup,Bo_SpecialHeader,Bo_StyleSheet
FROM {$config['tbprefix']}Boards
WHERE Bo_Keyword = '$Board_q'
$groupquery
";
$sth = $dbh -> do_query($query);
// ----------------
// Assign the stuff
list($Title,$HTML,$Markup,$fheader,$fstyle) = $dbh -> fetch_array($sth);
$dbh -> finish_sth($sth);
// -------------------------------------------------
// Here we need to figure out what stylesheet to use
$mystyle = "";
isset($user['U_StyleSheet']) && $mystyle = $user['U_StyleSheet'];
if (!$mystyle) { $mystyle = "usedefault"; }
if ($mystyle == "usedefault") {
$mystyle = $fstyle;
if ($mystyle == "usedefault") {
$mystyle = $theme['stylesheet'];
}
}
$fstyle = $mystyle;
// fstyle will now be set when used by send_header
// ------ END Generic Page with forum look ------
[/code]
Last edited by RandyJG; 10/15/2003 10:13 PM.