ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilBlogPostingGUI Class Reference

Class ilBlogPosting GUI class. More...

+ Inheritance diagram for ilBlogPostingGUI:
+ Collaboration diagram for ilBlogPostingGUI:

Public Member Functions

 __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. More...
 
 executeCommand ()
 execute command More...
 
 setBlogPosting (ilBlogPosting $a_posting)
 Set blog posting. More...
 
 getBlogPosting ()
 Get blog posting. More...
 
 preview ($a_mode=null)
 Preview blog posting. More...
 
 previewEmbedded ()
 Needed for portfolio/blog handling. More...
 
 previewFullscreen ()
 Needed for portfolio/blog handling. More...
 
 showPage ()
 Embedded posting in portfolio. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 getTabs ($a_activate="")
 Get tabs. More...
 
 deleteBlogPostingConfirmationScreen ()
 Delete blog posting confirmation screen. More...
 
 cancelBlogPostingDeletion ()
 Cancel blog posting deletion. More...
 
 confirmBlogPostingDeletion ()
 Delete the blog posting. More...
 
 editTitle ($a_form=null)
 
 updateTitle ()
 
 initTitleForm ()
 
 editDate ($a_form=null)
 
 updateDate ()
 
 initDateForm ()
 
 observeNoteAction ($a_blog_id, $a_posting_id, $a_type, $a_action, $a_note_id)
 
 deactivatePageToList ()
 
 deactivatePage ($a_to_list=false)
 
 activatePageToList ()
 
 activatePage ($a_to_list=false)
 
 editKeywords (ilPropertyFormGUI $a_form=null)
 
 saveKeywordsForm ()
 
 keywordAutocomplete ()
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertContentIncludes ($a_html)
 Insert content includes. More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 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. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 

Static Public Member Functions

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. More...
 
- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 

Protected Member Functions

 checkAccess ($a_cmd)
 Centralized access management. More...
 
 isInWorkspace ()
 Is current page part of personal workspace blog? More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 initKeywordsForm ()
 
 getParentObjId ()
 
 getFirstMediaObjectAsTag ($a_width=144, $a_height=144, $a_export_directory=null)
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 isPageContainerToBeRendered ()
 

Static Protected Member Functions

static parseImage ($src_width, $src_height, $tgt_width, $tgt_height)
 

Protected Attributes

 $node_id
 
 $access_handler
 
 $enable_public_notes
 
 $may_contribute
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Additional Inherited Members

- Data Fields inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 

Detailed Description

Class ilBlogPosting GUI class.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilBlogPostingGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Calls ilBlogPostingGUI: ilRatingGUI, ilPublicUserProfileGUI, ilPageObjectGUI, ilNoteGUI

Definition at line 18 of file class.ilBlogPostingGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBlogPostingGUI::__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.

Parameters
int$a_node
object$a_access_handler
int$a_id
int$a_old_nr
bool$a_enable_notes
bool$a_may_contribute
Returns
ilBlogPostingGUI

Definition at line 36 of file class.ilBlogPostingGUI.php.

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 }
isInWorkspace()
Is current page part of personal workspace blog?
getBlogPosting()
Get blog posting.
getContentStylePath($a_style_id)
get content style path
getSyntaxStylePath()
get syntax style path
setEnableEditing($a_enableediting)
Set Enable Editing.
setStyleId($a_styleid)
Set Style Id.

References ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, getBlogPosting(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getSyntaxStylePath(), isInWorkspace(), ilPageObjectGUI\setEnableEditing(), and ilPageObjectGUI\setStyleId().

+ Here is the call graph for this function:

Member Function Documentation

◆ activatePage()

ilBlogPostingGUI::activatePage (   $a_to_list = false)

Definition at line 556 of file class.ilBlogPostingGUI.php.

557 {
558 // send notifications
559 include_once "Modules/Blog/classes/class.ilObjBlog.php";
560 ilObjBlog::sendNotification("new", $this->isInWorkspace(), $this->node_id, $this->getBlogPosting()->getId());
561
562 $this->getBlogPosting()->setActive(true);
563 $this->getBlogPosting()->update(true, false, false);
564 if(!$a_to_list)
565 {
566 $this->ctrl->redirect($this, "edit");
567 }
568 else
569 {
570 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
571 $this->ctrl->redirectByClass("ilobjbloggui", "");
572 }
573 }
static sendNotification($a_action, $a_in_wsp, $a_blog_node_id, $a_posting_id, $a_comment=null)

References getBlogPosting(), ilPageObjectGUI\getId(), isInWorkspace(), and ilObjBlog\sendNotification().

+ Here is the call graph for this function:

◆ activatePageToList()

ilBlogPostingGUI::activatePageToList ( )

Definition at line 551 of file class.ilBlogPostingGUI.php.

552 {
553 $this->activatePage(true);
554 }

References ilPageObjectGUI\activatePage().

+ Here is the call graph for this function:

◆ cancelBlogPostingDeletion()

ilBlogPostingGUI::cancelBlogPostingDeletion ( )

Cancel blog posting deletion.

Definition at line 366 of file class.ilBlogPostingGUI.php.

367 {
368 global $ilCtrl;
369
370 $ilCtrl->redirect($this, "preview");
371 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

◆ checkAccess()

ilBlogPostingGUI::checkAccess (   $a_cmd)
protected

Centralized access management.

Parameters
string$a_cmd
Returns
bool

Definition at line 151 of file class.ilBlogPostingGUI.php.

152 {
153 if($a_cmd == "contribute")
154 {
156 }
157 return $this->access_handler->checkAccess($a_cmd, "", $this->node_id);
158 }

References $may_contribute.

Referenced by confirmBlogPostingDeletion(), deleteBlogPostingConfirmationScreen(), editKeywords(), and preview().

+ Here is the caller graph for this function:

◆ confirmBlogPostingDeletion()

ilBlogPostingGUI::confirmBlogPostingDeletion ( )

Delete the blog posting.

Definition at line 376 of file class.ilBlogPostingGUI.php.

377 {
378 global $ilCtrl, $lng;
379
380 if ($this->checkAccess("write") || $this->checkAccess("contribute"))
381 {
382 // delete all md keywords
383 $md_section = $this->getBlogPosting()->getMDSection();
384 foreach($md_section->getKeywordIds() as $id)
385 {
386 $md_key = $md_section->getKeyword($id);
387 $md_key->delete();
388 }
389
390 $this->getBlogPosting()->delete();
391 ilUtil::sendSuccess($lng->txt("blog_posting_deleted"), true);
392 }
393
394 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", ""); // #14363
395 $ilCtrl->redirectByClass("ilobjbloggui", "render");
396 }
checkAccess($a_cmd)
Centralized access management.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilCtrl, ilPageObjectGUI\$lng, checkAccess(), getBlogPosting(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ deactivatePage()

ilBlogPostingGUI::deactivatePage (   $a_to_list = false)

Definition at line 535 of file class.ilBlogPostingGUI.php.

536 {
537 $this->getBlogPosting()->setApproved(false);
538 $this->getBlogPosting()->setActive(false);
539 $this->getBlogPosting()->update(true, false, false);
540 if(!$a_to_list)
541 {
542 $this->ctrl->redirect($this, "edit");
543 }
544 else
545 {
546 $this->ctrl->setParameterByClass("ilobjbloggui", "blpg", "");
547 $this->ctrl->redirectByClass("ilobjbloggui", "");
548 }
549 }

References getBlogPosting().

+ Here is the call graph for this function:

◆ deactivatePageToList()

ilBlogPostingGUI::deactivatePageToList ( )

Definition at line 530 of file class.ilBlogPostingGUI.php.

531 {
532 $this->deactivatePage(true);
533 }

References ilPageObjectGUI\deactivatePage().

+ Here is the call graph for this function:

◆ deleteBlogPostingConfirmationScreen()

ilBlogPostingGUI::deleteBlogPostingConfirmationScreen ( )

Delete blog posting confirmation screen.

Definition at line 331 of file class.ilBlogPostingGUI.php.

332 {
333 global $tpl, $ilCtrl, $lng;
334
335 if ($this->checkAccess("write") || $this->checkAccess("contribute"))
336 {
337 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
338 $confirmation_gui = new ilConfirmationGUI();
339 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
340 $confirmation_gui->setHeaderText($lng->txt("blog_posting_deletion_confirmation"));
341 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelBlogPostingDeletion");
342 $confirmation_gui->setConfirm($lng->txt("delete"), "confirmBlogPostingDeletion");
343
344 $dtpl = new ilTemplate("tpl.blog_posting_deletion_confirmation.html", true,
345 true, "Modules/Blog");
346
347 $dtpl->setVariable("PAGE_TITLE", $this->getBlogPosting()->getTitle());
348
349 // notes/comments
350 include_once("./Services/Notes/classes/class.ilNote.php");
351 $cnt_note_users = ilNote::getUserCount($this->getBlogPosting()->getParentId(),
352 $this->getBlogPosting()->getId(), "wpg");
353 $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
354 $lng->txt("blog_number_users_notes_or_comments"));
355 $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
356
357 $confirmation_gui->addItem("", "", $dtpl->get());
358
359 $tpl->setContent($confirmation_gui->getHTML());
360 }
361 }
Confirmation screen class.
static getUserCount($a_rep_obj_id, $a_obj_id, $a_type)
How many users have attached a note/comment to a given object?
special template class to simplify handling of ITX/PEAR

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, checkAccess(), getBlogPosting(), ilPageObjectGUI\getId(), and ilNote\getUserCount().

+ Here is the call graph for this function:

◆ editDate()

ilBlogPostingGUI::editDate (   $a_form = null)

Definition at line 452 of file class.ilBlogPostingGUI.php.

453 {
454 global $tpl, $ilTabs;
455
456 $ilTabs->activateTab("edit");
457
458 if(!$a_form)
459 {
460 $a_form = $this->initDateForm();
461 }
462
463 $tpl->setContent($a_form->getHTML());
464 }

References ilPageObjectGUI\$tpl, and initDateForm().

+ Here is the call graph for this function:

◆ editKeywords()

ilBlogPostingGUI::editKeywords ( ilPropertyFormGUI  $a_form = null)

Definition at line 575 of file class.ilBlogPostingGUI.php.

576 {
577 global $ilTabs, $tpl;
578
579 if (!$this->checkAccess("contribute"))
580 {
581 return;
582 }
583
584 $ilTabs->activateTab("pg");
585
586 if(!$a_form)
587 {
588 $a_form = $this->initKeywordsForm();
589 }
590
591 $tpl->setContent($a_form->getHTML());
592 }

References ilPageObjectGUI\$tpl, checkAccess(), and initKeywordsForm().

Referenced by saveKeywordsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editTitle()

ilBlogPostingGUI::editTitle (   $a_form = null)

Definition at line 398 of file class.ilBlogPostingGUI.php.

399 {
400 global $tpl, $ilTabs;
401
402 $ilTabs->activateTab("edit");
403
404 if(!$a_form)
405 {
406 $a_form = $this->initTitleForm();
407 }
408
409 $tpl->setContent($a_form->getHTML());
410 }

References ilPageObjectGUI\$tpl, and initTitleForm().

Referenced by updateDate(), and updateTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilBlogPostingGUI::executeCommand ( )

execute command

Reimplemented from ilPageObjectGUI.

Definition at line 76 of file class.ilBlogPostingGUI.php.

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 }
previewFullscreen()
Needed for portfolio/blog handling.
static _lookupTitle($a_id)
lookup object title
setPresentationTitle($a_title="")
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$cmd
Definition: sahs_server.php:35

References $cmd, $ilCtrl, ilPageObjectGUI\$tpl, ilObject\_lookupTitle(), getBlogPosting(), ilUtil\getImagePath(), previewFullscreen(), and ilPageObjectGUI\setPresentationTitle().

+ Here is the call graph for this function:

◆ getActivationCaptions()

ilBlogPostingGUI::getActivationCaptions ( )
protected

Get captions for activation action menu entries.

Reimplemented from ilPageObjectGUI.

Definition at line 522 of file class.ilBlogPostingGUI.php.

523 {
524 global $lng;
525
526 return array("deactivatePage" => $lng->txt("blog_toggle_draft"),
527 "activatePage" => $lng->txt("blog_toggle_final"));
528 }

References ilPageObjectGUI\$lng.

◆ getBlogPosting()

ilBlogPostingGUI::getBlogPosting ( )

Get blog posting.

@returnilBlogPosting

Definition at line 140 of file class.ilBlogPostingGUI.php.

141 {
142 return $this->getPageObject();
143 }
getPageObject()
Get Page Object.

References ilPageObjectGUI\getPageObject().

Referenced by __construct(), activatePage(), confirmBlogPostingDeletion(), deactivatePage(), deleteBlogPostingConfirmationScreen(), executeCommand(), getTabs(), initKeywordsForm(), postOutputProcessing(), preview(), saveKeywordsForm(), and showPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFirstMediaObjectAsTag()

ilBlogPostingGUI::getFirstMediaObjectAsTag (   $a_width = 144,
  $a_height = 144,
  $a_export_directory = null 
)
protected

Definition at line 781 of file class.ilBlogPostingGUI.php.

782 {
783 $this->obj->buildDom();
784 $mob_ids = $this->obj->collectMediaObjects();
785 if($mob_ids)
786 {
787 require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
788 foreach($mob_ids as $mob_id)
789 {
790 $mob_obj = new ilObjMediaObject($mob_id);
791 $mob_item = $mob_obj->getMediaItem("Standard");
792 if(stristr($mob_item->getFormat(), "image"))
793 {
794 $mob_size = $mob_item->getOriginalSize();
795 if($mob_size["width"] >= $a_width ||
796 $mob_size["height"] >= $a_height)
797 {
798 if(!$a_export_directory)
799 {
800 $mob_dir = ilObjMediaObject::_getDirectory($mob_obj->getId());
801 }
802 else
803 {
804 // see ilCOPageHTMLExport::exportHTMLMOB()
805 $mob_dir = "./mobs/mm_".$mob_obj->getId();
806 }
807 $mob_res = self::parseImage($mob_size["width"],
808 $mob_size["height"], $a_width, $a_height);
809
810 return '<img'.
811 ' src="'.$mob_dir."/".$mob_item->getLocation().'"'.
812 ' width="'.$mob_res[0].'"'.
813 ' height="'.$mob_res[1].'"'.
814 ' class="ilBlogListItemSnippetPreviewImage ilFloatLeft noMirror"'.
815 ' />';
816 }
817 }
818 }
819 }
820 }
static parseImage($src_width, $src_height, $tgt_width, $tgt_height)
Class ilObjMediaObject.
_getDirectory($a_mob_id)
get directory for files of media object (static)

References ilObjMediaObject\_getDirectory(), and parseImage().

+ Here is the call graph for this function:

◆ getParentObjId()

ilBlogPostingGUI::getParentObjId ( )
protected

Definition at line 668 of file class.ilBlogPostingGUI.php.

669 {
670 if($this->node_id)
671 {
672 if($this->isInWorkspace())
673 {
674 return $this->access_handler->getTree()->lookupObjectId($this->node_id);
675 }
676 else
677 {
678 return ilObject::_lookupObjId($this->node_id);
679 }
680 }
681 }
static _lookupObjId($a_id)

References ilObject\_lookupObjId(), and isInWorkspace().

Referenced by keywordAutocomplete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSnippet()

static ilBlogPostingGUI::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 
)
static

