5 require_once 
"./Services/Object/classes/class.ilObject2GUI.php";
 
    6 require_once 
"./Modules/Blog/classes/class.ilBlogPosting.php";
 
    7 require_once 
"./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php";
 
   29         function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 
   38                         $this->keyword = (string)
$_REQUEST[
"kwd"];
 
   46                                 if(!$this->month || !$this->items[$this->month])
 
   48                                         $this->month = array_keys($this->items);
 
   49                                         $this->month = array_shift($this->month);
 
   53                         $ilCtrl->setParameter($this, 
"bmn", $this->month);
 
   56                 $lng->loadLanguageModule(
"blog");
 
   57                 $ilCtrl->saveParameter($this, 
"prvm");
 
   69                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
   71                         unset($forms[self::CFORM_IMPORT]);
 
   72                         unset($forms[self::CFORM_CLONE]);
 
   83                 $ilCtrl->redirect($this, 
"");
 
   89                 $this->tabs_gui->addSubTab(
"properties",
 
   90                         $this->lng->txt(
"blog_properties"),
 
   91                                 $this->ctrl->getLinkTarget($this, 
'edit'));
 
   93                 $this->tabs_gui->addSubTab(
"style",
 
   94                         $this->lng->txt(
"obj_sty"),
 
   95                         $this->ctrl->getLinkTarget($this, 
'editStyleProperties'));
 
   97                 $this->tabs_gui->activateSubTab($a_active);
 
  106                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  109                         $appr->
setInfo($lng->txt(
"blog_enable_approval_info"));
 
  116                 if($ilSetting->get(
'enable_global_profiles'))
 
  119                         $rss->
setInfo($lng->txt(
"blog_enable_rss_info"));
 
  127                 if($blga_set->get(
"banner"))
 
  129                         include_once 
"Services/Form/classes/class.ilFileInputGUI.php";
 
  132                         $dimensions = 
" (".$blga_set->get(
"banner_width").
"x".
 
  133                                 $blga_set->get(
"banner_height").
")";
 
  139                         $file = $this->
object->getImageFullPath(
true);
 
  155                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  157                         $a_values[
"approval"] = $this->
object->hasApproval();
 
  159                 $a_values[
"notes"] = $this->
object->getNotesStatus();
 
  160                 $a_values[
"ppic"] = $this->
object->hasProfilePicture();
 
  161                 $a_values[
"bg_color"] = $this->
object->getBackgroundColor();
 
  162                 $a_values[
"font_color"] = $this->
object->getFontColor();
 
  163                 $a_values[
"banner"] = $this->
object->getImage();
 
  164                 $a_values[
"rss"] = $this->
object->hasRSS();
 
  169                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  171                         $this->
object->setApproval($a_form->
getInput(
"approval"));
 
  173                 $this->
object->setNotesStatus($a_form->
getInput(
"notes"));
 
  174                 $this->
object->setProfilePicture($a_form->
getInput(
"ppic"));
 
  175                 $this->
object->setBackgroundColor($a_form->
getInput(
"bg_color"));
 
  176                 $this->
object->setFontColor($a_form->
getInput(
"font_color"));
 
  177                 $this->
object->setRSS($a_form->
getInput(
"rss"));
 
  183                         if($_FILES[
"banner"][
"tmp_name"]) 
 
  185                                 $this->
object->uploadImage($_FILES[
"banner"]);
 
  187                         else if($banner->getDeletionFlag())
 
  189                                 $this->
object->deleteImage();
 
  196                 global 
$lng, $ilHelp;
 
  198                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
  200                         $this->ctrl->setParameter($this,
"wsp_id",$this->node_id);
 
  203                 $ilHelp->setScreenIdComponent(
"blog");
 
  207                         $this->tabs_gui->addTab(
"content",
 
  208                                 $lng->txt(
"content"),
 
  209                                 $this->ctrl->getLinkTarget($this, 
""));
 
  214                         $this->tabs_gui->addTab(
"id_info",
 
  215                                 $lng->txt(
"info_short"),
 
  216                                 $this->ctrl->getLinkTargetByClass(array(
"ilobjbloggui", 
"ilinfoscreengui"), 
"showSummary"));
 
  221                         $this->tabs_gui->addTab(
"settings",
 
  222                                 $lng->txt(
"settings"),
 
  223                                 $this->ctrl->getLinkTarget($this, 
"edit"));                     
 
  225                         if($this->id_type == self::REPOSITORY_NODE_ID)
 
  227                                 $this->tabs_gui->addTab(
"contributors",
 
  228                                         $lng->txt(
"blog_contributors"),
 
  229                                         $this->ctrl->getLinkTarget($this, 
"contributors"));     
 
  232                         if($this->id_type == self::REPOSITORY_NODE_ID)
 
  234                                 $this->tabs_gui->addTab(
"export",
 
  236                                         $this->ctrl->getLinkTargetByClass(
"ilexportgui", 
""));
 
  242                         $this->tabs_gui->addNonTabbedLink(
"preview", $lng->txt(
"blog_preview"), 
 
  243                                 $this->ctrl->getLinkTarget($this, 
"preview"));
 
  257                         $page_id = (int)
$_GET[
"gtp"];
 
  258                         include_once 
"Modules/Blog/classes/class.ilBlogPosting.php";
 
  262                                 $ilCtrl->setCmdClass(
"ilblogpostinggui");                       
 
  263                                 $_GET[
"blpg"] = $page_id;
 
  264                                 $ilCtrl->setCmd(
"previewFullscreen");                   
 
  272                 $next_class = $ilCtrl->getNextClass($this);
 
  273                 $cmd = $ilCtrl->getCmd();
 
  275                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  277                         $tpl->getStandardTemplate();
 
  283                                 $link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", 
"frameset");                           
 
  284                                 $ilNavigationHistory->addItem($this->node_id, $link, 
"blog");
 
  290                         case 'ilblogpostinggui':        
 
  292                                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  298                                         include_once 
"Services/Form/classes/class.ilFileInputGUI.php";
 
  301                                 $ilTabs->setBackTarget($lng->txt(
"back"),
 
  302                                         $ilCtrl->getLinkTarget($this, 
""));
 
  305                                         $this->object->getStyleSheetId(), 
