Exemplo n.º 1
0
$header->str = $headerTitle;
echo '<br />' . $header->show();
echo '<p>' . $this->objLanguage->code2Txt('mod_context_selectcontextpluginsabs', 'context', array('plugins' => 'plugins'), 'Select the [-plugins-] you would like to use in your [-context-]') . ':</p>';
$form = new form('updateplugins', $this->uri(array('action' => 'savestep4')));
$table = $this->newObject('htmltable', 'htmlelements');
$objIcon = $this->newObject('geticon', 'htmlelements');
$counter = 0;
$newPlugins = array();
foreach ($plugins as $plugin) {
    $newPlugins[$plugin['title']] = $plugin;
}
ksort($newPlugins);
foreach ($newPlugins as $plugin) {
    $counter++;
    $checkbox = new checkbox('plugins[]');
    $checkbox->setValue($plugin['module_id']);
    $checkbox->setId('module_' . $plugin['module_id']);
    if (in_array($plugin['module_id'], $contextModules)) {
        $checkbox->setChecked(TRUE);
    }
    $objIcon->setModuleIcon($plugin['module_id']);
    if ($counter % 2 == 1) {
        $table->startRow();
    }
    $table->addCell($checkbox->show(), 20);
    $label = new label($objIcon->show(), 'module_' . $plugin['module_id']);
    $table->addCell($label->show(), 30);
    $label = new label('<strong>' . $plugin['title'] . '</strong><br />' . $plugin['description'], 'module_' . $plugin['module_id']);
    $table->addCell($label->show() . '<br /><br />');
    if ($counter % 2 == 2) {
        $table->endRow();
Exemplo n.º 2
0
 $desc = $this->objCatalogueConfig->getModuleDescription($moduleId);
 $status = $this->objCatalogueConfig->getModuleStatus($moduleId);
 if (isset($desc[0])) {
     $desc = (string) $desc[0];
 } else {
     $desc = $this->objLanguage->languageText('mod_modulecatalogue_nodesc', 'modulecatalogue');
 }
 $desc = $this->objLanguage->abstractText($desc);
 $objWasher = $this->getObject('bbcodeparser', 'utilities');
 $desc = $objWasher->parse4BBcode($desc);
 $infoButton =& new Link($this->uri(array('action' => 'info', 'mod' => $moduleId, 'cat' => $activeCat), 'modulecatalogue'));
 $infoButton->link = $this->objLanguage->languageText('mod_modulecatalogue_info2', 'modulecatalogue');
 $link = $moduleName = ucfirst($moduleName);
 $objCheck = new checkbox('arrayList[]');
 $objCheck->cssId = 'checkbox_' . $moduleId;
 $objCheck->setValue($moduleId);
 $objCheck->extra = 'onclick="javascript:toggleChecked(this);"';
 if ($this->objModFile->findRegisterFile($moduleId)) {
     //has regfile
     $texts = $textButton->show();
     $info = $infoButton->show();
     if (!in_array($moduleId, $rMods)) {
         //not registered
         $instButton =& new Link($this->uri(array('action' => 'install', 'mod' => $moduleId, 'cat' => $activeCat, 'srchstr' => $srchStr, 'srchtype' => $srchType, 'lastaction' => $lastAction), 'modulecatalogue'));
         $instButton->link = $this->objLanguage->languageText('word_install');
         $instButton->extra = "class=\"pseudobutton\"";
         $instButtonShow = $instButton->show();
         if (!$batchuninstall) {
             $checkBox = $objCheck->show();
         } else {
             $checkBox = '';