Get first text paragraph of page.

Parameters
int$a_id
bool$a_truncate
int$a_truncate_length
bool$a_include_picture
int$a_picture_width
int$a_picture_height
string$a_export_directory
Returns
string

Definition at line 747 of file class.ilBlogPostingGUI.php.

748 {
749 $bpgui = new self(0, null, $a_id);
750
751 // scan the full page for media objects
752 if($a_include_picture)
753 {
754 $img = $bpgui->getFirstMediaObjectAsTag($a_picture_width, $a_picture_height, $a_export_directory);
755 }
756
757 $bpgui->setRawPageContent(true);
758 $bpgui->setAbstractOnly(true);
759
760 // #8627: export won't work - should we set offline mode?
761 $bpgui->setFileDownloadLink(".");
762 $bpgui->setFullscreenLink(".");
763 $bpgui->setSourcecodeDownloadScript(".");
764
765 // render without title
766 $page = $bpgui->showPage();
767
768 if($a_truncate)
769 {
770 $page = ilPageObject::truncateHTML($page, $a_truncate_length, $a_truncate_sign);
771 }
772
773 if($img)
774 {
775 $page = '<div>'.$img.$page.'</div><div style="clear:both;"></div>';
776 }
777
778 return $page;
779 }
static truncateHTML($a_text, $a_length=100, $a_ending='...', $a_exact=false, $a_consider_html=true)
Truncate (html) string.