"blog");
 
  307                                 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
 
  312                                         ($this->object->getNotesStatus() && !$this->disable_notes),
 
  320                                         case "previewFullscreen":
 
  321                                                 $ilCtrl->setParameter($this, 
"prvm", 
"fsc");
 
  325                                         case "previewEmbedded":
 
  326                                                 $ilCtrl->setParameter($this, 
"prvm", 
"emb");
 
  333                                                 $this->ctrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", 
$_GET[
"blpg"]);
 
  334                                                 $this->tabs_gui->addNonTabbedLink(
"preview", $lng->txt(
"blog_preview"), 
 
  335                                                         $this->ctrl->getLinkTargetByClass(
"ilblogpostinggui", 
"previewFullscreen"));
 
  336                                                 $this->ctrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", 
"");
 
  340                                 $ret = $ilCtrl->forwardCommand($bpost_gui);
 
  346                                                 $cmd = 
"preview".(($_REQUEST[
"prvm"] == 
"fsc") ? 
"Fullscreen" : 
"Embedded");                                            
 
  351                                         $is_active = $bpost_gui->getBlogPosting()->getActive();
 
  354                                         if((
$cmd == 
"previewFullscreen" || 
$cmd == 
"previewEmbedded")
 
  355                                                 && !$is_owner && !$is_active)
 
  357                                                 $this->ctrl->redirect($this, 
"preview");
 
  363                                                 case "previewFullscreen":               
 
  371                                                 case "previewEmbedded":
 
  383                                                                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
  385                                                                         $info[] = $lng->txt(
"blog_draft_info");
 
  389                                                                         $info[] = $lng->txt(
"blog_draft_info_contributors");
 
  392                                                         if(
$cmd != 
"history" && !$bpost_gui->getBlogPosting()->getFirstParagraphText())
 
  394                                                                 $info[] = $lng->txt(
"blog_new_posting_info");
 
  396                                                         if($this->object->hasApproval() && !$bpost_gui->getBlogPosting()->isApproved())
 
  399                                                                 $info[] = $lng->txt(
"blog_posting_edit_approval_info");
 
  407                                                         $tpl->setContent(
$ret);
 
  409                                                         $tpl->setRightContent($nav);    
 
  415                         case "ilinfoscreengui":
 
  424                         case "ilcommonactiondispatchergui":
 
  425                                 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  427                                 $this->ctrl->forwardCommand($gui);
 
  430                         case "ilpermissiongui":
 
  432                                 $ilTabs->activateTab(
"id_permissions");
 
  433                                 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  435                                 $this->ctrl->forwardCommand($perm_gui);
 
  438                         case "ilobjectcopygui":
 
  439                                 include_once 
"./Services/Object/classes/class.ilObjectCopyGUI.php";
 
  441                                 $cp->setType(
"blog");
 
  442                                 $this->ctrl->forwardCommand($cp);
 
  445                         case 'ilrepositorysearchgui':
 
  447                                 $ilTabs->activateTab(
"contributors");
 
  448                                 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
 
  450                                 $rep_search->setTitle($this->lng->txt(
"blog_add_contributor"));
 
  451                                 $rep_search->setCallback($this,
'addContributor');
 
  452                                 $this->ctrl->setReturn($this,
'contributors');                           
 
  453                                 $ret =& $this->ctrl->forwardCommand($rep_search);
 
  458                                 $ilTabs->activateTab(
"export");
 
  459                                 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
 
  461                                 $exp_gui->addFormat(
"xml");
 
  462                                 $exp_gui->addFormat(
"html", null, $this, 
"buildExportFile"); 
 
  463                                 $ret = $ilCtrl->forwardCommand($exp_gui);
 
  466                         case "ilobjstylesheetgui":
 
  467                                 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
 
  468                                 $this->ctrl->setReturn($this, 
"editStyleProperties");
 
  469                                 $style_gui = 
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(), 
false, 
false);
 
  471                                 if (
$cmd == 
"create" || 
$_GET[
"new_type"]==
"sty")
 
  473                                         $style_gui->setCreationMode(
true);
 
  476                                 if (
$cmd == 
"confirmedDelete")
 
  478                                         $this->
object->setStyleSheetId(0);
 
  479                                         $this->
object->update();
 
  482                                 $ret = $this->ctrl->forwardCommand($style_gui);
 
  484                                 if (
$cmd == 
"save" || 
$cmd == 
"copyStyle" || 
$cmd == 
"importStyle")
 
  487                                         $this->
object->setStyleSheetId($style_id);
 
  488                                         $this->
object->update();
 
  489                                         $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
  494                                 if(
$cmd != 
"gethtml")
 
  497                                         if(
$cmd == 
"addToDesk" || 
$cmd == 
"removeFromDesk")
 
  499                                                 $this->{
$cmd.
"Object"}();
 
  508                                                 $ilCtrl->setCmd(
$cmd);
 
  525                 $this->ctrl->setCmd(
"showSummary");
 
  526                 $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
  537                 $ilTabs->activateTab(
"id_info");
 
  541                         $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
 
  544                 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  547                 $info->enablePrivateNotes();
 
  555                 $info->enableNewsEditing(
false);
 
  559                         $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
  561                         if ($enable_internal_rss)
 
  563                                 $info->setBlockProperty(
"news", 
"settings", 
true);
 
  564                                 $info->setBlockProperty(
"news", 
"public_notifications_option", 
true);
 
  569                 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
 
  571                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
  576                 $this->ctrl->forwardCommand($info);
 
  590                         include_once(
"./Modules/Blog/classes/class.ilBlogPosting.php");
 
  592                         $posting->setTitle($title);
 
  593                         $posting->setBlogId($this->object->getId());
 
  594                         $posting->setActive(
false);
 
  595                         $posting->setAuthor($ilUser->getId());
 
  599                         $ilCtrl->setParameter($this, 
"bmn", date(
"Y-m"));
 
  601                         $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", $posting->getId());
 
  602                         $ilCtrl->redirectByClass(
"ilblogpostinggui", 
"edit");
 
  606                         $ilCtrl->redirect($this, 
"render");
 
  626                 $ilTabs->activateTab(
"content");
 
  631                         $ilToolbar->setFormAction($ilCtrl->getFormAction($this, 
"createPosting"));
 
  633                         include_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  635                         $ilToolbar->addInputItem($title, $lng->txt(
"title"));
 
  637                         $ilToolbar->addFormButton($lng->txt(
"blog_add_posting"), 
"createPosting");
 
  640                         include_once 
