mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 20:09:44 +00:00
create portable infobox builder special page
This commit is contained in:
parent
6067073b3c
commit
638be69305
|
@ -57,6 +57,11 @@ $wgAutoloadClasses[ 'ApiQueryPortableInfobox' ] = $dir . 'controllers/ApiQueryPo
|
|||
$wgAutoloadClasses[ 'PortableInfoboxHooks' ] = $dir . 'PortableInfoboxHooks.class.php';
|
||||
$wgAutoloadClasses[ 'ApiQueryAllinfoboxes' ] = $dir . 'controllers/ApiQueryAllinfoboxes.class.php';
|
||||
$wgAutoloadClasses[ 'PortableInfoboxBuilderController' ] = $dir . 'controllers/PortableInfoboxBuilderController.class.php';
|
||||
$wgAutoloadClasses[ 'PortableInfoboxBuilderSpecialController' ] = $dir . 'controllers/PortableInfoboxBuilderSpecialController.class.php';
|
||||
|
||||
// special pages
|
||||
$wgSpecialPages[ 'PortableInfoboxBuilder' ] = 'PortableInfoboxBuilderSpecialController';
|
||||
$wgSpecialPageGroups[ 'PortableInfoboxBuilder' ] = 'wikia';
|
||||
|
||||
// query pages
|
||||
$wgAutoloadClasses[ 'AllinfoboxesQueryPage' ] = $dir . 'querypage/AllinfoboxesQueryPage.php';
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Class WikiaMapsSpecialController
|
||||
* @desc Special:Maps controller
|
||||
*/
|
||||
class PortableInfoboxBuilderSpecialController extends WikiaSpecialPageController {
|
||||
const PAGE_NAME = 'PortableInfoboxBuilder';
|
||||
const PAGE_RESTRICTION = 'editinterface';
|
||||
const INFOBOX_BUILDER_MERCURY_ROUTE = 'infoboxBuilder';
|
||||
|
||||
/**
|
||||
* Special page constructor
|
||||
*
|
||||
* @param null $name
|
||||
* @param string $restriction
|
||||
* @param bool $listed
|
||||
* @param bool $function
|
||||
* @param string $file
|
||||
* @param bool $includable
|
||||
*/
|
||||
public function __construct( $name = null, $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) {
|
||||
parent::__construct( self::PAGE_NAME, self::PAGE_RESTRICTION, $listed, $function, $file, $includable );
|
||||
}
|
||||
|
||||
/**
|
||||
* Infobox Builder special page
|
||||
*/
|
||||
public function index() {
|
||||
$this->wg->SuppressPageHeader = true;
|
||||
//TODO: use i18n message for title
|
||||
$this->wg->out->setHTMLTitle( 'Infobox Builder' );
|
||||
|
||||
//TODO: get better way of handling $this->getPar() to deal with "/dadada/adasdasd"
|
||||
$url = $this->wg->server . '/' . infoboxBuilder . '/' . $this->getPar();
|
||||
|
||||
$this->response->setVal('iframeUrl', $url);
|
||||
$this->response->setTemplateEngine( WikiaResponse::TEMPLATE_ENGINE_MUSTACHE );
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<iframe id="infoboxBuilderIframe" width="100%" height="600" data-src="{{iframeUrl}}"></iframe>
|
Loading…
Reference in a new issue