Hi Everyone,
I have written a child theme for bootstrap on OJS 3.1.2 and have followed the theme styling guide to a T Bootstrap3 Theme.
I am extremely stuck and not sure why creating a child from bootstrap 3 doesn’t load the parent styling. There are no errors in all my logs and I can’t seem to figure out what’s missing. My child theme folder is named bootstrap3-child. Any suggestions would be greatly appreciated!
Snippets of my code:
index.php
<?php
/**
* @defgroup plugins_themes_bootstrap3 Theme plugin for base Bootstrap 3 theme
*/
/**
* @file plugins/themes/default/index.php
*
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @ingroup plugins_themes_default
* @brief Wrapper for default theme plugin.
*
*/
require_once('BootstrapThreeChildThemePlugin.inc.php');
return new BootstrapThreeChildThemePlugin();
?>
BootstrapThreeChildThemePlugin.inc.php
<?php
/**
* @file plugins/themes/default/BootstrapThreeThemePlugin.inc.php
*
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class BootstrapThreeThemePlugin
* @ingroup plugins_themes_bootstrap3
*
* @brief Default theme
*/
import('lib.pkp.classes.plugins.ThemePlugin');
class BootstrapThreeChildThemePlugin extends ThemePlugin {
/**
* Initialize the theme
*
* @return null
*/
public function init() {
$this->setParent('bootstrapthreethemeplugin');
}
/**
* Get the display name of this plugin
* @return string
*/
function getDisplayName() {
return __('plugins.themes.bootstrap3-child.name');
}
/**
* Get the description of this plugin
* @return string
*/
function getDescription() {
return __('plugins.themes.bootstrap3-child.description');
}
}
version.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE version SYSTEM "../../../lib/pkp/dtd/pluginVersion.dtd">
<!--
* plugins/generic/bootstrap3/version.xml
*
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Plugin version information.
-->
<version>
<application>bootstrap3-child</application>
<type>plugins.themes</type>
<release>1.1.4.0</release>
<date>2018-06-10</date>
<lazy-load>0</lazy-load>
<class>BootstrapThreeChildThemePlugin</class>
</version>