"Modules/Exercise/classes/class.ilObjExercise.php";                        
 
  645                                 foreach($exercises as $exercise)
 
  651                                                 if(!$tree->isSaved($ref_id))
 
  680                         $list = $this->
renderList($list_items, $this->month, 
"preview", null, $is_owner);
 
  681                         $nav = $this->
renderNavigation($this->items, 
"render", 
"preview", null, $is_owner);             
 
  686                 $tpl->setContent($list);
 
  687                 $tpl->setRightContent($nav);
 
  694                 include_once 
"Modules/Exercise/classes/class.ilExAssignment.php";                       
 
  696                 $exercise_id = $ass->getExerciseId();           
 
  704                 if($ass->getDeadline() && $ass->getDeadline() - time() <= 0)
 
  710                 include_once 
"./Services/Link/classes/class.ilLink.php";
 
  714                 $info = sprintf($lng->txt(
"blog_exercise_info"), 
 
  716                         "<a href=\"".$exc_link.
"\">".
 
  722                         $ilCtrl->setParameter($this, 
"exc", $exercise_id);                              
 
  723                         $ilCtrl->setParameter($this, 
"ass", $a_assignment_id);
 
  724                         $submit_link = $ilCtrl->getLinkTarget($this, 
"finalize");
 
  725                         $ilCtrl->setParameter($this, 
"ass", 
"");
 
  726                         $ilCtrl->setParameter($this, 
"exc", 
"");        
 
  727                         $info .= 
" <a class=\"submit emphsubmit\" href=\"".$submit_link.
"\">".$lng->txt(
"blog_finalize_blog").
"</a>";
 
  734                         $submitted = array_pop($submitted);
 
  736                         $ilCtrl->setParameter($this, 
"ass", $a_assignment_id);
 
  737                         $dl_link = $ilCtrl->getLinkTarget($this, 
"downloadExcSubFile");
 
  738                         $ilCtrl->setParameter($this, 
"ass", 
"");
 
  743                         $info .= 
"<br />".sprintf($lng->txt(
"blog_exercise_submitted_info"), 
 
  745                                 "<a href=\"".$dl_link.
"\" class=\"submit\">".$lng->txt(
"download").
"</a>");
 
  755                 $ass = $ass->getInstruction();
 
  758                         $tooltip .= nl2br($ass);                                        
 
  762                 if (count($ass_files) > 0)
 
  764                         $tooltip .= 
"<br /><br />";
 
  766                         foreach($ass_files as 
$file)
 
  768                                 $ilCtrl->setParameter($this, 
"ass", $a_assignment_id);
 
  769                                 $ilCtrl->setParameter($this, 
"file", urlencode($file[
"name"]));
 
  770                                 $dl_link = $ilCtrl->getLinkTarget($this, 
"downloadExcAssFile");
 
  771                                 $ilCtrl->setParameter($this, 
"file", 
"");                       
 
  772                                 $ilCtrl->setParameter($this, 
"ass", 
"");                        
 
  774                                 $tooltip .= $file[
"name"].
": <a href=\"".$dl_link.
"\">".
 
  775                                         $lng->txt(
"download").
"</a>";                                                                           
 
  781                         $ol_id = 
"exc_ass_".$a_assignment_id;
 
  783                         include_once 
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
 
  787                         $overlay->setAnchor($ol_id.
"_tr");
 
  788                         $overlay->setTrigger($ol_id.
"_tr", 
"click", $ol_id.
"_tr");
 
  791                         $info .= 
"<div id=\"".$ol_id.
"_tr\"><a href=\"#\">".$lng->txt(
"exc_instruction").
"</a></div>".
 
  792                                 "<div id=\"".$ol_id.
"\" style=\"display:none; padding:10px;\" class=\"ilOverlay\">".$tooltip.
"</div>";
 
  795                 return "<div>".$info.
"</div>";
 
  802                         include_once 
"Modules/Exercise/classes/class.ilExAssignment.php";                       
 
  806                         if (count($ass_files) > 0)
 
  808                                 foreach($ass_files as 
$file)
 
  810                                         if($file[
"name"] == $_GET[
"file"])
 
  825                         include_once 
"Modules/Exercise/classes/class.ilExAssignment.php";                       
 
  829                         if (count($submitted) > 0)
 
  831                                 $submitted = array_pop($submitted);                     
 
  835                                         $ass->getTitle().
" - ".
 
  836                                         $user_data[
"firstname"].
" ".
 
  837                                         $user_data[
"lastname"].
" (".
 
  838                                         $user_data[
"login"].
").zip";
 
  853                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
  867                         $list = $this->
renderList($list_items, $this->month, 
"previewEmbedded");
 
  883                         $list_items = array();
 
  886                                 foreach(
$items as $id => $item)
 
  888                                         if($item[
"author"] == $this->author)
 
  890                                                 $list_items[$id] = $item;
 
  895                 else if($this->keyword)
 
  897                         $list_items = $this->filterItemsByKeyword($this->items, $this->keyword);
 
  926                         $list = $this->
renderList($list_items, $this->month, 
"previewFullscreen");
 
  927                         $nav = $this->
renderNavigation($this->items, 
"preview", 
"previewFullscreen");           
 
  955                 $wtpl = 
new ilTemplate(
"tpl.blog_embedded.html", 
true, 
true, 
"Modules/Blog");
 
  956                 $wtpl->setVariable(
"VAL_LIST", $a_content);
 
  957                 $wtpl->setVariable(
"VAL_NAVIGATION", $a_nav);                                                   
 
  971                 $owner = $this->
object->getOwner();
 
  973                 $ilTabs->clearTargets();
 
  974                 $ilLocator->clearItems();
 
  978                 if($owner == $ilUser->getId())
 
  981                         if($this->id_type == self::WORKSPACE_NODE_ID)
 
  983                                 $back = 
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&wsp_id=".$this->node_id;
 
  988                                 $prvm = 
$_GET[
"prvm"];
 
  989                                 $this->ctrl->setParameter($this, 
"prvm", 
"");                           
 
  992                                         $back = $this->ctrl->getLinkTarget($this, 
"");
 
  996                                         $this->ctrl->setParameterByClass(
"ilblogpostinggui", 
"bmn", $this->month);
 
  997                                         $this->ctrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", 
$_GET[
"blpg"]);
 
  998                                         $back = $this->ctrl->getLinkTargetByClass(
"ilblogpostinggui", 
"preview");
 
 1000                                 $this->ctrl->setParameter($this, 
"prvm", $prvm);
 
 1004                 else if($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
 
 1007                         if($this->id_type == self::WORKSPACE_NODE_ID)
 
 1009                                 $back = 
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&dsh=".$owner;
 
 1014                                 $back = $this->ctrl->getLinkTarget($this, 
"");
 
 1020                                 $parent_id = $tree->getParentId($this->node_id);
 
 1021                                 include_once 
"Services/Link/classes/class.ilLink.php";
 
 1025                 $tpl->setTopBar($back);
 
 1032                 $tpl->setContent($a_content);
 
 1033                 $tpl->setRightContent($a_navigation);
 
 1034                 $tpl->setFrameFixedWidth(
true);
 
 1036                 echo $tpl->show(
"DEFAULT", 
true, 
true);
 
 1051                 if($this->id_type != self::REPOSITORY_NODE_ID)
 
 1054                         $name = $name[
"lastname"].
", ".(
$t = $name[
"title"] ? 
$t . 
" " : 
"").$name[
"firstname"];
 
 1060                 if($blga_set->get(
"banner"))
 
 1062                         $banner = $this->
object->getImageFullPath();
 
 1063                         $banner_width = $blga_set->get(
"banner_width");
 
 1064                         $banner_height = $blga_set->get(
"banner_height");               
 
 1067                                 $banner = basename($banner);
 
 1072                 if($this->object->hasProfilePicture())
 
 1077                                 $ppic = basename($ppic);
 
 1081                 include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1082                 $a_tpl->setFullscreenHeader($this->object->getTitle(), 
 
 1086                         $this->
object->getBackgroundColor(),
 
 1087                         $this->
object->getFontColor(),
 
 1091                 $a_tpl->setBodyClass(
"std ilExternal ilBlog");
 
 1103                 $author_found = 
false;  
 
 1108                         if($this->author && $posting[
"author"] == $this->author)
 
 1110                                 $author_found = 
true;
 
 1117                 if($this->author && !$author_found)
 
 1119                         $this->author = null;
 
 1135         function renderList(array 
$items, $a_month, $a_cmd = 
"preview", $a_link_template = null, $a_show_inactive = 
false)
 
 1139                 include_once 
"Services/Calendar/classes/class.ilCalendarUtil.php";
 
 1140                 $wtpl = 
new ilTemplate(
"tpl.blog_list.html", 
true, 
true, 
"Modules/Blog");
 
 1147                 else if($this->author)
 
 1149                         include_once 
"Services/User/classes/class.ilUserUtil.php";
 
 1154                         include_once 
"Services/Calendar/classes/class.ilCalendarUtil.php";
 
 1156                                         " ".substr($a_month, 0, 4);
 
 1158                 $wtpl->setVariable(
"TXT_CURRENT_MONTH", $title);                                                
 
 1163                 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");      
 
 1164                 foreach($items as $item)
 
 1168                         if(!$is_active && !$a_show_inactive)
 
 1173                         if(!$a_link_template)
 
 1175                                 $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"bmn", $this->month);
 
 1176                                 $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", $item[
"id"]);
 
 1177                                 $preview = $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", $a_cmd);
 
 1185                         $item_contribute = $this->
