示例#1
0
文件: Show.php 项目: sinfocol/gwf3
 private function getPageContent(GWF_Page $page)
 {
     switch ($page->getMode()) {
         case GWF_Page::HTML:
             return $page->getVar('page_content');
         case GWF_Page::BBCODE:
             return GWF_Message::display($page->getVar('page_content'));
         case GWF_Page::SMARTY:
             return $this->getPageContentSmarty($page);
         default:
             return 'NO PAGE MODE SELECTED ERROR 0915';
     }
 }
示例#2
0
文件: Edit.php 项目: sinfocol/gwf3
 private function getSelectedGroups(GWF_Page $page)
 {
     return explode(',', $page->getVar('page_groups'));
 }
示例#3
0
 private function formTranslate(GWF_Page $page)
 {
     $data = array('url' => array(GWF_Form::STRING, $page->getVar('page_url'), $this->module->lang('th_url')), 'lang' => array(GWF_Form::SELECT, GWF_LangSelect::single(1, 'lang', $this->getSelectedLangID()), $this->module->lang('th_lang')), 'title' => array(GWF_Form::STRING, $page->getVar('page_title'), $this->module->lang('th_title')), 'descr' => array(GWF_Form::STRING, $page->getVar('page_meta_desc'), $this->module->lang('th_descr')), 'tags' => array(GWF_Form::STRING, trim($page->getVar('page_meta_tags'), ','), $this->module->lang('th_tags')), 'file' => array(GWF_Form::FILE_OPT, '', $this->module->lang('th_file')), 'upload' => array(GWF_Form::SUBMIT, $this->module->lang('btn_upload')), 'content' => array(GWF_Form::MESSAGE_NOBB, $page->getVar('page_content'), $this->module->lang('th_content')), 'translate' => array(GWF_Form::SUBMIT, $this->module->lang('btn_translate')));
     return new GWF_Form($this, $data);
 }
示例#4
0
 /**
  * Push a page on the history.
  * @param GWF_Page $page
  * @return boolean
  */
 public static function push(GWF_Page $page)
 {
     return GDO::table(__CLASS__)->insertAssoc(array('ph_pid' => $page->getID(), 'ph_editor' => GWF_Session::getUserID(), 'ph_edit_date' => GWF_Time::getDate(), 'ph_content' => $page->getVar('page_content'), 'ph_inline_css' => $page->getVar('page_inline_css')));
 }