Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
ralphort
New Member
New Member



Joined: Nov 22, 2012
Posts: 6

PostPosted: Tue Jun 28, 2016 10:23 pm Reply with quote

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.

Image

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); 
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1510

PostPosted: Wed Jun 29, 2016 5:27 am Reply with quote

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%">';
}



Wink

_________________
Github: RavenNuke 
View user's profile Send private message
ralphort







PostPosted: Wed Jun 29, 2016 8:49 am Reply with quote

Yes, I'm using the deprecated Anagram theme that comes with the RN251.

Anyway, I followed your suggestion in hiding blocks hence it's easier than editing individual modules & it works perfectly. It also solved the thin space on side problem I'm trying to fix.

Thanks a lot. Very Happy
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©