References $img, and ilPageObject\truncateHTML().

Referenced by ilObjBlog\deliverRSS(), ilBlogPosting\getNotificationAbstract(), and ilObjBlogGUI\renderList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilBlogPostingGUI::getTabs (   $a_activate = "")

Get tabs.

Parameters
string$a_activate

Reimplemented from ilPageObjectGUI.

Definition at line 319 of file class.ilBlogPostingGUI.php.

320 {
321 global $ilCtrl;
322
323 $ilCtrl->setParameterByClass("ilobjbloggui", "blpg", $this->getBlogPosting()->getId());
324
325 parent::getTabs($a_activate);
326 }

References $ilCtrl, getBlogPosting(), and ilPageObjectGUI\getId().

+ Here is the call graph for this function:

◆ initDateForm()

ilBlogPostingGUI::initDateForm ( )

Definition at line 488 of file class.ilBlogPostingGUI.php.

489 {
490 global $lng, $ilCtrl;
491
492 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
493 $form = new ilPropertyFormGUI();
494 $form->setFormAction($ilCtrl->getFormAction($this));
495 $form->setTitle($lng->txt('blog_edit_date'));
496
497 $date = new ilDateTimeInputGUI($lng->txt("date"), "date");
498 $date->setRequired(true);
499 $date->setShowTime(true);
500 $date->setInfo($lng->txt('blog_edit_date_info'));
501 $form->addItem($date);
502
503 $date->setDate($this->getPageObject()->getCreated());
504
505 $form->addCommandButton('updateDate', $lng->txt('save'));
506 $form->addCommandButton('preview', $lng->txt('cancel'));
507
508 return $form;
509 }
This class represents a date/time property in a property form.
This class represents a property form user interface.

