コード例 #1
0
ファイル: answer.php プロジェクト: rolwi/koala
$tpl->set_block("content", "input_tendency_row", "INPUT_TENDENCY_ROW");
$tpl->set_block("content", "input_tendency", "DUMMY");
$tpl->set_block("content", "question_align_left", "DUMMY");
$tpl->set_block("content", "question_align_top", "DUMMY");
$tpl->set_block("content", "quest_row", "QUEST_ROW");
$tpl->set_block("content", "feedback_row", "FEEDBACK_ROW");
$tpl->set_block("content", "button_previous", "BUTTON_PREV");
$tpl->set_block("content", "form", "FORM");
$tpl->set_block("content", "form_edit", "DUMMY");
$tpl->set_block("content", "button_next", "BUTTON_NEXT");
$tpl->set_block("content", "button_finish", "BUTTON_FIN");
$tpl->set_block("content", "button_home", "BUTTON_HOME");
$tpl->set_block("content", "hidden_row", "HIDDEN_ROW");
$tpl->set_block("content", "progress_row", "PROGRESS_ROW");
$tpl->set_var(array("DUMMY" => "", "MENU" => "", "OBJECT_ID" => $questionary->get_id(), "ANSWER_ID" => $answer_id, "QUESTIONARY_NAME" => $questionary_display_name, "HIDDEN_ROW" => "", "QUEST_ROW" => "", "FEEDBACK_ROW" => "", "PROGRESS_ROW" => "", "BUTTON_HOME" => "", "FORM" => ""));
$UBB = new UBBCode();
if ($is_author) {
    $tpl->set_var("MENU", derive_menu("questionary", $questionary, "", 3));
} else {
    $tpl->set_var("MENU", derive_menu("questionary", $questionary, "", 0));
}
//check if input is possible => exit
if (!$is_editor || $forbidden || !$enabled || $no_write_access) {
    //check if user is allowed to write in object
    if (!$is_editor || $no_write_access) {
        $tpl->parse("FEEDBACK", "error_no_write_access");
        $tpl->parse("FEEDBACK_ROW", "feedback_row", true);
    } else {
        if ($forbidden) {
            $tpl->parse("FEEDBACK", "error_multiple_input");
            $tpl->parse("FEEDBACK_ROW", "feedback_row", true);
コード例 #2
0
ファイル: Index.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $htmlBody = "";
     $objectId = $requestObject->getId();
     $portlet = $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     //icon
     $referIcon = \Portal::getInstance()->getAssetUrl() . "icons/refer_white.png";
     //reference handling
     $params = $requestObject->getParams();
     if (isset($params["referenced"]) && $params["referenced"] == true) {
         $portletIsReference = true;
         $referenceId = $params["referenceId"];
     } else {
         $portletIsReference = false;
     }
     $portletName = $portlet->get_attribute(OBJ_DESC);
     $this->getExtension()->addCSS();
     $this->getExtension()->addJS();
     //hack
     //include_once("/Users/mjako/koala-development-workspace-next/koala-core/lib/bid/slashes.php");
     include_once PATH_BASE . "/koala-core/lib/bid/slashes.php";
     //get content of portlet
     $content = $portlet->get_attribute("bid:portlet:content");
     if (is_array($content) && count($content) > 0) {
         array_walk($content, "_stripslashes");
     } else {
         $content = array();
     }
     $UBB = new \UBBCode();
     include_once PATH_BASE . "koala-core/lib/bid/derive_url.php";
     $portletInstance = \PortletTopic::getInstance();
     $portletPath = $portletInstance->getExtensionPath();
     $portletFileName = $portletPath . "/ui/html/index.html";
     $tmpl = new \HTML_TEMPLATE_IT();
     $tmpl->loadTemplateFile($portletFileName);
     $tmpl->setVariable("PORTLET_ID", $portlet->get_id());
     $tmpl->setVariable("PORTLET_NAME", $portletName);
     //refernce icon
     if ($portletIsReference) {
         $tmpl->setVariable("REFERENCE_ICON", "<img src='{$referIcon}'>");
     }
     //popupmenu main
     if (!$portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON_MAIN");
         $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("PortletTopic");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setCommand("GetPopupMenu");
         $popupmenu->setParams(array(array("key" => "menu", "value" => "nerd")));
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
         $tmpl->parse("BLOCK_EDIT_BUTTON_MAIN");
     }
     if ($portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("Portal");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setParams(array(array("key" => "sourceObjectId", "value" => $portlet->get_id()), array("key" => "linkObjectId", "value" => $referenceId)));
         $popupmenu->setCommand("PortletGetPopupMenuReference");
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
         $tmpl->parse("BLOCK_EDIT_BUTTON_MAIN");
     }
     if (sizeof($content) > 0) {
         $categoryCount = 0;
         foreach ($content as $category) {
             $tmpl->setCurrentBlock("category");
             //popupmenu category
             if ($portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
                 $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON_CATEGORY");
                 $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
                 $popupmenu = new \Widgets\PopupMenu();
                 $popupmenu->setData($portlet);
                 $popupmenu->setNamespace("PortletTopic");
                 $popupmenu->setElementId("portal-overlay");
                 $popupmenu->setCommand("GetPopupMenuCategory");
                 $popupmenu->setParams(array(array("key" => "category", "value" => $categoryCount)));
                 $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
                 $tmpl->parse("BLOCK_EDIT_BUTTON_CATEGORY");
             }
             $tmpl->setVariable("CATEGORY_TITLE", $UBB->encode($category["title"]));
             $tmpl->setVariable("TOPIC_ENTRY", "");
             if (isset($category["topics"])) {
                 $entryCount = 0;
                 foreach ($category["topics"] as $topic) {
                     $tmpl->setCurrentBlock("topic_entry");
                     //popupmenu topic
                     if ($portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
                         $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON_TOPIC");
                         $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
                         $popupmenu = new \Widgets\PopupMenu();
                         $popupmenu->setData($portlet);
                         $popupmenu->setNamespace("PortletTopic");
                         $popupmenu->setElementId("portal-overlay");
                         $popupmenu->setCommand("GetPopupMenuEntry");
                         $popupmenu->setParams(array(array("key" => "category", "value" => $categoryCount), array("key" => "entry", "value" => $entryCount)));
                         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
                         $tmpl->parse("BLOCK_EDIT_BUTTON_TOPIC");
                     }
                     if (trim($topic["link_url"]) != "") {
                         $tmpl->setCurrentBlock("TOPIC_LINK");
                         $tmpl->setVariable("TOPIC_TITLE", $UBB->encode($topic["title"]));
                         $tmpl->setVariable("TOPIC_LINK_URL", revealPath($topic["link_url"], $portlet->get_path()));
                         $tmpl->setVariable("TOPIC_LINK_TARGET", $topic["link_target"] == "checked" ? "_blank" : "_top");
                         $tmpl->parse("TOPIC_LINK");
                     } else {
                         $tmpl->setCurrentBlock("TOPIC_NOLINK");
                         $tmpl->setVariable("TOPIC_TITLE", $UBB->encode($topic["title"]));
                         $tmpl->parse("TOPIC_NOLINK");
                     }
                     $tmpl->setVariable("TOPIC_DESCRIPTION", $UBB->encode($topic["description"]));
                     //if there is a url parse headline as link
                     if (trim($topic["link_url"]) == "") {
                         //$tmpl->parse("TOPIC_DISPLAY_TITLE", "topic_display_title");
                     } else {
                         //$tmpl->parse("TOPIC_DISPLAY_TITLE", "topic_display_title_link");
                     }
                     //if there is a description parse out
                     $tmpl->setCurrentBlock("topic_display_description");
                     if (trim($topic["description"]) == "") {
                         $tmpl->setVariable("TOPIC_DISPLAY_DESCRIPTION", "");
                     } else {
                         //$tmpl->parse("TOPIC_DISPLAY_DESCRIPTION", "topic_display_description");
                     }
                     $tmpl->parse("topic_display_description");
                     //parse out every topic
                     $tmpl->parse("topic_entry");
                     $entryCount++;
                 }
             }
             //parse out category
             $tmpl->parse("category");
             $categoryCount++;
         }
     } else {
         $tmpl->setVariable("CATEGORY", "");
     }
     $htmlBody = $tmpl->get();
     $this->content = $htmlBody;
     //widgets
     $outputWidget = new \Widgets\RawHtml();
     $outputWidget->setHtml($htmlBody);
     //popummenu
     $outputWidget->addWidget(new \Widgets\PopupMenu());
     $this->rawHtmlWidget = $outputWidget;
 }
コード例 #3
0
ファイル: Index.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $objectId = $requestObject->getId();
     $portlet = $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     //icon
     $referIcon = \Portal::getInstance()->getAssetUrl() . "icons/refer_white.png";
     //reference handling
     $params = $requestObject->getParams();
     if (isset($params["referenced"]) && $params["referenced"] == true) {
         $portletIsReference = true;
         $referenceId = $params["referenceId"];
     } else {
         $portletIsReference = false;
     }
     //hack
     include_once PATH_BASE . "koala-core/lib/bid/slashes.php";
     //get content of portlet
     $content = $portlet->get_attribute("bid:portlet:content");
     if (is_array($content) && count($content) > 0) {
         array_walk($content, "_stripslashes");
     } else {
         $content = array();
     }
     //get singleton and portlet path
     $portletInstance = \PortletHeadline::getInstance();
     $portletPath = $portletInstance->getExtensionPath();
     if (sizeof($content) > 0) {
         $portletFileName = $portletPath . "/ui/html/index.html";
         $tmpl = new \HTML_TEMPLATE_IT();
         $tmpl->loadTemplateFile($portletFileName);
         //popupmenu
         if (!$portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
             $popupmenu = new \Widgets\PopupMenu();
             $popupmenu->setData($portlet);
             $popupmenu->setNamespace("PortletHeadline");
             $popupmenu->setElementId("portal-overlay");
             $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
         }
         if ($portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
             $popupmenu = new \Widgets\PopupMenu();
             $popupmenu->setData($portlet);
             $popupmenu->setNamespace("Portal");
             $popupmenu->setElementId("portal-overlay");
             $popupmenu->setParams(array(array("key" => "sourceObjectId", "value" => $portlet->get_id()), array("key" => "linkObjectId", "value" => $referenceId)));
             $popupmenu->setCommand("PortletGetPopupMenuReference");
             $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
         }
         $UBB = new \UBBCode();
         include_once PATH_BASE . "koala-core/lib/bid/derive_url.php";
         $tmpl->setVariable("DUMMY", "");
         $tmpl->setVariable("EDIT_BUTTON", "");
         $tmpl->setVariable("PORTLET_ID", $portlet->get_id());
         $tmpl->setVariable("ALIGNMENT", trim($content["alignment"]));
         $tmpl->setVariable("HEADLINE", $UBB->encode($content["headline"]));
         //refernce icon
         if ($portletIsReference) {
             $tmpl->setVariable("REFERENCE_ICON", "<img src='{$referIcon}'>");
         }
         $tmpl->setVariable("SIZE", trim($content["size"]));
         if ($portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
             $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON");
             $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
             $tmpl->parse("BLOCK_EDIT_BUTTON");
         }
         $htmlBody = $tmpl->get();
     } else {
         $htmlBody = "";
     }
     $this->content = $htmlBody;
     //widgets
     $outputWidget = new \Widgets\RawHtml();
     //popummenu
     $outputWidget->addWidget(new \Widgets\PopupMenu());
     $outputWidget->setHtml($htmlBody);
     $this->rawHtmlWidget = $outputWidget;
 }
コード例 #4
0
ファイル: Index.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $objectId = $requestObject->getId();
     $portlet = $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $portlet_name = $portlet->get_attribute(OBJ_DESC);
     $params = $requestObject->getParams();
     //icon
     $referIcon = \Portal::getInstance()->getAssetUrl() . "icons/refer_white.png";
     //reference handling
     if (isset($params["referenced"]) && $params["referenced"] == true) {
         $portletIsReference = true;
         $referenceId = $params["referenceId"];
     } else {
         $portletIsReference = false;
     }
     //hack
     include_once PATH_BASE . "koala-core/lib/bid/slashes.php";
     //get content of portlet
     $content = $portlet->get_attribute("bid:portlet:content");
     if (is_array($content) && count($content) > 0) {
         array_walk($content, "_stripslashes");
     } else {
         $content = array();
     }
     $portletInstance = \PortletAppointment::getInstance();
     $portletPath = $portletInstance->getExtensionPath();
     $portletFileName = $portletPath . "/ui/html/index.html";
     $tmpl = new \HTML_TEMPLATE_IT();
     $tmpl->loadTemplateFile($portletFileName);
     $tmpl->setVariable("PORTLET_ID", $portlet->get_id());
     $tmpl->setVariable("APPOINTMENT_NAME", $portlet_name);
     $tmpl->setVariable("linkurl", "");
     //refernce icon
     if ($portletIsReference) {
         $tmpl->setVariable("REFERENCE_ICON", "<img src='{$referIcon}'>");
     }
     //main popupmenu
     if (!$portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON_MAIN");
         $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("PortletAppointment");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setCommand("GetPopupMenu");
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
     }
     if ($portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("Portal");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setParams(array(array("key" => "sourceObjectId", "value" => $portlet->get_id()), array("key" => "linkObjectId", "value" => $referenceId)));
         $popupmenu->setCommand("PortletGetPopupMenuReference");
         $tmpl->setVariable("POPUPMENU", $popupmenu->getHtml());
     }
     $tmpl->parse("BLOCK_EDIT_BUTTON_MAIN");
     $UBB = new \UBBCode();
     include_once PATH_BASE . "koala-core/lib/bid/derive_url.php";
     if (sizeof($content) > 0) {
         $indexCount = 0;
         foreach ($content as $appointment) {
             $tmpl->setCurrentBlock("BLOCK_TERM");
             //term popupmenu
             if (!$portletIsReference && $portlet->check_access_write($GLOBALS["STEAM"]->get_current_steam_user())) {
                 $tmpl->setCurrentBlock("BLOCK_EDIT_BUTTON_MAIN");
                 $tmpl->setVariable("PORTLET_ID_EDIT", $portlet->get_id());
                 $popupmenu = new \Widgets\PopupMenu();
                 $popupmenu->setCommand("GetPopupMenuTerm");
                 $popupmenu->setData($portlet);
                 $popupmenu->setNamespace("PortletAppointment");
                 $popupmenu->setElementId("portal-overlay");
                 $popupmenu->setParams(array(array("key" => "termIndex", "value" => $indexCount)));
                 $tmpl->setVariable("POPUPMENU_ENTRY", $popupmenu->getHtml());
                 $tmpl->parse("BLOCK_EDIT_BUTTON_TERM");
             }
             $indexCount++;
             $tmpl->setVariable("STARTDATE", $appointment["start_date"]["day"] . "." . $appointment["start_date"]["month"] . "." . $appointment["start_date"]["year"]);
             if (trim($appointment["location"]) != "" && trim($appointment["location"]) != "0") {
                 $tmpl->setCurrentBlock("BLOCK_TERM_LOCATION");
                 $tmpl->setVariable("LOCATION", $UBB->encode($appointment["location"]));
                 $tmpl->setVariable("LOCATION_ROW", "");
                 $tmpl->parse("BLOCK_TERM_LOCATION");
             }
             if ($appointment["end_date"]["day"] != "") {
                 $tmpl->setCurrentBlock("BLOCK_TERM_ENDDATE");
                 $tmpl->setVariable("ENDDATE", $appointment["end_date"]["day"] . "." . $appointment["end_date"]["month"] . "." . $appointment["end_date"]["year"]);
                 $tmpl->setVariable("ENDDATE_ROW", "");
                 $tmpl->parse("BLOCK_TERM_ENDDATE");
             }
             if ($appointment["start_time"]["hour"] != "") {
                 $tmpl->setCurrentBlock("BLOCK_TERM_TIME");
                 $tmpl->setVariable("TIME", $appointment["start_time"]["hour"] . "." . $appointment["start_time"]["minutes"] . " Uhr");
                 $tmpl->setVariable("TIME_ROW", "");
                 $tmpl->parse("BLOCK_TERM_TIME");
             }
             if (trim($appointment["description"]) != "" && trim($appointment["description"]) != "0") {
                 $tmpl->setCurrentBlock("BLOCK_TERM_DESCRIPTION");
                 $tmpl->setVariable("DESCRIPTION", $UBB->encode($appointment["description"]));
                 $tmpl->parse("BLOCK_TERM_DESCRIPTION");
             }
             if (trim($appointment["linkurl"]) != "" && trim($appointment["linkurl"]) != "0") {
                 $tmpl->setCurrentBlock("BLOCK_TERM_LINK");
                 $tmpl->setVariable("LINKURL", derive_url($appointment["linkurl"]));
                 $tmpl->setVariable("TOPIC", $UBB->encode($appointment["topic"]));
                 $tmpl->parse("BLOCK_TERM_LINK");
             } else {
                 $tmpl->setCurrentBlock("BLOCK_TERM_NOLINK");
                 $tmpl->setVariable("TOPIC", $UBB->encode($appointment["topic"]));
                 $tmpl->parse("BLOCK_TERM_NOLINK");
             }
             $tmpl->parse("BLOCK_TERM");
         }
     }
     $htmlBody = $tmpl->get();
     $this->content = $htmlBody;
     //widgets
     $outputWidget = new \Widgets\RawHtml();
     $outputWidget->setHtml($htmlBody);
     //popummenu
     $outputWidget->addWidget(new \Widgets\PopupMenu());
     $this->rawHtmlWidget = $outputWidget;
 }