mayContribute($item[
"id"], $item[
"author"]);
 
 1186                         if(($item_contribute || $can_approve || $can_deactivate) && !$a_link_template && $a_cmd == 
"preview")
 
 1188                                 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
 1190                                 $alist->setId($item[
"id"]);
 
 1191                                 $alist->setListTitle($lng->txt(
"actions"));
 
 1193                                 if($is_active && $this->object->hasApproval() && !$item[
"approved"])
 
 1197                                                 $ilCtrl->setParameter($this, 
"apid", $item[
"id"]);
 
 1198                                                 $alist->addItem($lng->txt(
"blog_approve"), 
"approve", 
 
 1199                                                         $ilCtrl->getLinkTarget($this, 
"approve"));
 
 1200                                                 $ilCtrl->setParameter($this, 
"apid", 
"");
 
 1203                                         $wtpl->setVariable(
"APPROVAL", $lng->txt(
"blog_needs_approval"));
 
 1206                                 if($item_contribute)
 
 1208                                         $alist->addItem($lng->txt(
"edit_content"), 
"edit", 
 
 1209                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"edit"));
 
 1214                                                 $alist->addItem($lng->txt(
"blog_toggle_draft"), 
"deactivate", 
 
 1215                                                         $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"deactivatePageToList"));
 
 1219                                                 $alist->addItem($lng->txt(
"blog_toggle_final"), 
"activate", 
 
 1220                                                         $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"activatePageToList"));
 
 1223                                         $alist->addItem($lng->txt(
"rename"), 
"rename", 
 
 1224                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"edittitle"));
 
 1225                                         $alist->addItem($lng->txt(
"blog_edit_keywords"), 
"keywords", 
 
 1226                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"editKeywords"));                             
 
 1227                                         $alist->addItem($lng->txt(
"blog_edit_date"), 
"editdate", 
 
 1228                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"editdate"));
 
 1229                                         $alist->addItem($lng->txt(
"delete"), 
"delete",
 
 1230                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"deleteBlogPostingConfirmationScreen"));                              
 
 1232                                 else if($can_deactivate)
 
 1237                                                 $ilCtrl->setParameter($this, 
"apid", $item[
"id"]);
 
 1238                                                 $alist->addItem($lng->txt(
"blog_toggle_draft_admin"), 
"deactivate", 
 
 1239                                                         $ilCtrl->getLinkTarget($this, 
"deactivateAdmin"));
 
 1240                                                 $ilCtrl->setParameter($this, 
"apid", 
"");
 
 1243                                         $alist->addItem($lng->txt(
"delete"), 
"delete",
 
 1244                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"deleteBlogPostingConfirmationScreen"));              
 
 1247                                 $wtpl->setCurrentBlock(
"actions");
 
 1248                                 $wtpl->setVariable(
"ACTION_SELECTOR", $alist->getHTML());
 
 1249                                 $wtpl->parseCurrentBlock();
 
 1253                         if($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes)
 
 1256                                 include_once(
"Services/Notes/classes/class.ilNote.php");
 
 1260                                 if($a_cmd != 
"preview")
 
 1262                                         $wtpl->setCurrentBlock(
"comments");
 
 1263                                         $wtpl->setVariable(
"TEXT_COMMENTS", $lng->txt(
"blog_comments"));
 
 1264                                         $wtpl->setVariable(
"URL_COMMENTS", 
$preview);
 
 1265                                         $wtpl->setVariable(
"COUNT_COMMENTS", $count);
 
 1266                                         $wtpl->parseCurrentBlock();
 
 1279                         if($a_cmd != 
"preview" && $a_cmd != 
"previewEmbedded")
 
 1281                                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
 1283                                         $goto = $this->
