based on original hack by Meo at mkportal.it
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.
File to edit: templates/Forum/tpl_main.php
REPLACE function view_logo with this modified version.
for IPB 1.3 x MKP 1.0
// Display IPB 1.3 forum logostrip hack by visiblesoul
function view_logo() {
global $mklib, $mkportals, $DB;
//if ($mkportals->member['theme']) {
//$DB->query("SELECT img_dir from ibf_skins WHERE set_id = '{$mkportals->member['theme']}'");
//}
//else {
$DB->query("SELECT img_dir from ibf_skins WHERE default_set = '1'");
//}
$r = $DB->fetch_row();
$myimages_dir = $r['img_dir'];
unset ($r);
$logo = $mklib->images.'/logo.gif';
$logo2 = $mklib->sitepath.'/'.$mklib->forumpath.'/style_images/'.$myimages_dir.'/logo.gif';
if (is_file($logo2) ) {
$logo = $logo2;
}
else {
$logo4 = $mklib->sitepath.'/'.$mklib->forumpath.'/style_images/'.$myimages_dir.'/logo4.gif';
if (is_file($logo4) ) {
$logo = $logo4;
}
}
$background = $mklib->images.'/sf_logo.jpg';
$background2 = $mklib->sitepath.'/'.$mklib->forumpath.'/style_images/'.$myimages_dir.'/tile_back.gif';
if (is_file($background2) ) {
$background = $background2;
}
return <<<EOF
<!-- begin logostrip -->
<tr>
<td id="mklogostrip" style="background-image: url($background)" width="100%">
<a href="$mklib->siteurl/index.php"><img src="$logo" border="0" alt="" /></a>
</td>
</tr>
<!-- end logostrip -->
EOF;
}
//end logostrip hack
for IPB 2.0.x x MKP 1.0// Display IPB 2.0.x forum logostrip hack by visiblesoul
function view_logo() {
global $mklib, $mkportals, $DB;
if ($mkportals->member['theme']) {
$DB->query("SELECT set_image_dir, set_cache_css from ibf_skin_sets where set_skin_set_id = '{$mkportals->member['theme']}'");
}
else {
$DB->query("SELECT set_image_dir, set_cache_css from ibf_skin_sets where set_default = '1'");
}
$r = $DB->fetch_row();
$myimages_dir = $r['set_image_dir'];
unset ($r);
$logo = "$mklib->images/logo.gif";
$logo2 = $mklib->sitepath."/".$mklib->forumpath."/style_images/".$myimages_dir."/logo.gif";
if (is_file("$logo2") ) {
$logo = $logo2;
}
else {
$logo4 = $mklib->sitepath."/".$mklib->forumpath."/style_images/".$myimages_dir."/logo4.gif";
if (is_file("$logo4") ) {
$logo = $logo4;
}
}
$background = "$mklib->images/sf_logo.jpg";
$background2 = $mklib->sitepath."/".$mklib->forumpath."/style_images/".$myimages_dir."/tile_back.gif";
if (is_file("$background2") ) {
$background = $background2;
}
//end logo hack
return <<<EOF
<!-- begin logostrip -->
<tr>
<td id="mklogostrip" style="background-image: url('$background')" width="100%">
<a href="$mklib->siteurl/index.php"><img src="$logo" border="0" alt="" /></a>
</td>
</tr>
<!-- end logostrip -->
EOF;
}
//end logostrip hack













