00001 <?php
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Display.php';
00027
00028
00029
00030
00041
00042 class FF_Action_Display_PortalBlock extends FF_Action_Display {
00043
00044
00051 function renderSearchBox()
00052 {
00053 return;
00054 }
00055
00056
00057
00058
00065 function renderDisplay()
00066 {
00067 $this->o_output->o_tpl->append('content_middle', $this->getBlockData());
00068 $this->renderAdditionalLinks();
00069 }
00070
00071
00072
00073
00080 function getBlockData()
00081 {
00082 $o_widget =& new FF_Smarty('twoColumnTable');
00083 $o_widget->assign(array('S_table_columns' => 1,
00084 'T_table_header' => $this->getPageName(), 'has_table_header' => true));
00085 require_once 'HTML/BBCodeParser.php';
00086 $o_bbCodeParser =& new HTML_BBCodeParser(array('filters' => 'Basic,Email,Links,Lists'));
00087 $s_content = $this->o_model->getContent(true);
00088 if ($this->o_model->getNl2Br()) {
00089 $s_content = nl2br($s_content);
00090 }
00091
00092 $o_widget->append('rows', array('has_content_cell' => true,
00093 'T_table_content_cell' => $o_bbCodeParser->qparse($s_content)));
00094 return $o_widget->fetch();
00095 }
00096
00097
00098
00099
00106 function renderAdditionalLinks()
00107 {
00108 if (($s_actionId = FF_Request::getParam('returnActionId', 'g', false))) {
00109 $this->o_output->o_tpl->append('page_links', $this->o_output->link(FastFrame::selfURL(
00110 array('actionId' => $s_actionId, 'module' => 'PortalBlock')),
00111 _('Return to Portal Block List')));
00112 }
00113 else {
00114 $this->o_output->o_tpl->append('page_links', $this->o_output->link(
00115 'javascript: window.history.go(-1)', _('Return')));
00116 }
00117 }
00118
00119
00120
00121
00128 function getPageName()
00129 {
00130 return $this->o_model->getName();
00131 }
00132
00133
00134 }
00135 ?>