Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 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)) {
         $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;
 }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
 /**
  * Adds a link to Admin Links page.
  * 
  * @since 0.1
  * 
  * @return true
  */
 public static function addToAdminLinks(&$admin_links_tree)
 {
     $section = new ALSection('Survey');
     $row = new ALRow('smw');
     $row->addItem(AlItem::newFromSpecialPage('Surveys'));
     $section->addRow($row);
     $admin_links_tree->addSection($section, 'Survey');
     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;
}