getAccessHandler()->getGotoLink($this->node_id, $this->obj_id, 
"_".$item[
"id"]);
 
 1287                                         include_once 
"Services/Link/classes/class.ilLink.php";
 
 1290                                 $wtpl->setCurrentBlock(
"permalink");
 
 1291                                 $wtpl->setVariable(
"URL_PERMALINK", $goto); 
 
 1292                                 $wtpl->setVariable(
"TEXT_PERMALINK", $lng->txt(
"blog_permanent_link"));
 
 1293                                 $wtpl->parseCurrentBlock();                             
 
 1300                                 $wtpl->setCurrentBlock(
"more");
 
 1301                                 $wtpl->setVariable(
"URL_MORE", 
$preview); 
 
 1302                                 $wtpl->setVariable(
"TEXT_MORE", $lng->txt(
"blog_list_more"));
 
 1303                                 $wtpl->parseCurrentBlock();
 
 1306                         $wtpl->setCurrentBlock(
"posting");
 
 1310                                 $wtpl->setVariable(
"DRAFT_CLASS", 
" ilBlogListItemDraft");
 
 1314                         if($this->id_type == self::REPOSITORY_NODE_ID)
 
 1316                                 $author_id = $item[
"author"];
 
 1319                                         include_once 
"Services/User/classes/class.ilUserUtil.php";
 
 1325                         $wtpl->setVariable(
"URL_TITLE", 
$preview);
 
 1326                         $wtpl->setVariable(
"TITLE", $item[
"title"]);
 
 1327                         $wtpl->setVariable(
"DATETIME", 
$author.
 
 1331                         $wtpl->setVariable(
"CONTENT", $snippet);                        
 
 1333                         $wtpl->parseCurrentBlock();
 
 1345                 if($a_cmd == 
"previewFullscreen")
 
 1350                 return $wtpl->get();
 
 1392         function renderNavigation(array 
$items, $a_list_cmd = 
"render", $a_posting_cmd = 
"preview", $a_link_template = null, $a_show_inactive = 
false)
 
 1396                 $max_detail_postings = 10;
 
 1398                 $wtpl = 
new ilTemplate(
"tpl.blog_list_navigation.html", 
true, 
true,
 
 1401                 $wtpl->setVariable(
"NAVIGATION_TITLE", $this->lng->txt(
"blog_navigation"));
 
 1403                 $ilCtrl->setParameter($this, 
"blpg", 
"");
 
 1405                 include_once 
"Services/Calendar/classes/class.ilCalendarUtil.php";
 
 1407                 foreach($items as 
$month => $postings)
 
 1410                                 " ".substr(
$month, 0, 4);
 
 1412                         if(!$a_link_template)
 
 1414                                 $ilCtrl->setParameter($this, 
"bmn", 
$month);
 
 1415                                 $month_url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
 
 1423                         if($counter < $max_detail_postings)
 
 1425                                 foreach($postings as $id => $posting)
 
 1428                                         if(!$is_active && !$a_show_inactive)
 
 1438                                         if(!$a_link_template)
 
 1440                                                 $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"bmn", 
$month);
 
 1441                                                 $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", $id);
 
 1442                                                 $url = $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", $a_posting_cmd);                                       
 
 1451                                                 $wtpl->setVariable(
"NAV_ITEM_DRAFT", $this->lng->txt(
"blog_draft"));
 
 1453                                         else if($this->object->hasApproval() && !$posting[
"approved"])
 
 1455                                                 $wtpl->setVariable(
"NAV_ITEM_APPROVAL", $this->lng->txt(
"blog_needs_approval"));
 
 1458                                         $wtpl->setCurrentBlock(
"navigation_item");
 
 1459                                         $wtpl->setVariable(
"NAV_ITEM_URL", $url);
 
 1460                                         $wtpl->setVariable(
"NAV_ITEM_CAPTION", $caption);
 
 1461                                         $wtpl->parseCurrentBlock();                                                     
 
 1464                                 $wtpl->setCurrentBlock(
"navigation_month_details");
 
 1465                                 $wtpl->setVariable(
"NAV_MONTH", $month_name);
 
 1466                                 $wtpl->setVariable(
"URL_MONTH", $month_url);
 
 1467                                 $wtpl->parseCurrentBlock();
 
 1472                                 $wtpl->setCurrentBlock(
"navigation_month");
 
 1473                                 $wtpl->setVariable(
"MONTH_NAME", $month_name);                          
 
 1474                                 $wtpl->setVariable(
"URL_MONTH", $month_url);
 
 1475                                 $wtpl->setVariable(
"MONTH_COUNT", 
sizeof($postings));
 
 1476                                 $wtpl->parseCurrentBlock();
 
 1480                 $ilCtrl->setParameter($this, 
"bmn", $this->month);
 
 1481                 $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"bmn", 
"");
 
 1485                 if($this->id_type == self::REPOSITORY_NODE_ID)
 
 1488                         foreach($this->items as 
$month => $items)
 
 1490                                 foreach($items as $item)
 
 1494                                                 $authors[] = $item[
"author"];                                   
 
 1499                         $authors = array_unique($authors);                      
 
 1500                         if(
sizeof($authors) > 1)
 
 1502                                 include_once 
