ralphort
New Member
Joined: Nov 22, 2012
Posts: 6
|
Posted:
Tue Jun 28, 2016 10:23 pm |
|
I was able to get rid of the entire left side blocks when opening certain modules but it leaves a thin space (like padding) on the left side of my theme. I thought at first I can fix it by increasing the module width but it will also increase the width on the right side of the theme. How can I fix this?
Im using the latest version of RN v2.51 with Anagram theme.
I placed the modification below on theme.php file...
Code:$public_msg = public_message();
echo $public_msg.'<br />';
echo '<!-- Begin Main Content -->'
.'<table width="900" cellpadding="0" cellspacing="0" border="0" align="center"><tr valign="top">'
.'<td style="background-image:url(themes/Anagram/images/column-bg.gif);">';
// Modification to hide left blocks in Modules
if (defined('HIDELEFT')){
/* Don't display it. */
} else {
blocks('left');
}
echo '</td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="1" style="height:1px;" border="0" alt="" /></td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="5" style="height:1px;" border="0" alt="" /></td>'
.'<td width="100%">';
}
|
Also placed the code below on modules I'm hiding...
Code:define('HIDELEFT', true);
|
|
|
|
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Wed Jun 29, 2016 5:27 am |
|
Hard to tell without to see the rest of the code. I wouldn't touch the modules to hide the left blocks. You can do it directly in the theme. In the RickTido theme of the RN251-package you will find a simple solution for this.
Is it the Anagram theme of the deprecated themes in the RN251 package? If yes, then ....
open theme.php and find:
php Code:// END: Added in v2.40.00 - Mantis Issue 0001043
|
add after:
php Code:$hide_blocks_left = array('Forums');
global $name;
if (!isset($name)) $name = '';
|
find in function themeheader():
php Code:global $user, $banners, $sitename, $slogan, $cookie, $prefix, $anonymous, $db, $nukeNAV;
|
replace it with:
php Code:global $user, $banners, $sitename, $slogan, $cookie, $prefix, $anonymous, $db, $nukeNAV, $name, $hide_blocks_left;
|
find this:
php Code: $public_msg = public_message();
echo $public_msg.'<br />';
echo '<!-- Begin Main Content -->'
.'<table width="900" cellpadding="0" cellspacing="0" border="0" align="center"><tr valign="top">'
.'<td style="background-image:url(themes/Anagram/images/column-bg.gif);">';
blocks('left');
echo '</td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="1" style="height:1px;" border="0" alt="" /></td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="5" style="height:1px;" border="0" alt="" /></td>'
.'<td width="100%">';
}
|
replace it with:
php Code: $public_msg = public_message();
echo $public_msg.'<br />';
echo '<!-- Begin Main Content -->'
.'<table width="900" cellpadding="0" cellspacing="0" border="0" align="center"><tr valign="top">';
if (!in_array($name, $hide_blocks_left)) {
echo '<td style="background-image:url(themes/Anagram/images/column-bg.gif);">';
blocks('left');
echo '</td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="1" style="height:1px;" border="0" alt="" /></td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="5" style="height:1px;" border="0" alt="" /></td>';
}
echo '<td width="100%">';
}
|
After that you can add now the names of all affected modules-folders to the array $hide_blocks_left on top of the theme.php without to modify each module:
php Code:$hide_blocks_left = array('Forums', 'Your_Account', 'Members_List', 'Private_Messages');
|
But if you want stay on your solution with the HIDELEFT definition, then it should be like this:
php Code: $public_msg = public_message();
echo $public_msg.'<br />';
echo '<!-- Begin Main Content -->'
.'<table width="900" cellpadding="0" cellspacing="0" border="0" align="center"><tr valign="top">';
if (!defined('HIDELEFT')) {
echo '<td style="background-image:url(themes/Anagram/images/column-bg.gif);">';
blocks('left');
echo '</td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="1" style="height:1px;" border="0" alt="" /></td>'
.'<td><img src="themes/Anagram/images/pixel.gif" width="5" style="height:1px;" border="0" alt="" /></td>';
}
echo '<td width="100%">';
}
|
|
_________________ Github: RavenNuke |
|