if ($option[3][0] == 'checkbox' && $val != 'Y') {
                    $val = 'N';
                }
                if ($option[3][0] == 'multiselectbox') {
                    $val = @implode(',', $val);
                }
                if ($name == 'image_max_width' || $name == 'image_max_height') {
                    $val = (int) $val;
                }
                COption::SetOptionString($module_id, $name, $val, $option[1]);
            }
            if (IsModuleInstalled('socialnetwork')) {
                COption::SetOptionString($module_id, 'socnet_iblock_id', $_POST['socnet_iblock_id']);
                COption::SetOptionString($module_id, 'socnet_iblock_type_id', $_POST['socnet_iblock_type_id']);
                COption::SetOptionString($module_id, 'socnet_enable', $_POST['socnet_enable']);
                CWikiSocnet::EnableSocnet($_POST['socnet_enable'] === 'Y');
            }
        }
    }
    //if($MOD_RIGHT>="W"):
    $aTabs = array();
    $aTabs[] = array('DIV' => 'set', 'TAB' => GetMessage('MAIN_TAB_SET'), 'ICON' => 'wiki_settings', 'TITLE' => GetMessage('MAIN_TAB_TITLE_SET'));
    if (IsModuleInstalled('socialnetwork')) {
        $aTabs[] = array('DIV' => 'socnet', 'TAB' => GetMessage('WIKI_TAB_SOCNET'), 'TITLE' => GetMessage('WIKI_TAB_TITLE_SOCNET'), 'ICON' => 'wiki_settings');
    }
    $aTabs[] = array('DIV' => 'rights', 'TAB' => GetMessage('MAIN_TAB_RIGHTS'), 'ICON' => 'wiki_settings', 'TITLE' => GetMessage('MAIN_TAB_TITLE_RIGHTS'));
    $tabControl = new CAdminTabControl('tabControl', $aTabs);
    $tabControl->Begin();
    ?>
<style>
table.edit-table td.field-name  {
Exemple #2
0
 function DoUninstall()
 {
     global $APPLICATION, $DB;
     if (CModule::IncludeModule('socialnetwork')) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/wiki/include.php';
         CWikiSocnet::EnableSocnet(false);
     }
     $this->UnInstallFiles();
     $this->UnInstallDB();
     CBXFeatures::SetFeatureEnabled('Wiki', false);
     $APPLICATION->IncludeAdminFile(GetMessage('WIKI_UNINSTALL_TITLE'), $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/wiki/install/unstep.php');
 }
Exemple #3
0
         if (!empty($arUGroupsEx)) {
             $arFields["GROUP_ID"] = $arUGroupsEx;
         }
         $SOCNET_ID = $ib->Add($arFields);
         if ($SOCNET_ID <= 0) {
             $strWarning .= $ib->LAST_ERROR . "<br>";
             $bVarsFromForm = true;
             $DB->Rollback();
         } else {
             $DB->Commit();
             $_REQUEST["new_socnet_iblock_name"] = "";
             $_REQUEST["new_socnet_iblock"] = "created";
             COption::SetOptionString("wiki", "socnet_iblock_type_id", $IBLOCK_TYPE_ID);
             COption::SetOptionString("wiki", "socnet_iblock_id", $SOCNET_ID);
             COption::SetOptionString("wiki", "socnet_enable", "Y");
             CWikiSocnet::EnableSocnet(true);
         }
     }
 }
 if (!$bVarsFromForm && $_REQUEST["socnet_forum"] == "Y" && IsModuleInstalled("forum") && $GLOBALS["APPLICATION"]->GetGroupRight("forum") >= "W") {
     CModule::IncludeModule("forum");
     $arFields = array("ACTIVE" => "Y", "NAME" => $_REQUEST["socnet_forum_name"], "GROUP_ID" => array(1 => "Y", 2 => "E", 3 => "M"), "SITES" => array());
     $db_res = CSite::GetList($lby = "sort", $lorder = "asc");
     while ($res = $db_res->Fetch()) {
         if (IsModuleInstalled("intranet")) {
             $arFields["SITES"][$res["LID"]] = "/community/forum/forum#FORUM_ID#/topic#TOPIC_ID#/";
         } else {
             $arFields["SITES"][$res["LID"]] = "/communication/forum/forum#FORUM_ID#/topic#TOPIC_ID#/";
         }
     }
     $SOCNET_FORUM_ID = CForumNew::Add($arFields);