0

我正在做一些关于 joomla 的工作(很好地学习它)我可以用一只手。php 真的不是我的专长。所以我不想破坏网站。这就是我想要做的。

http://rcpsus.com/

您会在菜单下方看到那个白条。我正试图摆脱它。

我找到了有问题的代码。白条是#footer..specifically div#block-footer 的一部分,并且有一个附加的类.bg-white,它使背景#fff 或白色。通常在大多数情况下,我只是将问题代码交给代码并使用单独的 css 规则对其进行重组。但该选项不适用于 joomla。我不确定如何通过 php.ini 解决这个问题。我试过删除

$colored = ($this['config']->get($pos) != 'white') ? ' bg-colored' : ''; $this['config']->set($pos, 'bg-'.$this['config']->get($pos).$colored);

部分。但是,它似乎无法解决问题。如果有人能帮我一把,我会很感激的。我在下面包含了完整的文档以供参考。提前致谢。

 <?php
/**
* @package   yoo_infinite
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

// generate css for layout
$css[] = sprintf('.wrapper { max-width: %dpx; }', $this['config']->get('template_width'));


****// set block css classes
foreach (array("top-a-bg","top-b-bg","main-bg","bottom-a-bg","bottom-b-bg","bottom-c-bg","footer-bg") as $pos) {
    if ($pos == 'footer-bg') {
        $body_bg = 'body-'.$this['config']->get($pos);
    }
    $colored = ($this['config']->get($pos) != 'white') ? ' bg-colored' : '';
    $this['config']->set($pos, 'bg-'.$this['config']->get($pos).$colored);*
}***

// generate css for 3-column-layout
$sidebar_a       = '';
$sidebar_b       = '';
$maininner_width = 100;
$sidebar_a_width = intval($this['config']->get('sidebar-a_width'));
$sidebar_b_width = intval($this['config']->get('sidebar-b_width'));
$sidebar_classes = "";
$rtl             = $this['config']->get('direction') == 'rtl';
$body_config     = array();

// set widths
if ($this['modules']->count('sidebar-a')) {
    $sidebar_a = $this['config']->get('sidebar-a'); 
    $maininner_width -= $sidebar_a_width;
    $css[] = sprintf('#sidebar-a { width: %d%%; }', $sidebar_a_width);
}

if ($this['modules']->count('sidebar-b')) {
    $sidebar_b = $this['config']->get('sidebar-b'); 
    $maininner_width -= $sidebar_b_width;
    $css[] = sprintf('#sidebar-b { width: %d%%; }', $sidebar_b_width);
}

$css[] = sprintf('#maininner { width: %d%%; }', $maininner_width);

// all sidebars right
if (($sidebar_a == 'right' || !$sidebar_a) && ($sidebar_b == 'right' || !$sidebar_b)) {
    $sidebar_classes .= ($sidebar_a) ? 'sidebar-a-right ' : '';
    $sidebar_classes .= ($sidebar_b) ? 'sidebar-b-right ' : '';

// all sidebars left
} elseif (($sidebar_a == 'left' || !$sidebar_a) && ($sidebar_b == 'left' || !$sidebar_b)) {
    $sidebar_classes .= ($sidebar_a) ? 'sidebar-a-left ' : '';
    $sidebar_classes .= ($sidebar_b) ? 'sidebar-b-left ' : '';
    $css[] = sprintf('#maininner { float: %s; }', $rtl ? 'left' : 'right');

// sidebar-a left and sidebar-b right
} elseif ($sidebar_a == 'left') {
    $sidebar_classes .= 'sidebar-a-left sidebar-b-right ';
    $css[] = '#maininner, #sidebar-a { position: relative; }';
    $css[] = sprintf('#maininner { %s: %d%%; }', $rtl ? 'right' : 'left', $sidebar_a_width);
    $css[] = sprintf('#sidebar-a { %s: -%d%%; }', $rtl ? 'right' : 'left', $maininner_width);

// sidebar-b left and sidebar-a right
} elseif ($sidebar_b == 'left') {
    $sidebar_classes .= 'sidebar-a-right sidebar-b-left ';
    $css[] = '#maininner, #sidebar-a, #sidebar-b { position: relative; }';
    $css[] = sprintf('#maininner, #sidebar-a { %s: %d%%; }', $rtl ? 'right' : 'left', $sidebar_b_width);
    $css[] = sprintf('#sidebar-b { %s: -%d%%; }', $rtl ? 'right' : 'left', $maininner_width + $sidebar_a_width);
}

