View Single Post
  #1  
Old 20th August 2008, 12:04
kp380lv's Avatar
kp380lv kp380lv is offline
Senior Member
 
Join Date: May 2008
Latvia
Posts: 388
Thumbs up Local switching off the block system
Mod for YSE PRE 6

A small modification that allows disable individual pages on the left and right blocks, separately or together!
What it gives? Additional space for the main content pages, and save resources!

Installation:

1. include/functions.php

Find:

Code:
function stdhead($title = "", $msgalert = true) {
replaced with:

Code:
function stdhead($title = "", $blockhide = none, $msgalert = true) {
Find:

Code:
function stdfoot(){
Replace with:

Code:
function stdfoot($blockhide = none) {
2. themes/yourtheme/stdhead.php

Find:

Code:
<? $fn = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1); ?>
заменить на
<? $fn = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1);
if ($blockhide!='left' && $blockhide!='all'){
найти
Find:

Code:
blok_menu("<center>".$tracker_lang['torrent_clients']."</center>", $bt_clients , "155");

?>
</td>
After insert:

Code:
<?}?>
3. themes/yourtheme/stdfoot.php

Find:

Code:
<?
    show_blocks('d');
?>
<td valign="top" width="155" style="border:none">
<?
    show_blocks('r');
?>
</td>
<?
Replace with:

Code:
<?
    show_blocks('d');
    if ($blockhide!='right' && $blockhide!='all'){
?>
<td valign="top" width="155" style="border:none">
<?
    show_blocks('r');
?>
</td>
<?
}
4.To activate hide blocks in a file, you need to build in the challenges of functions stdhead () and stdfoot () options left, right or all, depending on what side you want to hide for example .. browse.php it will look like (Suppose hide there all the units):

Code:
...
stdhead($tracker_lang['browse'], 'all');
...
stdfoot('all');
Clarification: if only to hide the left blocks, then set stdhead ($ tracker_lang [ 'browse'], 'left'); only function stdhead (), and if only the right, then, only functions stdfoot (), like this: stdfoot ( 'right'); hide if all the units. and then here and there, as in the example .. all enjoy, say thank you ..;)

Screen:

Click image for larger version

Name:	2008-08-18_093006.jpg
Views:	167
Size:	176.3 KB
ID:	894

Last edited by kp380lv; 20th August 2008 at 12:08.
Reply With Quote
The Following User Says Thank You to kp380lv For This Useful Post:
wxlg1117 (4th September 2009)