5 require_once
"Services/Object/classes/class.ilObject2.php";
32 $set = $ilDB->query(
"SELECT * FROM il_blog".
33 " WHERE id = ".$ilDB->quote($this->id,
"integer"));
34 $row = $ilDB->fetchAssoc($set);
46 $ilDB->manipulate(
"INSERT INTO il_blog (id,notes,ppic) VALUES (".
47 $ilDB->quote($this->id,
"integer").
",".
48 $ilDB->quote(
true,
"integer").
",".
49 $ilDB->quote(
true,
"integer").
")");
58 include_once
"Modules/Blog/classes/class.ilBlogPosting.php";
62 include_once
"./Services/Notification/classes/class.ilNotification.php";
65 $ilDB->manipulate(
"DELETE FROM il_blog".
66 " WHERE id = ".$ilDB->quote($this->id,
"integer"));
75 $ilDB->manipulate(
"UPDATE il_blog".
76 " SET notes = ".$ilDB->quote($this->getNotesStatus(),
"integer").
77 ",ppic = ".$ilDB->quote($this->hasProfilePicture(),
"integer").
78 ",bg_color = ".$ilDB->quote($this->getBackgroundColor(),
"text").
79 ",font_color = ".$ilDB->quote($this->getFontcolor(),
"text").
80 ",img = ".$ilDB->quote($this->getImage(),
"text").
81 " WHERE id = ".$ilDB->quote($this->id,
"integer"));
102 $this->notes = (bool)$a_status;
122 $this->ppic = (bool)$a_status;
134 $this->bg_color =
"ffffff";
146 $this->bg_color = (string)$a_value;
156 if(!$this->font_color)
158 $this->font_color =
"505050";
170 $this->font_color = (string)$a_value;
190 $this->img = (string)$a_value;
205 return $path.$this->img;
221 include_once
"Modules/Blog/classes/class.ilFSStorageBlog.php";
238 include_once
"Modules/Blog/classes/class.ilFSStorageBlog.php";
242 $path = $storage->getAbsolutePath().
"/";
246 $path .= $a_subdir.
"/";
273 $clean_name = preg_replace(
"/[^a-zA-Z0-9\_\.\-]/",
"", $a_upload[
"name"]);
276 $original =
"org_".$this->id.
"_".$clean_name;
277 $thumb =
"thb_".$this->id.
"_".$clean_name;
278 $processed = $this->
id.
"_".$clean_name;
280 if(@move_uploaded_file($a_upload[
"tmp_name"],
$path.$original))
282 chmod(
$path.$original, 0770);
285 $dimensions = $blga_set->get(
"banner_width").
"x".
286 $blga_set->get(
"banner_height");
293 ilUtil::execConvert($original_file.
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
294 ilUtil::execConvert($original_file.
"[0] -geometry ".$dimensions.
"! -quality 100 JPEG:".$processed_file);
307 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
318 include_once
"./Services/Notification/classes/class.ilNotification.php";
320 $a_blog_wsp_id, $a_posting_id, ($a_action ==
"comment"));
331 include_once
"./Modules/Blog/classes/class.ilBlogPosting.php";
333 $posting_title = $posting->getTitle();
336 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
342 include_once
"./Services/Mail/classes/class.ilMail.php";
343 include_once
"./Services/User/classes/class.ilObjUser.php";
344 include_once
"./Services/Language/classes/class.ilLanguageFactory.php";
345 include_once(
"./Services/User/classes/class.ilUserUtil.php");
349 foreach(array_unique($users) as $idx => $user_id)
352 if($a_action !=
"comment" && $user_id ==
$owner)
358 if($user_id != $ilUser->getId())
362 $ulng->loadLanguageModule(
'blog');
364 $subject = sprintf($ulng->txt(
'blog_change_notification_subject'), $blog_title);
367 $message .= $ulng->txt(
'blog_change_notification_body_'.$a_action).
":\n\n";
368 $message .= $ulng->txt(
'obj_blog').
": ".$blog_title.
"\n";
369 $message .= $ulng->txt(
'blog_posting').
": ".$posting_title.
"\n";
371 $message .= $ulng->txt(
'blog_change_notification_link').
": ".$link;
373 $mail_obj =
new ilMail(ANONYMOUS_USER_ID);
374 $mail_obj->appendInstallationSignature(
true);
376 "",
"", $subject, $message, array(), array(
"system"));