*/ /** * Configuration * ------------------------------------------------- */ // BaseTool & Localization require_once __DIR__ . '/../libs/basetool/InitTool.php'; require_once __DIR__ . '/../ToolStart.php'; $I18N = new Intuition(array('domain' => 'tsintuition', 'mode' => 'dashboard')); // Load all domains so we can get some statistics later on and // make sure "getAvailableLangs" is complete foreach ($I18N->getAllRegisteredDomains() as $domainKey) { $I18N->loadTextdomain($domainKey); } // Initialize BaseTool $Tool = BaseTool::newFromArray(array('displayTitle' => $I18N->msg('title'), 'remoteBasePath' => $I18N->dashboardHome, 'localBasePath' => $I18N->localBaseDir, 'revisionId' => $I18N->version, 'styles' => array('main.css'), 'scripts' => array('main.js'), 'licenses' => array('CC-BY 3.0' => 'https://creativecommons.org/licenses/by/3.0/'))); $Tool->setSourceInfoGithub('Krinkle', 'intuition', dirname(__DIR__)); /** * Tool settings * ------------------------------------------------- */ $toolSettings = array('tabs' => array()); /** * Post actions * ------------------------------------------------- */ if (isset($_POST['action'])) { switch ($_POST['action']) { case 'prefset': // Set a 30-day, then redirect to index $I18N->setCookie('userlang', $_POST['fpLang']);
<?php // BaseTool & Localization require_once __DIR__ . '/lib/basetool/InitTool.php'; require_once KR_TSINT_START_INC; // Class for this tool require_once __DIR__ . '/class.php'; $kgTool = new KrSnapshots(); // Local settings require_once __DIR__ . '/local.php'; $I18N = new TsIntuition('mwsnapshots'); $toolConfig = array('displayTitle' => $I18N->msg('title-overview'), 'remoteBasePath' => dirname($kgConf->getRemoteBase()) . '/', 'revisionId' => '0.2.0', 'styles' => array('main.css'), 'scripts' => array('main.js'), 'I18N' => $I18N); $kgBaseTool = BaseTool::newFromArray($toolConfig); $kgBaseTool->setSourceInfoGithub('Krinkle', 'mw-tool-snapshots', __DIR__);
<?php /** * Main index * * @author Timo Tijhof, 2015 * @license http://krinkle.mit-license.org/ * @package mw-tool-example */ /** * Configuration * ------------------------------------------------- */ require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../class.php'; // require_once __DIR__ . '/../config.php'; $tool = new ExampleTool(); $I18N = new Intuition('example'); $kgBase = BaseTool::newFromArray(array('displayTitle' => 'Example', 'revisionId' => '0.0.0', 'remoteBasePath' => dirname($kgConf->getRemoteBase()) . '/', 'I18N' => $I18N)); $kgBase->setSourceInfoGithub('Krinkle', 'mw-tool-example', dirname(__DIR__)); /** * Output * ------------------------------------------------- */ $tool->run(); $kgBase->flushMainOutput();
$initPath = '../../ts-krinkle-basetool'; if (!is_readable($initPath)) { $initPath = dirname(__DIR__) . '/includes/libs/ts-krinkle-basetool'; } require_once $initPath . '/InitTool.php'; // Load Intuition require_once dirname(__DIR__) . '/ToolStart.php'; // Initialize Intuition $I18N = new TsIntuition(array('domain' => 'TsIntuition', 'mode' => 'dashboard')); // Load all domains so we can get some statistics later on and // make sure "getAvailableLangs" is complete foreach ($I18N->getAllRegisteredDomains() as $domainKey => $domainInfo) { $I18N->loadTextdomain($domainKey); } // Initialize BaseTool $Tool = BaseTool::newFromArray(array('displayTitle' => $I18N->msg('fullname'), 'krinklePrefix' => false, 'remoteBasePath' => $I18N->dashboardHome, 'localBasePath' => $I18N->localBaseDir, 'revisionId' => $I18N->version, 'styles' => array('main.css'))); $Tool->setSourceInfoGithub('Krinkle', 'TsIntuition', dirname(__DIR__)); /* Load Scripts & Styles */ // jQuery UI $jqueryui = $kgConf->getJQueryUI(); $Tool->addScripts($jqueryui['scripts']); $Tool->addStyles($jqueryui['styles']); /* Add initial stuff to <head> and <body> */ $Tool->doHtmlHead(); $Tool->doStartBodyWrapper(); /** * Tool settings * ------------------------------------------------- */ $toolSettings = array('tabs' => array()); /**
<?php /** * Main index * * @author Timo Tijhof, 2015 * @license http://krinkle.mit-license.org/ * @package wmf-tool-tour */ /** * Configuration * ------------------------------------------------- */ // BaseTool require_once __DIR__ . '/../vendor/autoload.php'; // Class for this tool require_once __DIR__ . '/../class.php'; $tool = new TourTool(); // Local settings #require_once __DIR__ . '/../config.php'; $kgBase = BaseTool::newFromArray(array('displayTitle' => 'Wiki Tour', 'remoteBasePath' => dirname($kgConf->getRemoteBase()) . '/', 'revisionId' => '0.1.0', 'styles' => array('https://tools-static.wmflabs.org/cdnjs/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css'), 'scripts' => array('https://tools-static.wmflabs.org/cdnjs/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.js'))); $kgBase->setSourceInfoGithub('Krinkle', 'wmf-tool-tour', dirname(__DIR__)); /** * Output * ------------------------------------------------- */ $tool->run(); $kgBase->flushMainOutput();