References $ilCtrl, ilPageObjectGUI\$lng, and ilPageObjectGUI\getPageObject().

Referenced by editDate(), and updateDate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initKeywordsForm()

ilBlogPostingGUI::initKeywordsForm ( )
protected

Definition at line 594 of file class.ilBlogPostingGUI.php.

595 {
596 global $ilUser;
597
598 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
599 $form = new ilPropertyFormGUI();
600 $form->setFormAction($this->ctrl->getFormAction($this, "saveKeywordsForm"));
601 $form->setTitle($this->lng->txt("blog_edit_keywords"));
602
603 $txt = new ilTextInputGUI($this->lng->txt("blog_keywords"), "keywords");
604 // $txt->setRequired(true); #10504
605 $txt->setMulti(true);
606 $txt->setDataSource($this->ctrl->getLinkTarget($this, "keywordAutocomplete", "", true));
607 $txt->setMaxLength(200);
608 $txt->setSize(50);
609 $txt->setInfo($this->lng->txt("blog_keywords_info"));
610 $form->addItem($txt);
611
612 $md_section = $this->getBlogPosting()->getMDSection();
613
614 $keywords = array();
615 foreach($ids = $md_section->getKeywordIds() as $id)
616 {
617 $md_key = $md_section->getKeyword($id);
618 if (trim($md_key->getKeyword()) != "")
619 {
620 $keywords[$md_key->getKeywordLanguageCode()][]
621 = $md_key->getKeyword();
622 }
623 }
624
625 // language is not "used" anywhere
626 $ulang = $ilUser->getLanguage();
627 if($keywords[$ulang])
628 {
629 asort($keywords[$ulang]);
630 $txt->setValue($keywords[$ulang]);
631 }
632
633 // other keywords in blog
634 $other = array();
635 foreach(array_keys(ilBlogPosting::getAllPostings($this->getBlogPosting()->getBlogId())) as $posting_id)
636 {
637 if($posting_id != $this->getBlogPosting()->getId())
638 {
639 $other = array_merge($other, ilBlogPosting::getKeywords($this->getBlogPosting()->getBlogId(), $posting_id));
640 }
641 }
642 // #17414
643 $other = array_unique($other);
644 sort($other, SORT_LOCALE_STRING);
645 if(is_array($keywords[$ulang]))
646 {
647 $other = array_diff($other, $keywords[$ulang]);
648 }
649 if(sizeof($other))
650 {
651 $html = "";
652 foreach($other as $item)
653 {
654 $html .= '<span class="ilTag">'.$item.'</span>';
655 }
656 $info = new ilNonEditableValueGUI($this->lng->txt("blog_keywords_other"), "", true);
657 $info->setInfo($this->lng->txt("blog_keywords_other_info"));
658 $info->setValue($html);
659 $form->addItem($info);
660 }
661
662 $form->addCommandButton("saveKeywordsForm", $this->lng->txt("save"));
663 $form->addCommandButton("preview", $this->lng->txt("cancel"));
664
665 return $form;
666 }
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
static getKeywords($a_obj_id, $a_posting_id)
This class represents a non editable value in a property form.
This class represents a text property in a property form.
$txt
Definition: error.php:10
global $ilUser
Definition: imgupload.php:15