"Services/User/classes/class.ilUserUtil.php";
 
 1505                                 foreach($authors as $user_id)
 
 1509                                                 $ilCtrl->setParameter($this, 
"ath", $user_id);
 
 1510                                                 $url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
 
 1511                                                 $ilCtrl->setParameter($this, 
"ath", 
"");
 
 1514                                                 $idx = trim(strip_tags($name)).
"///".$user_id;  
 
 1515                                                 $list[$idx] = array($name, $url);       
 
 1520                                 $wtpl->setVariable(
"AUTHORS_TITLE", $this->lng->txt(
"blog_authors"));
 
 1522                                 $wtpl->setCurrentBlock(
"author");                               
 
 1525                                         $wtpl->setVariable(
"TXT_AUTHOR", $author[0]);                                                   
 
 1526                                         $wtpl->setVariable(
"URL_AUTHOR", $author[1]);                                                   
 
 1527                                         $wtpl->parseCurrentBlock();             
 
 1532                 if(!$a_link_template)
 
 1536                                 !$a_link_template && $a_list_cmd != 
"preview" && $a_list_cmd != 
"gethtml");
 
 1538                         if($keywords || $may_edit_keywords)
 
 1540                                 $wtpl->setVariable(
"KEYWORDS_TITLE", $this->lng->txt(
"blog_keywords"));
 
 1544                                         $max = max($keywords);
 
 1545                                         include_once 
"Services/Tagging/classes/class.ilTagging.php";
 
 1547                                         $wtpl->setCurrentBlock(
"keyword");
 
 1548                                         foreach($keywords as 
$keyword => $counter)
 
 1550                                                 $ilCtrl->setParameter($this, 
"kwd", urlencode(
$keyword)); 
 
 1551                                                 $url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
 
 1552                                                 $ilCtrl->setParameter($this, 
"kwd", 
"");
 
 1554                                                 $wtpl->setVariable(
"TXT_KEYWORD", 
$keyword);                            
 
 1556                                                 $wtpl->setVariable(
"URL_KEYWORD", $url);
 
 1557                                                 $wtpl->parseCurrentBlock();                                     
 
 1562                                         $wtpl->setVariable(
"TXT_NO_KEYWORDS", $this->lng->txt(
"blog_no_keywords"));
 
 1565                                 if($may_edit_keywords)
 
 1567                                         $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", 
$_GET[
"blpg"]);
 
 1568                                         $wtpl->setVariable(
"URL_EDIT_KEYWORDS", 
 
 1569                                                 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"editKeywords"));             
 
 1570                                         $ilCtrl->setParameterByClass(
"ilblogpostinggui", 
"blpg", 
"");
 
 1571                                         $wtpl->setVariable(
"TXT_EDIT_KEYWORDS", $this->lng->txt(
"blog_edit_keywords"));                 
 
 1576                         if($this->object->hasRSS() && 
 
 1577                                 $ilSetting->get(
'enable_global_profiles') &&
 
 1578                                 $a_list_cmd == 
"preview")
 
 1582                                 if($this->id_type != self::WORKSPACE_NODE_ID)
 
 1586                                 $url = ILIAS_HTTP_PATH.
"/feed.php?blog_id=".$blog_id.
 
 1587                                         "&client_id=".rawurlencode(CLIENT_ID);
 
 1589                                 $wtpl->setCurrentBlock(
"rss");
 
 1590                                 $wtpl->setVariable(
"URL_RSS", $url);
 
 1592                                 $wtpl->parseCurrentBlock();
 
 1596                 return $wtpl->get();
 
 1608                 $keywords = array();
 
 1609                 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
 
 1636                 foreach($keywords as 
$keyword => $counter)
 
 1638                         $tmp[] = array(
"keyword"=>
$keyword, 
"counter"=>$counter);
 
 1642                 $keywords = array();
 
 1643                 foreach($tmp as $item)
 
 1645                         $keywords[$item[
"keyword"]] = $item[
"counter"];
 
 1658                 include_once(
"./Services/Export/classes/class.ilExport.php");
 
 1662                 $subdir = $this->
object->getType().
"_".$this->
object->getId();
 
 1663                 $export_dir = $exp_dir.
"/".$subdir;
 
 1670                 include_once(
"./Services/Style/classes/class.ilSystemStyleHTMLExport.php");
 
 1672             $this->sys_style_html_export->addImage(
"icon_blog_b.png");
 
 1673                 $this->sys_style_html_export->export();
 
 1676                 include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
 
 1678                 $this->co_page_html_export->setContentStyleId($this->object->getStyleSheetId());
 
 1679                 $this->co_page_html_export->createDirectories();
 
 1680                 $this->co_page_html_export->exportStyles();
 
 1681                 $this->co_page_html_export->exportSupportScripts();     
 
 1685                 if($blga_set->get(
"banner"))
 
 1687                         $banner = $this->
object->getImageFullPath();
 
 1690                                 copy($banner, $export_dir.
"/".basename($banner));
 
 1696                         $ppic = array_shift(explode(
"?", $ppic));
 
 1697                         copy($ppic, $export_dir.
"/".basename($ppic));
 
 1709                                 "/".$date.
"__".IL_INST_ID.
"__".
 
 1710                                 $this->object->getType().
"_".$this->
object->getId().
".zip";
 
 1727         function exportHTMLPages($a_target_directory, $a_link_template = null, $a_tpl_callback = null, $a_co_page_html_export = null, $a_index_name = 
"index.html")
 
 1729                 if(!$a_link_template)
 
 1731                         $a_link_template = 
"bl{TYPE}_{ID}.html";
 
 1734                 if($a_co_page_html_export)
 
 1736                         $this->co_page_html_export = $a_co_page_html_export;
 
 1743                 foreach(array_keys($this->items) as 
$month)
 
 1746                         $list = $this->
