/** * Adds links to Admin Links page. * * @since 1.7 * * @param ALTree $admin_links_tree * * @return boolean */ public static function addToAdminLinks(ALTree &$admin_links_tree) { $data_structure_section = new ALSection(wfMessage('smw_adminlinks_datastructure')->text()); $smw_row = new ALRow('smw'); $smw_row->addItem(ALItem::newFromSpecialPage('Categories')); $smw_row->addItem(ALItem::newFromSpecialPage('Properties')); $smw_row->addItem(ALItem::newFromSpecialPage('UnusedProperties')); $smw_row->addItem(ALItem::newFromSpecialPage('SemanticStatistics')); $data_structure_section->addRow($smw_row); $smw_admin_row = new ALRow('smw_admin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('SMWAdmin')); $data_structure_section->addRow($smw_admin_row); $smw_docu_row = new ALRow('smw_docu'); $smw_name = wfMessage('specialpages-group-smw_group')->text(); $smw_docu_label = wfMessage('adminlinks_documentation', $smw_name)->text(); $smw_docu_row->addItem(AlItem::newFromExternalLink('http://semantic-mediawiki.org/wiki/Help:User_manual', $smw_docu_label)); $data_structure_section->addRow($smw_docu_row); $admin_links_tree->addSection($data_structure_section, wfMessage('adminlinks_browsesearch')->text()); $smw_row = new ALRow('smw'); $displaying_data_section = new ALSection(wfMessage('smw_adminlinks_displayingdata')->text()); $smw_row->addItem(AlItem::newFromExternalLink('http://semantic-mediawiki.org/wiki/Help:Inline_queries', wfMessage('smw_adminlinks_inlinequerieshelp')->text())); $displaying_data_section->addRow($smw_row); $admin_links_tree->addSection($displaying_data_section, wfMessage('adminlinks_browsesearch')->text()); $browse_search_section = $admin_links_tree->getSection(wfMessage('adminlinks_browsesearch')->text()); $smw_row = new ALRow('smw'); $smw_row->addItem(ALItem::newFromSpecialPage('Browse')); $smw_row->addItem(ALItem::newFromSpecialPage('Ask')); $smw_row->addItem(ALItem::newFromSpecialPage('SearchByProperty')); $browse_search_section->addRow($smw_row); return true; }
/** * Adds a link to Admin Links page. * * @since 0.1 * * @return true */ public static function addToAdminLinks(&$admin_links_tree) { $ioSection = $admin_links_tree->getSection(wfMsg('adminlinks_importexport')); $mainRow = $ioSection->getRow('main'); $mainRow->addItem(ALItem::newFromSpecialPage('Push')); return true; }
function rtAddToAdminLinks( &$admin_links_tree ) { $general_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_general' ) ); $extensions_row = $general_section->getRow( 'extensions' ); if ( is_null( $extensions_row ) ) { $extensions_row = new ALRow( 'extensions' ); $general_section->addRow( $extensions_row ); } $extensions_row->addItem( ALItem::newFromSpecialPage( 'ReplaceText' ) ); return true; }
function createInitialTree() { $tree = new ALTree(); // 'general' section $general_section = new ALSection($this->msg('adminlinks_general')->text()); $main_row = new ALRow('main'); $main_row->addItem(ALItem::newFromSpecialPage('Statistics')); $main_row->addItem(ALItem::newFromSpecialPage('Version')); $main_row->addItem(ALItem::newFromSpecialPage('Specialpages')); $main_row->addItem(ALItem::newFromSpecialPage('Log')); $main_row->addItem(ALItem::newFromSpecialPage('Allmessages')); $main_row->addItem(ALItem::newFromEditLink('Sidebar', $this->msg('adminlinks_editsidebar')->text())); $main_row->addItem(ALItem::newFromEditLink('Common.css', $this->msg('adminlinks_editcss')->text())); $main_row->addItem(ALItem::newFromEditLink('Mainpage', $this->msg('adminlinks_editmainpagename')->text())); $general_section->addRow($main_row); $tree->addSection($general_section); // 'users' section $users_section = new ALSection($this->msg('adminlinks_users')->text()); $main_row = new ALRow('main'); $main_row->addItem(ALItem::newFromSpecialPage('Listusers')); $ul = SpecialPage::getTitleFor('Userlogin'); $al = SpecialPage::getTitleFor('AdminLinks'); $main_row->addItem(AlItem::newFromPage($ul, $this->msg('adminlinks_createuser')->text(), array('type' => 'signup', 'returnto' => $al->getPrefixedText()))); $main_row->addItem(ALItem::newFromSpecialPage('Userrights')); $users_section->addRow($main_row); $tree->addSection($users_section); // 'browsing and searching' section $browse_search_section = new ALSection($this->msg('adminlinks_browsesearch')->text()); $main_row = new ALRow('main'); $main_row->addItem(ALItem::newFromSpecialPage('Allpages')); $main_row->addItem(ALItem::newFromSpecialPage('Listfiles')); $main_row->addItem(ALItem::newFromSpecialPage('Search')); $browse_search_section->addRow($main_row); $tree->addSection($browse_search_section); // 'importing and exporting' section $import_export_section = new ALSection($this->msg('adminlinks_importexport')->text()); $main_row = new ALRow('main'); $main_row->addItem(ALItem::newFromSpecialPage('Export')); $main_row->addItem(ALItem::newFromSpecialPage('Import')); $import_export_section->addRow($main_row); $tree->addSection($import_export_section); return $tree; }
public static function addToAdminLinks(&$admin_links_tree) { $data_structure_label = wfMessage('smw_adminlinks_datastructure')->text(); $data_structure_section = $admin_links_tree->getSection($data_structure_label); if (is_null($data_structure_section)) { return true; } $smw_row = $data_structure_section->getRow('smw'); $smw_row->addItem(ALItem::newFromSpecialPage('Templates'), 'Properties'); $smw_row->addItem(ALItem::newFromSpecialPage('Forms'), 'SemanticStatistics'); $smw_admin_row = $data_structure_section->getRow('smw_admin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateClass'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateProperty'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateTemplate'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateForm'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateCategory'), 'SMWAdmin'); $smw_docu_row = $data_structure_section->getRow('smw_docu'); $sf_name = wfMessage('specialpages-group-sf_group')->text(); $sf_docu_label = wfMessage('adminlinks_documentation', $sf_name)->text(); $smw_docu_row->addItem(ALItem::newFromExternalLink("http://www.mediawiki.org/wiki/Extension:Semantic_Forms", $sf_docu_label)); return true; }
public static function addToAdminLinks(&$admin_links_tree) { $data_structure_label = wfMessage('smw_adminlinks_datastructure')->text(); $data_structure_section = $admin_links_tree->getSection($data_structure_label); if (is_null($data_structure_section)) { $data_structure_section = new ALSection(wfMessage('sf-adminlinks-datastructure')->text()); // If we are here, it most likely means that SMW is // not installed. Still, we'll refer to everything as // SMW, to make the rest of the code more // straightforward. $smw_row = new ALRow('smw'); $smw_row->addItem(ALItem::newFromSpecialPage('Categories')); $data_structure_section->addRow($smw_row); $smw_admin_row = new ALRow('smw_admin'); $data_structure_section->addRow($smw_admin_row); // If SMW is not installed, don't bother with a "links // to the documentation" row - it would only have one // link. //$smw_docu_row = new ALRow( 'smw_docu' ); //$data_structure_section->addRow( $smw_docu_row ); $admin_links_tree->addSection($data_structure_section, wfMessage('adminlinks_browsesearch')->text()); } else { $smw_row = $data_structure_section->getRow('smw'); $smw_admin_row = $data_structure_section->getRow('smw_admin'); $smw_docu_row = $data_structure_section->getRow('smw_docu'); } $smw_row->addItem(ALItem::newFromSpecialPage('Templates'), 'Properties'); $smw_row->addItem(ALItem::newFromSpecialPage('Forms'), 'SemanticStatistics'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateClass'), 'SMWAdmin'); if (class_exists('SFCreateProperty')) { $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateProperty'), 'SMWAdmin'); } $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateTemplate'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateForm'), 'SMWAdmin'); $smw_admin_row->addItem(ALItem::newFromSpecialPage('CreateCategory'), 'SMWAdmin'); if (isset($smw_docu_row)) { $sf_name = wfMessage('specialpages-group-sf_group')->text(); $sf_docu_label = wfMessage('adminlinks_documentation', $sf_name)->text(); $smw_docu_row->addItem(ALItem::newFromExternalLink("http://www.mediawiki.org/wiki/Extension:Semantic_Forms", $sf_docu_label)); } return true; }
public static function addToAdminLinks(&$admin_links_tree) { $browse_search_section = $admin_links_tree->getSection(wfMessage('adminlinks_browsesearch')->text()); $sd_row = new ALRow('sd'); $sd_row->addItem(ALItem::newFromSpecialPage('BrowseData')); $sd_name = wfMessage('specialpages-group-sd_group')->text(); $sd_docu_label = wfMessage('adminlinks_documentation', $sd_name)->text(); $sd_row->addItem(AlItem::newFromExternalLink("https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown", $sd_docu_label)); $browse_search_section->addRow($sd_row); return true; }
/** * Add a link to 'Special:ApprovedPages' to the the page * 'Special:AdminLinks', defined by the Admin Links extension. */ static function addToAdminLinks(&$admin_links_tree) { $general_section = $admin_links_tree->getSection(wfMessage('adminlinks_general')->text()); $extensions_row = $general_section->getRow('extensions'); if (is_null($extensions_row)) { $extensions_row = new ALRow('extensions'); $general_section->addRow($extensions_row); } $extensions_row->addItem(ALItem::newFromSpecialPage('ApprovedRevs')); $extensions_row->addItem(ALItem::newFromSpecialPage('ApprovedFiles')); return true; }
/** * Adds links to Configure's special pages to the Special:AdminLinks page, * defined by the Admin Links extension */ function efConfigureAddToAdminLinks(&$adminLinksTree) { $generalSection = $adminLinksTree->getSection(wfMsg('adminlinks_general')); $configureRow = new ALRow('configure'); $configureRow->addItem(ALItem::newFromSpecialPage('Configure')); $configureRow->addItem(ALItem::newFromSpecialPage('Extensions')); $configureRow->addItem(ALItem::newFromSpecialPage('ViewConfig')); $generalSection->addRow($configureRow); return true; }
/** * Add links to the 'AdminLinks' special page, defined by the Admin Links * extension */ function dtfAddToAdminLinks($admin_links_tree) { $import_export_section = $admin_links_tree->getSection(wfMsg('adminlinks_importexport')); $main_row = $import_export_section->getRow('main'); $main_row->addItem(ALItem::newFromSpecialPage('ViewXML')); $main_row->addItem(ALItem::newFromSpecialPage('ImportXML')); $main_row->addItem(ALItem::newFromSpecialPage('ImportCSV')); return true; }
/** * For AdminLinks extension * @param $admin_links_tree * @return bool */ public static function confirmAccountAdminLinks(&$admin_links_tree) { $users_section = $admin_links_tree->getSection(wfMsg('adminlinks_users')); $extensions_row = $users_section->getRow('extensions'); if (is_null($extensions_row)) { $extensions_row = new ALRow('extensions'); $users_section->addRow($extensions_row); } $extensions_row->addItem(ALItem::newFromSpecialPage('ConfirmAccounts')); $extensions_row->addItem(ALItem::newFromSpecialPage('UserCredentials')); return true; }
/** * Hook: AdminLinks */ public static function onAdminLinks(&$tree) { global $wgTranslateUseSandbox; if ($wgTranslateUseSandbox) { $sectionLabel = wfMessage('adminlinks_users')->text(); $row = $tree->getSection($sectionLabel)->getRow('main'); $row->addItem(ALItem::newFromSpecialPage('TranslateSandbox')); } return true; }