References $ilUser, $txt, ilBlogPosting\getAllPostings(), getBlogPosting(), ilPageObjectGUI\getId(), and ilBlogPosting\getKeywords().

Referenced by editKeywords(), and saveKeywordsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTitleForm()

ilBlogPostingGUI::initTitleForm ( )

Definition at line 431 of file class.ilBlogPostingGUI.php.

432 {
433 global $lng, $ilCtrl;
434
435 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
436 $form = new ilPropertyFormGUI();
437 $form->setFormAction($ilCtrl->getFormAction($this));
438 $form->setTitle($lng->txt('blog_rename_posting'));
439
440 $title = new ilTextInputGUI($lng->txt("title"), "title");
441 $title->setRequired(true);
442 $form->addItem($title);
443
444 $title->setValue($this->getPageObject()->getTitle());
445
446 $form->addCommandButton('updateTitle', $lng->txt('save'));
447 $form->addCommandButton('preview', $lng->txt('cancel'));
448
449 return $form;
450 }

References $ilCtrl, ilPageObjectGUI\$lng, and ilPageObjectGUI\getPageObject().

Referenced by editTitle(), and updateTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInWorkspace()

ilBlogPostingGUI::isInWorkspace ( )
protected

Is current page part of personal workspace blog?

Returns
bool

Definition at line 272 of file class.ilBlogPostingGUI.php.

273 {
274 return stristr(get_class($this->access_handler), "workspace");
275 }

Referenced by __construct(), activatePage(), getParentObjId(), observeNoteAction(), postOutputProcessing(), and preview().

+ Here is the caller graph for this function:

◆ keywordAutocomplete()

ilBlogPostingGUI::keywordAutocomplete ( )

Definition at line 701 of file class.ilBlogPostingGUI.php.

702 {
703 $force_all = (bool)$_GET["fetchall"];
704
705 include_once("./Services/MetaData/classes/class.ilMDKeyword.php");
707 "blp", $this->getParentObjId());
708
709 include_once("./Services/Search/classes/class.ilSearchSettings.php");
710 $cut = (int)ilSearchSettings::getInstance()->getAutoCompleteLength();
711
712 $has_more = false;
713 $result = array();
714 foreach ($res as $r)
715 {
716 if(!$force_all &&
717 sizeof($result["items"]) >= $cut)
718 {
719 $has_more = true;
720 break;
721 }
722 $entry = new stdClass();
723 $entry->value = $r;
724 $entry->label = $r;
725 $result["items"][] = $entry;
726 }
727
728 $result["hasMoreResults"] = $has_more;
729
730 include_once './Services/JSON/classes/class.ilJsonUtil.php';
732 exit;
733 }
$result
$_GET["client_id"]
static encode($mixed, $suppress_native=false)
static _getMatchingKeywords($a_query, $a_type, $a_rbac_id=0)
Search for keywords.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
exit
Definition: login.php:54