renderList($this->items[$month], $month, 
"render", $a_link_template);                    
 
 1748                         if(!$a_tpl_callback)
 
 1754                                 $tpl = call_user_func($a_tpl_callback);                         
 
 1762                                 copy(
$file, $a_target_directory.
"/".$a_index_name);
 
 1768                 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
 
 1769                 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 1771                 foreach ($pages as $page)
 
 1775                                 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
 
 1777                                 $blp_gui->setOutputMode(
"offline");
 
 1778                                 $blp_gui->setFullscreenLink(
"fullscreen.html"); 
 
 1779                                 $blp_gui->add_date = 
true;
 
 1780                                 $page_content = $blp_gui->showPage();
 
 1783                                         substr($page[
"created"]->
get(
IL_CAL_DATE), 0, 7));
 
 1787                                 if(!$a_tpl_callback)
 
 1793                                         $tpl = call_user_func($a_tpl_callback);                         
 
 1797                                         $page_content, $nav, $back);
 
 1799                                 $this->co_page_html_export->collectPageElements(
"blp:pg", $page[
"id"]);
 
 1802                 $this->co_page_html_export->exportPageElements();
 
 1815                 if($a_type == 
"list")
 
 1823                 $link = str_replace(
"{TYPE}", $a_type, $a_template);
 
 1824                 return str_replace(
"{ID}", $a_id, $link);
 
 1835                 global $ilTabs, 
$lng;
 
 1837                 $tpl = $this->co_page_html_export->getPreparedMainTemplate();
 
 1839                 $tpl->getStandardTemplate();
 
 1841                 $ilTabs->clearTargets();
 
 1844                         $ilTabs->setBackTarget($lng->txt(
"back"), $a_back_url);
 
 1848                 $tpl->setFrameFixedWidth(
true);
 
 1863         protected function writeExportFile($a_target_directory, $a_file, $a_tpl, $a_content, $a_right_content = null)
 
 1865                 $file = $a_target_directory.
"/".$a_file;
 
 1867                 if (@is_file(
$file))
 
 1873                 $ep_tpl = 