コード例 #5
0
ファイル: Index.class.php プロジェクト: rolwi/koala
 public function processData(\IRequestObject $requestObject)
 {
     $objectId = $requestObject->getId();
     $portlet = $portletObject = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $objectId);
     $params = $requestObject->getParams();
     //icon
     $referIcon = \Portal::getInstance()->getAssetUrl() . "icons/refer_white.png";
     //reference handling
     if (isset($params["referenced"]) && $params["referenced"] == true) {
         $portletIsReference = true;
         $referenceId = $params["referenceId"];
     } else {
         $portletIsReference = false;
     }
     $this->getExtension()->addCSS();
     $this->getExtension()->addJS();
     $portletName = $portlet->get_attribute(OBJ_DESC);
     //hack
     include_once PATH_BASE . "koala-core/lib/bid/slashes.php";
     //get content of portlet
     $content = $portlet->get_attribute("bid:portlet:content");
     if (is_array($content) && count($content) > 0) {
         array_walk($content, "_stripslashes");
     } else {
         $content = array();
     }
     $portletInstance = \PortletMsg::getInstance();
     $portletPath = $portletInstance->getExtensionPath();
     $UBB = new \UBBCode();
     include_once PATH_BASE . "koala-core/lib/bid/derive_url.php";
     $portletFileName = $portletPath . "/ui/html/index.html";
     $tmpl = new \HTML_TEMPLATE_IT();
     $tmpl->loadTemplateFile($portletFileName);
     $tmpl->setVariable("PORTLET_ID", $portlet->get_id());
     //headline
     $tmpl->setCurrentBlock("BLOCK_MESSAGE_HEADLINE");
     $tmpl->setVariable("HEADLINE", $portletName);
     //refernce icon
     if ($portletIsReference) {
         $tmpl->setVariable("REFERENCE_ICON", "<img src='{$referIcon}'>");
     }
     if (!$portletIsReference) {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("PortletMsg");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setParams(array(array("key" => "portletObjectId", "value" => $portlet->get_id())));
         $popupmenu->setCommand("GetPopupMenuHeadline");
         $tmpl->setVariable("POPUPMENU_HEADLINE", $popupmenu->getHtml());
     } else {
         $popupmenu = new \Widgets\PopupMenu();
         $popupmenu->setData($portlet);
         $popupmenu->setNamespace("Portal");
         $popupmenu->setElementId("portal-overlay");
         $popupmenu->setParams(array(array("key" => "sourceObjectId", "value" => $portlet->get_id()), array("key" => "linkObjectId", "value" => $referenceId)));
         $popupmenu->setCommand("PortletGetPopupMenuReference");
         $tmpl->setVariable("POPUPMENU_HEADLINE", $popupmenu->getHtml());
     }
     //show empty headline in edit mode
     if (trim($portletName) == "") {
         $tmpl->setVariable("HEADLINE_CLASS", "headline editbutton");
     } else {
         $tmpl->setVariable("HEADLINE_CLASS", "headline");
     }
     $tmpl->parse("BLOCK_MESSAGE_HEADLINE");
     if (sizeof($content) > 0) {
         /*  
          * Convert old messages which save its content as UBB code to new messages
          * using a html representation 
          */
         $convertUBB = false;
         $version = $portlet->get_attribute("bid:portlet:version");
         /*			
         if(!$version){
         	$convertUBB = true;
         	require_once("name.php");
         	$portlet->set_attribute("bid:portlet:version", $msg_version);
         }
         */
         $separator = false;
         foreach ($content as $messageId) {
             $tmpl->setCurrentBlock("BLOCK_MESSAGE");
             $message = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $messageId);
             $message->get_attributes(array("OBJ_DESC", "bid:portlet:msg:picture_id", "bid:portlet:msg:picture_alignment", "bid:portlet:msg:link_url", "bid:portlet:msg:link_url_label", "bid:portlet:msg:link_open"));
             //popupmenu
             $popupmenu = new \Widgets\PopupMenu();
             $popupmenu->setData($message);
             $popupmenu->setNamespace("PortletMsg");
             $popupmenu->setElementId("portal-overlay");
             $popupmenu->setParams(array(array("key" => "messageObjectId", "value" => $messageId), array("key" => "portletObjectId", "value" => $portlet->get_id())));
             $popupmenu->setCommand("GetPopupMenuMessage");
             if (!$portletIsReference) {
                 $tmpl->setVariable("POPUPMENU_MESSAGE", $popupmenu->getHtml());
             }
             /* 
              * Convert old messages which save its content as UBB code to new messages
              * using a html representation
              */
             if ($convertUBB) {
                 $message->set_content($UBB->encode($message->get_content()));
             }
             $tmpl->setVariable("MESSAGE_PICTURE", "");
             $tmpl->setVariable("MESSAGE_LINK", "");
             $tmpl->setVariable("MESSAGE_HEADLINE", $UBB->encode($message->get_attribute("OBJ_NAME")));
             if ($UBB->encode($message->get_attribute("OBJ_DESC")) != "") {
                 $tmpl->setVariable("MESSAGE_SUBHEADLINE", $UBB->encode($message->get_attribute("OBJ_DESC")));
             }
             $tmpl->setVariable("MESSAGE_CONTENT", $message->get_content());
             //get column width
             $columnObject = $portletObject->get_environment();
             $column_width = $columnObject->get_attribute("bid:portal:column:width");
             //PICTURE
             // parse in picture if it exists
             if ($message->get_attribute("bid:portlet:msg:picture_id") != "") {
                 $tmpl->setCurrentBlock("BLOCK_MESSAGE_PICTURE");
                 $picture_width = $message->get_attribute("bid:portlet:msg:picture_width") != "" ? trim($message->get_attribute("bid:portlet:msg:picture_width")) : "";
                 if (extract_percentual_length($picture_width) == "") {
                     $bare_picture_width = extract_length($picture_width);
                     if ($bare_picture_width == "") {
                         $picture_width = "";
                     } else {
                         if ($bare_picture_width > $column_width - 25) {
                             $picture_width = $column_width - 25;
                         }
                     }
                 }
                 $tmpl->setVariable("MESSAGE_PICTURE_ID", $message->get_attribute("bid:portlet:msg:picture_id"));
                 //not used anymore
                 $tmpl->setVariable("MESSAGE_PICTURE_URL", getDownloadUrlForObjectId($message->get_attribute("bid:portlet:msg:picture_id")));
                 $tmpl->setVariable("MESSAGE_PICTURE_ALIGNMENT", $message->get_attribute("bid:portlet:msg:picture_alignment"));
                 $tmpl->setVariable("MESSAGE_PICTURE_WIDTH", $picture_width);
                 $tmpl->parse("BLOCK_MESSAGE_PICTURE");
             }
             //LINK
             //parse in link if it exists
             if (trim($message->get_attribute("bid:portlet:msg:link_url")) != "") {
                 $tmpl->setCurrentBlock("BLOCK_MESSAGE_LINK");
                 if (trim($message->get_attribute("bid:portlet:msg:link_open")) != "checked") {
                     $tmpl->setVariable("MESSAGE_LINK_URL_LABEL", $message->get_attribute("bid:portlet:msg:link_url_label") !== "" ? $UBB->encode($message->get_attribute("bid:portlet:msg:link_url_label")) : $message->get_attribute("bid:portlet:msg:link_url"));
                     $tmpl->setVariable("MESSAGE_LINK_URL", revealPath($message->get_attribute("bid:portlet:msg:link_url"), $message->get_path()));
                     $tmpl->setVariable("MESSAGE_LINK_TARGET", "_top");
                 } else {
                     $tmpl->setVariable("MESSAGE_LINK_URL_LABEL", $message->get_attribute("bid:portlet:msg:link_url_label") !== "" ? $UBB->encode($message->get_attribute("bid:portlet:msg:link_url_label")) : $message->get_attribute("bid:portlet:msg:link_url"));
                     $tmpl->setVariable("MESSAGE_LINK_URL", revealPath($message->get_attribute("bid:portlet:msg:link_url"), $message->get_path()));
                     $tmpl->setVariable("MESSAGE_LINK_TARGET", "_blank");
                 }
                 $tmpl->parse("BLOCK_MESSAGE_LINK");
             }
             //SEPARATOR
             if ($separator) {
                 $tmpl->setCurrentBlock("BLOCK_SEPARATOR");
                 $tmpl->parse("BLOCK_SEPARATOR");
             }
             $separator = true;
             $tmpl->parse("BLOCK_MESSAGE");
         }
     } else {
         //NO MESSAGE
         $tmpl->setCurrentBlock("BLOCK_NO_MESSAGE");
         $tmpl->setVariable("NO_MESSAGE_INFO", "Keine Nachrichten vorhanden.");
         $tmpl->parse("BLOCK_NO_MESSAGE");
     }
     $tmpl->setVariable("PATH_URL", PATH_URL);
     $tmpl->parse("BLOCK_PORTLET_MESSAGE");
     $htmlBody = $tmpl->get();
     $this->content = $htmlBody;
     //widgets
     $outputWidget = new \Widgets\RawHtml();
     $outputWidget->addWidget(new \Widgets\PopupMenu());
     $outputWidget->setHtml($htmlBody);
     $this->rawHtmlWidget = $outputWidget;
 }