References $_GET, $res, $result, ilMDKeyword\_getMatchingKeywords(), ilJsonUtil\encode(), exit, ilSearchSettings\getInstance(), getParentObjId(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ observeNoteAction()

ilBlogPostingGUI::observeNoteAction (   $a_blog_id,
  $a_posting_id,
  $a_type,
  $a_action,
  $a_note_id 
)

Definition at line 511 of file class.ilBlogPostingGUI.php.

512 {
513 // #10040 - get note text
514 include_once "Services/Notes/classes/class.ilNote.php";
515 $note = new ilNote($a_note_id);
516 $note = $note->getText();
517
518 include_once "Modules/Blog/classes/class.ilObjBlog.php";
519 ilObjBlog::sendNotification("comment", $this->isInWorkspace(), $this->node_id, $a_posting_id, $note);
520 }
Note class.

References isInWorkspace(), and ilObjBlog\sendNotification().

+ Here is the call graph for this function:

◆ parseImage()

static ilBlogPostingGUI::parseImage (   $src_width,
  $src_height,
  $tgt_width,
  $tgt_height 
)
staticprotected

Definition at line 822 of file class.ilBlogPostingGUI.php.

823 {
824 $ratio_width = $ratio_height = 1;
825 if($src_width > $tgt_width)
826 {
827 $ratio_width = $tgt_width / $src_width;
828 }
829 if($src_height > $tgt_height)
830 {
831 $ratio_height = $tgt_height / $src_height;
832 }
833 $shrink_ratio = min($ratio_width, $ratio_height);
834
835 return array(
836 (int)round($src_width*$shrink_ratio),
837 (int)round($src_height*$shrink_ratio)
838 );
839 }

Referenced by getFirstMediaObjectAsTag().

+ Here is the caller graph for this function:

◆ postOutputProcessing()

ilBlogPostingGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Parameters
string$a_output
Returns
string

Reimplemented from ilPageObjectGUI.

Definition at line 283 of file class.ilBlogPostingGUI.php.

284 {
285 // #8626/#9370
286 if(($this->getOutputMode() == "preview" || $this->getOutputMode() == "offline")
287 && !$this->getAbstractOnly() && $this->add_date)
288 {
289 if(!$this->isInWorkspace())
290 {
291 $author = "";
292 $author_id = $this->getBlogPosting()->getAuthor();
293 if($author_id)
294 {
295 include_once "Services/User/classes/class.ilUserUtil.php";
296 $author = ilUserUtil::getNamePresentation($author_id)." - ";
297 }
298 }
299
300 // prepend creation date
303 $prefix = "<div class=\"il_BlockInfo\" style=\"text-align:right\">".
304 $author.ilDatePresentation::formatDate($this->getBlogPosting()->getCreated()).
305 "</div>";
307
308 $a_output = $prefix.$a_output;
309 }
310
311 return $a_output;
312 }
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
getAbstractOnly()
Get abstract only.
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)
Default behaviour is:

References ilPageObjectGUI\getAbstractOnly(), getBlogPosting(), ilUserUtil\getNamePresentation(), ilPageObjectGUI\getOutputMode(), isInWorkspace(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

+ Here is the call graph for this function:

◆ preview()

ilBlogPostingGUI::preview (   $a_mode = null)

Preview blog posting.

Definition at line 163 of file class.ilBlogPostingGUI.php.

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 }
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.
global $ilSetting
Definition: privfeed.php:40

References $_GET, $ilCtrl, $ilSetting, ilPageObjectGUI\$tpl, checkAccess(), getBlogPosting(), ilPageObjectGUI\getNotesHTML(), and isInWorkspace().

+ Here is the call graph for this function:

◆ previewEmbedded()

ilBlogPostingGUI::previewEmbedded ( )

Needed for portfolio/blog handling.

Returns
string

Definition at line 233 of file class.ilBlogPostingGUI.php.

234 {
235 return $this->preview("embedded");
236 }

References ilPageObjectGUI\preview().

+ Here is the call graph for this function:

◆ previewFullscreen()

ilBlogPostingGUI::previewFullscreen ( )

Needed for portfolio/blog handling.