new ilTemplate(
"tpl.export_page.html", 
true, 
true,
 
 1875                 $ep_tpl->setVariable(
"PAGE_CONTENT", $a_content);               
 
 1878                 if($a_right_content)
 
 1880                         $ep_tpl->setVariable(
"RIGHT_CONTENT", $a_right_content);
 
 1883                 $a_tpl->setContent($ep_tpl->get());             
 
 1885                 $content = $a_tpl->get(
"DEFAULT", 
false, 
false, 
false,
 
 1889                 if (!file_put_contents(
$file, $content))
 
 1891                         die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
 
 1892                                         " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
 
 1914                 include_once 
"Modules/Exercise/classes/class.ilObjExerciseGUI.php";
 
 1916                 $exc_gui->submitBlog($this->node_id);
 
 1919                 $ilCtrl->redirect($this, 
"render");
 
 1933                 $this->disable_notes = (bool)$a_value;
 
 1941                 if($a_cmd == 
"preview" || $a_cmd == 
"previewFullscreen" || 
$_GET[
"prvm"])
 
 1944                         if($ilUser->getId() != ANONYMOUS_USER_ID)                       
 
 1948                                         $ilCtrl->setParameter($this, 
"prvm", 
"fsc");
 
 1953                                         $ilCtrl->setParameter($this, 
"prvm", 
"");
 
 1972                 $sub_type = $sub_id = null;
 
 1976                         $sub_id = 
$_GET[
"blpg"];
 
 1983                         $lg->enableComments(
false);
 
 1984                         $lg->enableNotes(
false);
 
 1985                         $lg->enableTags(
false);         
 
 1987                         include_once 
"./Services/Notification/classes/class.ilNotification.php";
 
 1990                                 $ilCtrl->setParameter($this, 
"ntf", 1);
 
 1991                                 $link = $ilCtrl->getLinkTarget($this, 
"setNotification");
 
 1992                                 $ilCtrl->setParameter($this, 
"ntf", 
"");                                
 
 1993                                 $lg->addCustomCommand($link, 
"blog_notification_toggle_off");
 
 1995                                 $lg->addHeaderIcon(
"not_icon",
 
 1997                                         $this->lng->txt(
"blog_notification_activated"));
 
 2001                                 $ilCtrl->setParameter($this, 
"ntf", 2);
 
 2002                                 $link = $ilCtrl->getLinkTarget($this, 
"setNotification");
 
 2003                                 $ilCtrl->setParameter($this, 
"ntf", 
"");
 
 2004                                 $lg->addCustomCommand($link, 
"blog_notification_toggle_on");
 
 2006                                 $lg->addHeaderIcon(
"not_icon",
 
 2008                                         $this->lng->txt(
"blog_notification_deactivated"));
 
 2014                                 $ilCtrl->setParameter($this, 
"prvm", 
"");
 
 2016                                 $ilCtrl->setParameter($this, 
"bmn", 
"");
 
 2017                                 $ilCtrl->setParameter($this, 
"blpg", 
"");
 
 2018                                 $link = $ilCtrl->getLinkTarget($this, 
"");              
 
 2019                                 $ilCtrl->setParameter($this, 
"blpg", $sub_id);
 
 2020                                 $ilCtrl->setParameter($this, 
"bmn", $this->month);                                                                      
 
 2021                                 $lg->addCustomCommand($link, 
"blog_edit"); 
 
 2025                                         $link = $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", 
"edit");                                                                      
 
 2026                                         $lg->addCustomCommand($link, 
"blog_edit_posting");      
 
 2029                                 $ilCtrl->setParameter($this, 
"prvm", 
"fsc");
 
 2032                         $ilCtrl->setParameter($this, 
"ntf", 
"");
 
 2042                 include_once 
"./Services/Notification/classes/class.ilNotification.php";
 
 2043                 switch(
$_GET[
"ntf"])
 
 2054                 $ilCtrl->redirect($this, 
"preview");
 
 2067                 include_once 
"Modules/Blog/classes/class.ilBlogPosting.php";
 
 2069                 if($post->getBlogId() == $a_blog_id)
 
 2071                         return $post->getTitle();
 
 2082                 foreach($this->items as 
$month => $postings)
 
 2084                         foreach($postings as $id => $item)
 
 2088                                         unset($this->items[
$month][$id]);
 
 2090                                 else if($this->object->hasApproval() && !$item[
"approved"])
 
 2092                                         unset($this->items[
$month][$id]);
 
 2095                         if(!
sizeof($this->items[
$month]))
 
 2097                                 unset($this->items[$month]);
 
 2101                 if($this->items && !isset($this->items[$this->month]))
 
 2103                         $this->month = array_shift(array_keys($this->items));
 
 2110                 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
 
 2115                                 if(in_array($a_keyword,
 
 2137                 if($this->id_type == self::WORKSPACE_NODE_ID)
 
 2149                                         include_once 
"Modules/Blog/classes/class.ilBlogPosting.php";
 
 2151                                         $a_author_id = $post->getAuthor();                                      
 
 2153                                 if($ilUser->getId() == $a_author_id)
 
 2172                 if (is_object($this->
object))
 
 2174                         $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
""), 
"", 
$this->node_id);              
 
 2182                         include_once 
"Modules/Blog/classes/class.ilBlogPosting.php";
 
 2184                         $post->setApproved(
true);
 
 2190                 $this->ctrl->redirect($this, 
"render");
 
 2207                 $ilTabs->activateTab(
"contributors");
 
 2210                 include_once 
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
 
 2215                                 'auto_complete_name'    => $lng->txt(
'user'),
 
 2216                                 'submit_name'                   => $lng->txt(
'add'),
 
 2217                                 'add_search'                    => 
true,
 
 2222                 $other_roles = $this->
object->getRolesWithContribute($this->node_id);
 
 2225                         ilUtil::sendInfo(sprintf($lng->txt(
"blog_contribute_other_roles"), implode(
", ", $other_roles)));
 
 2228                 include_once 
"Modules/Blog/classes/class.ilContributorTableGUI.php";
 
 2229                 $tbl = 
new ilContributorTableGUI($this, 
"contributors", $this->object->getLocalContributorRole($this->node_id));
 
 2231                 $tpl->setContent($tbl->getHTML());                                                      
 
 2241                 if(!strlen(trim(
$_POST[
'user_login'])))
 
 2246                 $users = explode(
',', 
$_POST[
'user_login']);
 
 2248                 $user_ids = array();
 
 2249                 foreach($users as $user)
 
 2259                         $user_ids[] = $user_id;
 
 2279                 if(!count($a_user_ids))
 
 2286                 $contr_role_id = $this->
object->getLocalContributorRole($this->node_id);
 
 2293                 foreach($a_user_ids as $user_id)
 
 2295                         if(!$rbacreview->isAssigned($user_id, $contr_role_id))
 
 2297                                 $rbacadmin->assignUser($contr_role_id, $user_id);
 
 2302                 $ilCtrl->redirect($this, 
"contributors");
 
 2317                         $ilCtrl->redirect($this, 
"contributors");
 
 2321                 $contr_role_id = $this->
object->getLocalContributorRole($this->node_id);
 
 2328                 foreach($ids as $user_id)
 
 2330                         $rbacadmin->deassignUser($contr_role_id, $user_id);
 
 2334                 $this->ctrl->redirect($this, 
"contributors");                           
 
 2344                 include_once 
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
 
 2356                 include_once 
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
 
 2366                         include_once 
"Modules/Blog/classes/class.ilBlogPosting.php";
 
 2368                         $post->setApproved(
false);
 
 2369                         $post->setActive(
false);
 
 2370                         $post->update(
true, 
false, 
false);
 
 2375                 $this->ctrl->redirect($this, 
"render");
 
 2396                 $ctpl->setCurrentBlock(
"ContentStyle");
 
 2397                 $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
 2399                 $ctpl->parseCurrentBlock();
 
 2406                 $this->tabs_gui->activateTab(
"settings");
 
 2410                 $this->tpl->setContent($form->getHTML());                               
 
 2417                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
 2418                 $this->lng->loadLanguageModule(
"style");
 
 2420                 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2423                 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
 
 2424                 $style_id = $this->
object->getStyleSheetId();
 
 2426                 if ($fixed_style > 0)
 
 2430                                 $this->lng->txt(
"global_fixed").
")");
 
 2431                         $form->addItem($st);
 
 2438                         $st_styles[0] = $this->lng->txt(
"default");
 
 2448                                         $form->addItem($st);
 
 2451                                         $form->addCommandButton(
"editStyle", $this->lng->txt(
"style_edit_style"));
 
 2452                                         $form->addCommandButton(
"deleteStyle", $this->lng->txt(
"style_delete_style"));
 
 2461                                 $style_sel->setValue($style_id);
 
 2462                                 $form->addItem($style_sel);
 
 2464                                 $form->addCommandButton(
"saveStyleSettings", $this->lng->txt(
"save"));
 
 2465                                 $form->addCommandButton(
"createStyle", $this->lng->txt(
"sty_create_ind_style"));
 
 2469                 $form->setTitle($this->lng->txt(
"blog_style"));
 
 2470                 $form->setFormAction($this->ctrl->getFormAction($this));
 
 2477                 $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 2482                 $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 2487                 $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 2494                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
 2495                 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
 2497                         || $this->object->getStyleSheetId() == 0))
 
 2500                         $this->
object->update();
 
 2504                 $this->ctrl->redirect($this, 
"editStyleProperties");
 
 2514                 if(substr($a_target, -3) == 
"wsp")
 
 2516                         $id = explode(
"_", $a_target);          
 
 2518                         $_GET[
"baseClass"] = 
"ilSharedResourceGUI";     
 
 2519                         $_GET[
"wsp_id"] = $id[0];               
 
 2520                         if(
sizeof($id) == 3)
 
 2522                                 $_GET[
"gtp"] = $id[1];
 
 2527                         $id = explode(
"_", $a_target);          
 
 2529                         $_GET[
"baseClass"] = 
"ilRepositoryGUI"; 
 
 2530                         $_GET[
"ref_id"] = $id[0];               
 
 2531                         $_GET[
"cmd"] = 
"preview";
 
 2532                         if(
sizeof($id) == 2)
 
 2534                                 $_GET[
"gtp"] = $id[1];
 
 2538                 include(
"ilias.php");