【问题标题】:Need help identifying how to edit a div in mediawiki需要帮助确定如何在 mediawiki 中编辑 div
【发布时间】:2014-10-30 13:40:00
【问题描述】:

这是我的网站:http://www.stnwiki.com/wiki/

“正文”上方的选项卡是我希望能够更改的,但我尝试过但未能找到它们的 css 位置..

http://prntscr.com/5198o9 这是一张突出显示 2 个选项卡的图片。

我假设可以使用谷歌浏览器的检查元素找到它,但是我不太了解如何使用它。

但是我可能完全错了!如果你们需要其他信息,请告诉我!

干杯, 奥利

load.php 的内容

<?php
/**
 * This file is the entry point for the resource loader.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 * @author Roan Kattouw
 * @author Trevor Parscal
 */

// Bail if PHP is too low
if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
    // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
    require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
    wfPHPVersionError( 'load.php' );
}

require __DIR__ . '/includes/WebStart.php';

wfProfileIn( 'load.php' );

// URL safety checks
if ( !$wgRequest->checkUrlExtension() ) {
    return;
}

// Respond to resource loading request
$resourceLoader = new ResourceLoader();
$resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) );

wfProfileOut( 'load.php' );
wfLogProfilingData();

// Shut down the database.  foo()->bar() syntax is not supported in PHP4, and this file
// needs to *parse* in PHP4, although we'll never get down here to worry about = vs =&
$lb = wfGetLBFactory();
$lb->shutdown();

【问题讨论】:

    标签: javascript php css mediawiki


    【解决方案1】:

    MediaWiki 通过ResourceLoader 从许多来源加载 CSS,您无需知道 CSS 来自哪里。

    您的 CSS 修改必须与 MediaWiki 代码分开。如果这是您需要做的唯一更改,那么您可能只需要编辑 [[MediaWiki:Common.css]] 页面。有关更多信息和链接,请参阅https://www.mediawiki.org/wiki/Manual:Skin_configuration#Site-wide_CSS_modifications

    【讨论】:

      【解决方案2】:

      该 div 的样式似乎是名为 load.php 的文件中的内联样式(我使用了 Google Chrome 的检查元素)。

      如果您右键单击选项卡并单击检查元素,它将在底部打开一个窗格。在右侧窗格中将列出该元素上的所有样式,并划分为多个部分,并且在每个部分的右侧将告诉您这些样式所在的文件。如果您单击该文件名,它将带您到其中的行这些样式位于该文件中。

      试一试!

      编辑:正在为该样式执行的 URL 是 http://www.stnwiki.com/wiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cmediawiki.ui.button%7Cskins.vector.styles&only=styles&skin=vector&*,但我不知道它正在加载什么 css 文件。我建议查看 MediaWiki 文档以找出答案。

      另外,您有什么方法可以在 MediaWiki 的管理面板中定义自定义 CSS?如果是这样,您可以只使用选项卡的类名并覆盖一些样式。

      【讨论】:

      • 我已将 load.php 的内容添加到我的问题中
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-11-02
      • 2012-10-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多