Returns
string

Definition at line 243 of file class.ilBlogPostingGUI.php.

244 {
245 $this->add_date = true;
246 return $this->preview("fullscreen");
247 }

References ilPageObjectGUI\preview().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveKeywordsForm()

ilBlogPostingGUI::saveKeywordsForm ( )

Definition at line 683 of file class.ilBlogPostingGUI.php.

684 {
685 $form = $this->initKeywordsForm();
686 if($form->checkInput())
687 {
688 $keywords = $form->getInput("keywords");
689 if(is_array($keywords))
690 {
691 $this->getBlogPosting()->updateKeywords($keywords);
692 }
693
694 $this->ctrl->redirect($this, "preview");
695 }
696
697 $form->setValuesByPost();
698 $this->editKeywords($form);
699 }
editKeywords(ilPropertyFormGUI $a_form=null)

References editKeywords(), getBlogPosting(), and initKeywordsForm().

+ Here is the call graph for this function:

◆ setBlogPosting()

ilBlogPostingGUI::setBlogPosting ( ilBlogPosting  $a_posting)

Set blog posting.

Parameters
ilBlogPosting$a_posting

Definition at line 130 of file class.ilBlogPostingGUI.php.

131 {
132 $this->setPageObject($a_posting);
133 }
setPageObject($a_pg_obj)
Set Page Object.

References ilPageObjectGUI\setPageObject().

+ Here is the call graph for this function:

◆ showPage()

ilBlogPostingGUI::showPage ( )

Embedded posting in portfolio.

Returns
string

Reimplemented from ilPageObjectGUI.

Definition at line 254 of file class.ilBlogPostingGUI.php.

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 }
setTemplateOutput($a_output=true)

References ilPageObjectGUI\getAbstractOnly(), getBlogPosting(), ilPageObjectGUI\setPresentationTitle(), and ilPageObjectGUI\setTemplateOutput().

+ Here is the call graph for this function:

◆ updateDate()

ilBlogPostingGUI::updateDate ( )

Definition at line 466 of file class.ilBlogPostingGUI.php.

467 {
468 global $ilCtrl, $lng;
469
470 $form = $this->initDateForm();
471 if($form->checkInput())
472 {
473 $dt = $form->getInput("date");
474 $dt = new ilDateTime($dt["date"]." ".$dt["time"], IL_CAL_DATETIME);
475
476 $page = $this->getPageObject();
477 $page->setCreated($dt);
478 $page->update();
479
480 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
481 $ilCtrl->redirect($this, "preview");
482 }
483
484 $form->setValuesByPost();
485 $this->editTitle($form);
486 }
const IL_CAL_DATETIME
@classDescription Date and time handling

References $ilCtrl, ilPageObjectGUI\$lng, editTitle(), ilPageObjectGUI\getPageObject(), IL_CAL_DATETIME, initDateForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ updateTitle()

ilBlogPostingGUI::updateTitle ( )

Definition at line 412 of file class.ilBlogPostingGUI.php.

413 {
414 global $ilCtrl, $lng;
415
416 $form = $this->initTitleForm();
417 if($form->checkInput())
418 {
419 $page = $this->getPageObject();
420 $page->setTitle($form->getInput("title"));
421 $page->update();
422
423 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
424 $ilCtrl->redirect($this, "preview");
425 }
426
427 $form->setValuesByPost();
428 $this->editTitle($form);
429 }

References $ilCtrl, ilPageObjectGUI\$lng, editTitle(), ilPageObjectGUI\getPageObject(), initTitleForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $access_handler

ilBlogPostingGUI::$access_handler
protected

Definition at line 21 of file class.ilBlogPostingGUI.php.

◆ $enable_public_notes

ilBlogPostingGUI::$enable_public_notes
protected

Definition at line 22 of file class.ilBlogPostingGUI.php.

◆ $may_contribute

ilBlogPostingGUI::$may_contribute
protected

Definition at line 23 of file class.ilBlogPostingGUI.php.

Referenced by checkAccess().

◆ $node_id

ilBlogPostingGUI::$node_id
protected

Definition at line 20 of file class.ilBlogPostingGUI.php.


The documentation for this class was generated from the following file: