This hack will replace the MKPortal logo and header background with the logo and background from your forum skin. If you have skin selection enabled in the Portal CP the logostrip will change with each different forum skin.
This code is working in vB 3.0.3 and I think it should work for vB 3.5. It gets the image directory and the logo image from the vB database "style" table. It looks for an image named "header_bg.gif" in the "Miscellaneous Images Folder" set for the skin.
(Note: I do not know if this is the correct place to look for the logostrip background-image in vB. Maybe some of you vB users can tell me the right place to look and what image names to look for.)
File to edit: /templates/Forum/tpl_main.php
REPLACE function view_logo with this modified version.
// Display vB 3 forum logostrip hack by visiblesoul
// Tested with vB 3.0.3
function view_logo() {
global $mklib, $mkportals, $DB;
if ($mkportals->member['theme']) {
$DB->query("SELECT styleid, stylevars from " . TABLE_PREFIX . "style WHERE styleid = '{$mkportals->member['theme']}'");
}
else {
$DB->query("SELECT styleid, stylevars from " . TABLE_PREFIX . "style WHERE styleid='1'");
}
$r = $DB->fetch_row();
$skinvars = unserialize(stripslashes($r['stylevars']));
$myimages_dir = $skinvars['imgdir_misc'];
$logoimg = $skinvars['titleimage'];
unset ($r);
// Import logo
$logo = $mklib->sitepath."/".$mklib->forumpath."/".$logoimg;
if (!$logoimg)
$logo = "$mklib->images/logo.gif";
// Import background-image
//$background = "$mklib->images/sf_logo.jpg";
$background = "";
$background2 = $mklib->sitepath."/".$mklib->forumpath."/".$myimages_dir."/header_bg.gif";
if (is_file("$background2") ) {
$background = "style="background-image: url('$background2')"";
}
return <<<EOF
<!-- begin logostrip -->
<tr>
<td id="mklogostrip" $background width="100%">
<a href="$mklib->siteurl/index.php"><img src="$logo" border="0" alt="" /></a>
</td>
</tr>
<!-- end logostrip -->
EOF;
}
//end logostrip hack