// number of sidebars
if ($sidebar_a && $sidebar_b) {
    $sidebar_classes .= 'sidebars-2 ';
} elseif ($sidebar_a || $sidebar_b) {
    $sidebar_classes .= 'sidebars-1 ';
}

// generate css for dropdown menu
foreach (array(1 => '.dropdown', 2 => '.columns2', 3 => '.columns3', 4 => '.columns4') as $i => $class) {
    $css[] = sprintf('#menu %s { width: %dpx; }', $class, $i * intval($this['config']->get('menu_width')));
}

// load css
$this['asset']->addFile('css', 'css:base.css');
$this['asset']->addFile('css', 'css:layout.css');
$this['asset']->addFile('css', 'css:menus.css');
$this['asset']->addString('css', implode("\n", $css));
$this['asset']->addFile('css', 'css:modules.css');
$this['asset']->addFile('css', 'css:tools.css');
$this['asset']->addFile('css', 'css:system.css');
$this['asset']->addFile('css', 'css:extensions.css');
$this['asset']->addFile('css', 'css:custom.css');
if ($this['config']->get('animation') == '1') $this['asset']->addFile('css', 'css:animation.css');
if (($font = $this['config']->get('font1')) && $this['path']->path("css:/font1/$font.css")) { $this['asset']->addFile('css', "css:/font1/$font.css"); }
if (($font = $this['config']->get('font2')) && $this['path']->path("css:/font2/$font.css")) { $this['asset']->addFile('css', "css:/font2/$font.css"); }
if (($font = $this['config']->get('font3')) && $this['path']->path("css:/font3/$font.css")) { $this['asset']->addFile('css', "css:/font3/$font.css"); }
$this['asset']->addFile('css', 'css:style.css');
if ($this['config']->get('direction') == 'rtl') $this['asset']->addFile('css', 'css:rtl.css');
$this['asset']->addFile('css', 'css:responsive.css');
$this['asset']->addFile('css', 'css:print.css');

// load fonts
$http  = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$fonts = array(
    'droidsans' => 'template:fonts/droidsans.css',
    'opensans' => 'template:fonts/opensans.css',
    'opensanslight' => 'template:fonts/opensanslight.css',
    'yanonekaffeesatz' => 'template:fonts/yanonekaffeesatz.css',
    'mavenpro' => 'template:fonts/mavenpro.css',
    'signika' => 'template:fonts/signika.css',
    'titillium' => 'template:fonts/titillium.css',
    'titillium_light' => 'template:fonts/titillium_light.css',
    'droidserifitalic' => 'template:fonts/droidserifitalic.css',
    'artifika' => 'template:fonts/artifika.css',
    'kreon' => 'template:fonts/kreon.css');

foreach (array_unique(array($this['config']->get('font1'), $this['config']->get('font2'), $this['config']->get('font3'))) as $font) {
    if (isset($fonts[$font])) {
        $this['asset']->addFile('css', $fonts[$font]);
    }
}

// set body css classes
$body_classes = ' '.$sidebar_classes.' ';
$body_classes .= ' '.$body_bg.' ';
$body_classes .= $this['system']->isBlog() ? 'isblog ' : 'noblog ';
$body_classes .= $this['config']->get('page_class');

$this['config']->set('body_classes', $body_classes);

// add social buttons
$body_config['twitter'] = (int) $this['config']->get('twitter', 0);
$body_config['plusone'] = (int) $this['config']->get('plusone', 0);
$body_config['facebook'] = (int) $this['config']->get('facebook', 0);

$body_config['style'] = $this['config']->get('style', 'default');

$this['config']->set('body_config', json_encode($body_config));

// add javascripts
$this['asset']->addFile('js', 'js:warp.js');
$this['asset']->addFile('js', 'js:responsive.js');
$this['asset']->addFile('js', 'js:accordionmenu.js');
$this['asset']->addFile('js', 'js:dropdownmenu.js');
$this['asset']->addFile('js', 'js:template.js');

// internet explorer
if ($this['useragent']->browser() == 'msie') {

    // add conditional comments
    $head[] = sprintf('<!--[if lte IE 8]><script src="%s"></script><![endif]-->', $this['path']->url('js:html5.js'));
    $head[] = sprintf('<!--[if IE 8]><link rel="stylesheet" href="%s" /><![endif]-->', $this['path']->url('css:ie8.css'));

}

// add $head
if (isset($head)) {
    $this['template']->set('head', implode("\n", $head));
}
4

1 回答 1

0

弄清楚了 -

/模板/布局/index.php

删除了相关部分中的 #footer -class 附加项

于 2013-10-30T22:17:20.657 回答