ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilBlogPostingGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5include_once("./Modules/Blog/classes/class.ilBlogPosting.php");
6
19{
20 protected $node_id; // [int]
21 protected $access_handler; // [object]
22 protected $enable_public_notes; // [bool]
23 protected $may_contribute; // [bool]
24
36 function __construct($a_node_id, $a_access_handler = null, $a_id = 0, $a_old_nr = 0, $a_enable_public_notes = true, $a_may_contribute = true, $a_style_sheet_id = 0)
37 {
38 global $tpl, $lng;
39
40 $lng->loadLanguageModule("blog");
41
42 $this->node_id = $a_node_id;
43 $this->access_handler = $a_access_handler;
44 $this->enable_public_notes = (bool)$a_enable_public_notes;
45
46 parent::__construct("blp", $a_id, $a_old_nr);
47
48 // needed for notification
49 $this->getBlogPosting()->setBlogNodeId($this->node_id, $this->isInWorkspace());
50
51 // #11151
52 $this->may_contribute = (bool)$a_may_contribute;
53 $this->setEnableEditing($a_may_contribute);
54
55 // content style
56 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
57
58 $tpl->setCurrentBlock("SyntaxStyle");
59 $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
61 $tpl->parseCurrentBlock();
62
63 // #17814
64 $tpl->setCurrentBlock("ContentStyle");
65 $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
66 ilObjStyleSheet::getContentStylePath($a_style_sheet_id));
67 $tpl->parseCurrentBlock();
68
69 // needed for editor
70 $this->setStyleId($a_style_sheet_id);
71 }
72
76 function executeCommand()
77 {
78 global $ilCtrl, $ilTabs, $ilLocator, $tpl;
79
80 $next_class = $ilCtrl->getNextClass($this);
81 $cmd = $ilCtrl->getCmd();
82
83 $posting = $this->getBlogPosting();
84 $ilCtrl->setParameter($this, "blpg", $posting->getId());
85
86 switch($next_class)
87 {
88 case "ilnotegui":
89 // $this->getTabs();
90 // $ilTabs->setTabActive("pg");
91 return $this->previewFullscreen();
92
93 /*
94 case "ilratinggui":
95 include_once("./Services/Rating/classes/class.ilRatingGUI.php");
96 $rating_gui = new ilRatingGUI();
97 $rating_gui->setObject($this->getBlogPosting()->getParentId(), "blog",
98 $this->getBlogPosting()->getId(), "blp");
99 $this->ctrl->forwardCommand($rating_gui);
100 $ilCtrl->redirect($this, "preview");
101 break;
102 */
103
104 case "ilpageobjectgui":
105 die("Deprecated. Blog Posting gui forwarding to ilpageobject");
106 return;
107
108 default:
109 if($posting)
110 {
111 $this->setPresentationTitle($posting->getTitle());
112
113 $tpl->setTitle(ilObject::_lookupTitle($this->getBlogPosting()->getBlogId()).": ". // #15017
114 $posting->getTitle());
115 $tpl->setTitleIcon(ilUtil::getImagePath("icon_blog.svg"),
116 $this->lng->txt("obj_blog")); // #12879
117
118 $ilLocator->addItem($posting->getTitle(),
119 $ilCtrl->getLinkTarget($this, "preview"));
120 }
121 return parent::executeCommand();
122 }
123 }
124
130 function setBlogPosting(ilBlogPosting $a_posting)
131 {
132 $this->setPageObject($a_posting);
133 }
134
140 function getBlogPosting()
141 {
142 return $this->getPageObject();
143 }
144
151 protected function checkAccess($a_cmd)
152 {
153 if($a_cmd == "contribute")
154 {
156 }
157 return $this->access_handler->checkAccess($a_cmd, "", $this->node_id);
158 }
159
163 function preview($a_mode = null)
164 {
165 global $ilCtrl, $tpl, $ilSetting;
166
167 $this->getBlogPosting()->increaseViewCnt();
168
169 $wtpl = new ilTemplate("tpl.blog_page_view_main_column.html",
170 true, true, "Modules/Blog");
171
172 // page commands
173 if(!$a_mode)
174 {
175 /*
176 // delete
177 $page_commands = false;
178 if ($this->checkAccess("write"))
179 {
180 $wtpl->setCurrentBlock("page_command");
181 $wtpl->setVariable("HREF_PAGE_CMD",
182 $ilCtrl->getLinkTarget($this, "deleteBlogPostingConfirmationScreen"));
183 $wtpl->setVariable("TXT_PAGE_CMD", $lng->txt("delete"));
184 $wtpl->parseCurrentBlock();
185 }
186 if ($page_commands)
187 {
188 $wtpl->setCurrentBlock("page_commands");
189 $wtpl->parseCurrentBlock();
190 }
191 */
192 }
193 else
194 {
195 $callback = array($this, "observeNoteAction");
196
197 // notes
198
199 $may_delete_comments = ($this->checkAccess("contribute") &&
200 $ilSetting->get("comments_del_tutor", 1));
201
202 $wtpl->setVariable("NOTES", $this->getNotesHTML($this->getBlogPosting(),
203 false, $this->enable_public_notes, $may_delete_comments, $callback));
204 }
205
206 // permanent link
207 if($a_mode != "embedded")
208 {
209 $append = ($_GET["blpg"] != "")
210 ? "_".$_GET["blpg"]
211 : "";
212 if($this->isInWorkspace())
213 {
214 $append .= "_wsp";
215 }
216 $tpl->setPermanentLink("blog", $this->node_id, $append);
217 }
218
219 $wtpl->setVariable("PAGE", parent::preview());
220
221 $tpl->setLoginTargetPar("blog_".$this->node_id.$append);
222
223 $ilCtrl->setParameter($this, "blpg", $this->getBlogPosting()->getId());
224
225 return $wtpl->get();
226 }
227
234 {
235 return $this->preview("embedded");
236 }
237
244 {
245 $this->add_date = true;
246 return $this->preview("fullscreen");
247 }
248
254 function showPage()
255 {
256 $this->setTemplateOutput(false);
257
258 if (!$this->getAbstractOnly())
259 {
260 $this->setPresentationTitle($this->getBlogPosting()->getTitle());
261 }
262 $this->getBlogPosting()->increaseViewCnt();
263
264 return parent::showPage();
265 }
266
272 protected function isInWorkspace()
273 {
274 return stristr(get_class($this->access_handler), "workspace");
275 }
276
283 function postOutputProcessing($a_output)
284 {
285 // #8626/#9370
286 if(($this->getOutputMode() == "preview" || $this->getOutputMode() == "offline")
287 && !$this->getAbstractOnly() && $this->add_date)
288 {
289 $author = "";
290 if(!$this->isInWorkspace())
291 {
292 $authors = array();
293 $author_id = $this->getBlogPosting()->getAuthor();
294 if($author_id)
295 {
296 include_once "Services/User/classes/class.ilUserUtil.php";
297 $authors[] = ilUserUtil::getNamePresentation($author_id);
298 }
299
300 foreach(ilBlogPosting::getPageContributors("blp", $this->getBlogPosting()->getId()) as $editor)
301 {
302 if($editor["user_id"] != $author_id)
303 {
304 $authors[] = ilUserUtil::getNamePresentation($editor["user_id"]);
305 }
306 }
307
308 if($authors)
309 {
310 $author = implode(", ", $authors)." - ";
311 }
312 }
313
314 // prepend creation date
317 $prefix = "<div class=\"il_BlockInfo\" style=\"text-align:right\">".
318 $author.ilDatePresentation::formatDate($this->getBlogPosting()->getCreated()).
319 "</div>";
321
322 $a_output = $prefix.$a_output;
323 }
324
325 return $a_output;
326 }
327
333 function getTabs($a_activate = "")
334 {
335 global $ilCtrl;
336
337 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", $this->getBlogPosting()->getId());
338
339 parent::getTabs($a_activate);
340 }
341
346 {
347 global $tpl, $ilCtrl, $lng;
348
349 if ($this->checkAccess("write") || $this->checkAccess("contribute"))
350 {
351 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
352 $confirmation_gui = new ilConfirmationGUI();
353 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
354 $confirmation_gui->setHeaderText($lng->txt("blog_posting_deletion_confirmation"));
355 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelBlogPostingDeletion");
356 $confirmation_gui->setConfirm($lng->txt("delete"), "confirmBlogPostingDeletion");
357
358 $dtpl = new ilTemplate("tpl.blog_posting_deletion_confirmation.html", true,
359 true, "Modules/Blog");
360
361 $dtpl->setVariable("PAGE_TITLE", $this->getBlogPosting()->getTitle());
362
363 // notes/comments
364 include_once("./Services/Notes/classes/class.ilNote.php");
365 $cnt_note_users = ilNote::getUserCount($this->getBlogPosting()->getParentId(),
366 $this->getBlogPosting()->getId(), "wpg");
367 $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
368 $lng->txt("blog_number_users_notes_or_comments"));
369 $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
370
371 $confirmation_gui->addItem("", "", $dtpl->get());
372
373 $tpl->setContent($confirmation_gui->getHTML());
374 }
375 }
376
381 {
382 global $ilCtrl;
383
384 $ilCtrl->redirect($this, "preview");
385 }
386
391 {
392 global $ilCtrl, $lng;
393
394 if ($this->checkAccess("write") || $this->checkAccess("contribute"))
395 {
396 // delete all md keywords
397 $md_section = $this->getBlogPosting()->getMDSection();
398 foreach($md_section->getKeywordIds() as $id)
399 {
400 $md_key = $md_section->getKeyword($id);
401 $md_key->delete();
402 }
403
404 $this->getBlogPosting()->delete();
405 ilUtil::sendSuccess($lng->txt("blog_posting_deleted"), true);
406 }
407
408 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", ""); // #14363
409 $ilCtrl->redirectByClass("ilobjbloggui", "render");
410 }
411
412 function editTitle($a_form = null)
413 {
414 global $tpl, $ilTabs;
415
416 $ilTabs->activateTab("edit");
417
418 if(!$a_form)
419 {
420 $a_form = $this->initTitleForm();
421 }
422
423 $tpl->setContent($a_form->getHTML());
424 }
425
426 function updateTitle()
427 {
428 global $ilCtrl, $lng;
429
430 $form = $this->initTitleForm();
431 if($form->checkInput())
432 {
433 $page = $this->getPageObject();
434 $page->setTitle($form->getInput("title"));
435 $page->update();
436
437 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
438 $ilCtrl->redirect($this, "preview");
439 }
440
441 $form->setValuesByPost();
442 $this->editTitle($form);
443 }
444
445 function initTitleForm()
446 {
447 global $lng, $ilCtrl;
448
449 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
450 $form = new ilPropertyFormGUI();
451 $form->setFormAction($ilCtrl->getFormAction($this));
452 $form->setTitle($lng->txt('blog_rename_posting'));
453
454 $title = new ilTextInputGUI($lng->txt("title"), "title");
455 $title->setRequired(true);
456 $form->addItem($title);
457
458 $title->setValue($this->getPageObject()->getTitle());
459
460 $form->addCommandButton('updateTitle', $lng->txt('save'));
461 $form->addCommandButton('preview', $lng->txt('cancel'));
462
463 return $form;
464 }
465
466 function editDate($a_form = null)
467 {
468 global $tpl, $ilTabs;
469
470 $ilTabs->activateTab("edit");
471
472 if(!$a_form)
473 {
474 $a_form = $this->initDateForm();
475 }
476
477 $tpl->setContent($a_form->getHTML());
478 }
479
480 function updateDate()
481 {
482 global $ilCtrl, $lng;
483
484 $form = $this->initDateForm();
485 if($form->checkInput())
486 {
487 $dt = $form->getInput("date");
488 $dt = new ilDateTime($dt["date"]." ".$dt["time"], IL_CAL_DATETIME);
489
490 $page = $this->getPageObject();
491 $page->setCreated($dt);
492 $page->update();
493
494 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
495 $ilCtrl->redirect($this, "preview");
496 }
497
498 $form->setValuesByPost();
499 $this->editTitle($form);
500 }
501
502 function initDateForm()
503 {
504 global $lng, $ilCtrl;
505
506 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
507 $form = new ilPropertyFormGUI();
508 $form->setFormAction($ilCtrl->getFormAction($this));
509 $form->setTitle($lng->txt('blog_edit_date'));
510
511 $date = new ilDateTimeInputGUI($lng->txt("date"), "date");
512 $date->setRequired(true);
513 $date->setShowTime(true);
514 $date->setInfo($lng->txt('blog_edit_date_info'));
515 $form->addItem($date);
516
517 $date->setDate($this->getPageObject()->getCreated());
518
519 $form->addCommandButton('updateDate', $lng->txt('save'));
520 $form->addCommandButton('preview', $lng->txt('cancel'));
521
522 return $form;
523 }
524
525 function observeNoteAction($a_blog_id, $a_posting_id, $a_type, $a_action, $a_note_id)
526 {
527 // #10040 - get note text
528 include_once "Services/Notes/classes/class.ilNote.php";
529 $note = new ilNote($a_note_id);
530 $note = $note->getText();
531
532 include_once "Modules/Blog/classes/class.ilObjBlog.php";
533 ilObjBlog::sendNotification("comment", $this->isInWorkspace(), $this->node_id, $a_posting_id, $note);
534 }
535
536 protected function getActivationCaptions()
537 {
538 global $lng;
539
540 return array("deactivatePage" => $lng->txt("blog_toggle_draft"),
541 "activatePage" => $lng->txt("blog_toggle_final"));
542 }
543
545 {
546 $this->deactivatePage(true);
547 }
548
549 function deactivatePage($a_to_list = false)
550 {
551 $this->getBlogPosting()->setApproved(false);
552 $this->getBlogPosting()->setActive(false);
553 $this->getBlogPosting()->update(true, false, false);
554 if(!$a_to_list)
555 {
556 $this->ctrl->redirect($this, "edit");
557 }
558 else
559 {
560 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
561 $this->ctrl->redirectByClass("ilobjbloggui", "");
562 }
563 }
564
566 {
567 $this->activatePage(true);
568 }
569
570 function activatePage($a_to_list = false)
571 {
572 // send notifications
573 include_once "Modules/Blog/classes/class.ilObjBlog.php";
574 ilObjBlog::sendNotification("new", $this->isInWorkspace(), $this->node_id, $this->getBlogPosting()->getId());
575
576 $this->getBlogPosting()->setActive(true);
577 $this->getBlogPosting()->update(true, false, false);
578 if(!$a_to_list)
579 {
580 $this->ctrl->redirect($this, "edit");
581 }
582 else
583 {
584 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
585 $this->ctrl->redirectByClass("ilobjbloggui", "");
586 }
587 }
588
589 function editKeywords(ilPropertyFormGUI $a_form = null)
590 {
591 global $ilTabs, $tpl;
592
593 if (!$this->checkAccess("contribute"))
594 {
595 return;
596 }
597
598 $ilTabs->activateTab("pg");
599
600 if(!$a_form)
601 {
602 $a_form = $this->initKeywordsForm();
603 }
604
605 $tpl->setContent($a_form->getHTML());
606 }
607
608 protected function initKeywordsForm()
609 {
610 global $ilUser;
611
612 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
613 $form = new ilPropertyFormGUI();
614 $form->setFormAction($this->ctrl->getFormAction($this, "saveKeywordsForm"));
615 $form->setTitle($this->lng->txt("blog_edit_keywords"));
616
617 $txt = new ilTextInputGUI($this->lng->txt("blog_keywords"), "keywords");
618 // $txt->setRequired(true); #10504
619 $txt->setMulti(true);
620 $txt->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
621 $txt->setMaxLength(200);
622 $txt->setSize(50);
623 $txt->setInfo($this->lng->txt("blog_keywords_info"));
624 $form->addItem($txt);
625
626 $md_section = $this->getBlogPosting()->getMDSection();
627
628 $keywords = array();
629 foreach($ids = $md_section->getKeywordIds() as $id)
630 {
631 $md_key = $md_section->getKeyword($id);
632 if (trim($md_key->getKeyword()) != "")
633 {
634 $keywords[$md_key->getKeywordLanguageCode()][]
635 = $md_key->getKeyword();
636 }
637 }
638
639 // language is not "used" anywhere
640 $ulang = $ilUser->getLanguage();
641 if($keywords[$ulang])
642 {
643 asort($keywords[$ulang]);
644 $txt->setValue($keywords[$ulang]);
645 }
646
647 // other keywords in blog
648 $other = array();
649 foreach(array_keys(ilBlogPosting::getAllPostings($this->getBlogPosting()->getBlogId())) as $posting_id)
650 {
651 if($posting_id != $this->getBlogPosting()->getId())
652 {
653 $other = array_merge($other, ilBlogPosting::getKeywords($this->getBlogPosting()->getBlogId(), $posting_id));
654 }
655 }
656 // #17414
657 $other = array_unique($other);
658 sort($other, SORT_LOCALE_STRING);
659 if(is_array($keywords[$ulang]))
660 {
661 $other = array_diff($other, $keywords[$ulang]);
662 }
663 if(sizeof($other))
664 {
665 $html = "";
666 foreach($other as $item)
667 {
668 $html .= '<span class="ilTag">'.$item.'</span>';
669 }
670 $info = new ilNonEditableValueGUI($this->lng->txt("blog_keywords_other"), "", true);
671 $info->setInfo($this->lng->txt("blog_keywords_other_info"));
672 $info->setValue($html);
673 $form->addItem($info);
674 }
675
676 $form->addCommandButton("saveKeywordsForm", $this->lng->txt("save"));
677 $form->addCommandButton("preview", $this->lng->txt("cancel"));
678
679 return $form;
680 }
681
682 protected function getParentObjId()
683 {
684 if($this->node_id)
685 {
686 if($this->isInWorkspace())
687 {
688 return $this->access_handler->getTree()->lookupObjectId($this->node_id);
689 }
690 else
691 {
692 return ilObject::_lookupObjId($this->node_id);
693 }
694 }
695 }
696
698 {
699 $form = $this->initKeywordsForm();
700 if($form->checkInput())
701 {
702 $keywords = $form->getInput("keywords");
703 if(is_array($keywords))
704 {
705 $this->getBlogPosting()->updateKeywords($keywords);
706 }
707
708 $this->ctrl->redirect($this, "preview");
709 }
710
711 $form->setValuesByPost();
712 $this->editKeywords($form);
713 }
714
716 {
717 $force_all = (bool)$_GET["fetchall"];
718
719 include_once("./Services/MetaData/classes/class.ilMDKeyword.php");
721 "blp", $this->getParentObjId());
722
723 include_once("./Services/Search/classes/class.ilSearchSettings.php");
724 $cut = (int)ilSearchSettings::getInstance()->getAutoCompleteLength();
725
726 $has_more = false;
727 $result = array();
728 foreach ($res as $r)
729 {
730 if(!$force_all &&
731 sizeof($result["items"]) >= $cut)
732 {
733 $has_more = true;
734 break;
735 }
736 $entry = new stdClass();
737 $entry->value = $r;
738 $entry->label = $r;
739 $result["items"][] = $entry;
740 }
741
742 $result["hasMoreResults"] = $has_more;
743
744 include_once './Services/JSON/classes/class.ilJsonUtil.php';
746 exit;
747 }
748
761 static function getSnippet($a_id, $a_truncate = false, $a_truncate_length = 500, $a_truncate_sign = "...", $a_include_picture = false, $a_picture_width = 144, $a_picture_height = 144, $a_export_directory = null)
762 {
763 $bpgui = new self(0, null, $a_id);
764
765 // scan the full page for media objects
766 if($a_include_picture)
767 {
768 $img = $bpgui->getFirstMediaObjectAsTag($a_picture_width, $a_picture_height, $a_export_directory);
769 }
770
771 $bpgui->setRawPageContent(true);
772 $bpgui->setAbstractOnly(true);
773
774 // #8627: export won't work - should we set offline mode?
775 $bpgui->setFileDownloadLink(".");
776 $bpgui->setFullscreenLink(".");
777 $bpgui->setSourcecodeDownloadScript(".");
778
779 // render without title
780 $page = $bpgui->showPage();
781
782 if($a_truncate)
783 {
784 $page = ilPageObject::truncateHTML($page, $a_truncate_length, $a_truncate_sign);
785 }
786
787 if($img)
788 {
789 $page = '<div>'.$img.$page.'</div><div style="clear:both;"></div>';
790 }
791
792 return $page;
793 }
794
795 protected function getFirstMediaObjectAsTag($a_width = 144, $a_height = 144, $a_export_directory = null)
796 {
797 $this->obj->buildDom();
798 $mob_ids = $this->obj->collectMediaObjects();
799 if($mob_ids)
800 {
801 require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
802 foreach($mob_ids as $mob_id)
803 {
804 $mob_obj = new ilObjMediaObject($mob_id);
805 $mob_item = $mob_obj->getMediaItem("Standard");
806 if(stristr($mob_item->getFormat(), "image"))
807 {
808 $mob_size = $mob_item->getOriginalSize();
809 if($mob_size["width"] >= $a_width ||
810 $mob_size["height"] >= $a_height)
811 {
812 if(!$a_export_directory)
813 {
814 $mob_dir = ilObjMediaObject::_getDirectory($mob_obj->getId());
815 }
816 else
817 {
818 // see ilCOPageHTMLExport::exportHTMLMOB()
819 $mob_dir = "./mobs/mm_".$mob_obj->getId();
820 }
821 $mob_res = self::parseImage($mob_size["width"],
822 $mob_size["height"], $a_width, $a_height);
823
824
825 $location = $mob_item->getLocationType() == "Reference"
826 ? $mob_item->getLocation()
827 : $mob_dir."/".$mob_item->getLocation();
828
829 return '<img'.
830 ' src="'.$location.'"'.
831 ' width="'.$mob_res[0].'"'.
832 ' height="'.$mob_res[1].'"'.
833 ' class="ilBlogListItemSnippetPreviewImage ilFloatLeft noMirror"'.
834 ' />';
835 }
836 }
837 }
838 }
839 }
840
841 protected static function parseImage($src_width, $src_height, $tgt_width, $tgt_height)
842 {
843 $ratio_width = $ratio_height = 1;
844 if($src_width > $tgt_width)
845 {
846 $ratio_width = $tgt_width / $src_width;
847 }
848 if($src_height > $tgt_height)
849 {
850 $ratio_height = $tgt_height / $src_height;
851 }
852 $shrink_ratio = min($ratio_width, $ratio_height);
853
854 return array(
855 (int)round($src_width*$shrink_ratio),
856 (int)round($src_height*$shrink_ratio)
857 );
858 }
859}
860
861?>
$result
$location
Definition: buildRTE.php:44
$_GET["client_id"]
const IL_CAL_DATETIME
Class ilBlogPosting GUI class.
deactivatePage($a_to_list=false)
preview($a_mode=null)
Preview blog posting.
getActivationCaptions()
Get captions for activation action menu entries.
isInWorkspace()
Is current page part of personal workspace blog?
checkAccess($a_cmd)
Centralized access management.
previewEmbedded()
Needed for portfolio/blog handling.
previewFullscreen()
Needed for portfolio/blog handling.
postOutputProcessing($a_output)
Finalizing output processing.
static parseImage($src_width, $src_height, $tgt_width, $tgt_height)
getTabs($a_activate="")
Get tabs.
editKeywords(ilPropertyFormGUI $a_form=null)
getFirstMediaObjectAsTag($a_width=144, $a_height=144, $a_export_directory=null)
executeCommand()
execute command
deleteBlogPostingConfirmationScreen()
Delete blog posting confirmation screen.
setBlogPosting(ilBlogPosting $a_posting)
Set blog posting.
cancelBlogPostingDeletion()
Cancel blog posting deletion.
__construct($a_node_id, $a_access_handler=null, $a_id=0, $a_old_nr=0, $a_enable_public_notes=true, $a_may_contribute=true, $a_style_sheet_id=0)
Constructor.
confirmBlogPostingDeletion()
Delete the blog posting.
static getSnippet($a_id, $a_truncate=false, $a_truncate_length=500, $a_truncate_sign="...", $a_include_picture=false, $a_picture_width=144, $a_picture_height=144, $a_export_directory=null)
Get first text paragraph of page.
activatePage($a_to_list=false)
observeNoteAction($a_blog_id, $a_posting_id, $a_type, $a_action, $a_note_id)
showPage()
Embedded posting in portfolio.
getBlogPosting()
Get blog posting.
Class ilBlogPosting.
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
static getKeywords($a_obj_id, $a_posting_id)
Confirmation screen class.
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
This class represents a date/time property in a property form.
@classDescription Date and time handling
static encode($mixed, $suppress_native=false)
static _getMatchingKeywords($a_query, $a_type, $a_rbac_id=0)
Search for keywords.
This class represents a non editable value in a property form.
Note class.
static getUserCount($a_rep_obj_id, $a_obj_id, $a_type)
How many users have attached a note/comment to a given object?
static sendNotification($a_action, $a_in_wsp, $a_blog_node_id, $a_posting_id, $a_comment=null)
Class ilObjMediaObject.
_getDirectory($a_mob_id)
get directory for files of media object (static)
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
Class ilPageObjectGUI.
setPresentationTitle($a_title="")
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
Get html for public and/or private notes.
setPageObject($a_pg_obj)
Set Page Object.
getAbstractOnly()
Get abstract only.
getPageObject()
Get Page Object.
setEnableEditing($a_enableediting)
Set Enable Editing.
setTemplateOutput($a_output=true)
setStyleId($a_styleid)
Set Style Id.
static truncateHTML($a_text, $a_length=100, $a_ending='...', $a_exact=false, $a_consider_html=true)
Truncate (html) string.
static getPageContributors($a_parent_type, $a_page_id, $a_lang="-")
Get all contributors for parent object.
This class represents a property form user interface.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$txt
Definition: error.php:12
$html
Definition: example_001.php:87
$r
Definition: example_031.php:79
$info
Definition: example_052.php:80
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:54
global $ilSetting
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
global $ilUser
Definition: imgupload.php:15