3 include_once(
"./classes/class.ilObjectGUI.php");
23 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
28 $this->lng->loadLanguageModule(
"blog");
39 global $rbacsystem,
$ilErr,$ilAccess;
41 $next_class = $this->ctrl->getNextClass($this);
42 $cmd = $this->ctrl->getCmd();
53 case 'ilpermissiongui':
54 $this->tabs_gui->setTabActive(
'perm_settings');
55 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
57 $ret =& $this->ctrl->forwardCommand($perm_gui);
63 $cmd =
"editSettings";
80 global $rbacsystem, $ilAccess;
82 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
84 $this->tabs_gui->addTarget(
"settings",
85 $this->ctrl->getLinkTarget($this,
"editSettings"),
86 array(
"editSettings",
"view"));
89 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
91 $this->tabs_gui->addTarget(
"perm_settings",
92 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
93 array(),
'ilpermissiongui');
105 $this->tabs_gui->setTabActive(
'settings');
107 if (!$ilSetting->get(
"disable_wsp_blogs"))
120 $this->tpl->setContent($a_form->getHTML());
134 if($form->checkInput())
136 $banner = (bool)$form->getInput(
"banner");
139 $blga_set->set(
"banner", $banner);
140 $blga_set->set(
"banner_width", (
int)$form->getInput(
"width"));
141 $blga_set->set(
"banner_height", (
int)$form->getInput(
"height"));
144 $ilCtrl->redirect($this,
"editSettings");
147 $form->setValuesByPost();
158 $ilCtrl->redirect($this,
"view");
170 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
172 $form->setFormAction($this->ctrl->getFormAction($this));
173 $form->setTitle($this->lng->txt(
'blog_settings'));
174 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
175 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
178 $banner->
setInfo($lng->txt(
"blog_preview_banner_info"));
179 $form->addItem($banner);
181 $width =
new ilNumberInputGUI($lng->txt(
"blog_preview_banner_width"),
"width");
184 $banner->addSubItem($width);
186 $height =
new ilNumberInputGUI($lng->txt(
"blog_preview_banner_height"),
"height");
189 $banner->addSubItem($height);
192 $banner->setChecked($blga_set->get(
"banner"));
193 if($blga_set->get(
"banner"))
195 $width->setValue($blga_set->get(
"banner_width"));
196 $height->setValue($blga_set->get(
"banner_height"));
200 $width->setValue(880);
201 $height->setValue(100);