From 7030f69f4677adac837389d096389d3fd5c6a846 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Thu, 1 Nov 2012 02:21:58 +0000 Subject: [PATCH] news_render_type fixes. Path fix for othernews menus. --- e107_admin/newspost.php | 98 ++++++++++++++++---------- e107_admin/update_routines.php | 5 +- e107_handlers/form_handler.php | 7 +- e107_handlers/news_class.php | 1 + e107_plugins/news/e_featurebox.php | 2 +- e107_plugins/news/other_news2_menu.php | 2 +- e107_plugins/news/other_news_menu.php | 2 +- e107_plugins/rss_menu/rss.php | 4 +- news.php | 6 +- 9 files changed, 77 insertions(+), 50 deletions(-) diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 138df1bb3..f1f449e1d 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -307,7 +307,7 @@ class news_admin_ui extends e_admin_ui 'news_end' => array('title' => "End", 'type' => 'datestamp', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'parms' => 'mask=%A %d %B %Y'), 'news_class' => array('title' => NWSLAN_22, 'type' => 'userclasses', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'batch'=>true, 'filter'=>true), - 'news_render_type' => array('title' => LAN_TEMPLATE, 'type' => 'dropdown', 'data' => 'str', 'width' => 'auto', 'thclass' => 'center', 'class' => null, 'nosort' => false, 'batch'=>true, 'filter'=>true), + 'news_render_type' => array('title' => LAN_TEMPLATE, 'type' => 'dropdown', 'data' => 'comma', 'width' => 'auto', 'thclass' => 'center', 'class' => null, 'nosort' => false, 'batch'=>true, 'filter'=>true), 'news_sticky' => array('title' => LAN_NEWS_28, 'type' => 'boolean', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false, 'batch'=>true, 'filter'=>true), 'news_allow_comments' => array('title' => NWSLAN_15, 'type' => 'boolean', 'width' => 'auto', 'thclass' => 'center', 'class' => 'center', 'nosort' => false,'batch'=>true, 'filter'=>true,'readParms'=>'reverse=1','writeParms'=>'reverse=1'), 'news_comment_total' => array('title' => LAN_NEWS_60, 'type' => 'number', 'width' => '10%', 'thclass' => '', 'class' => null, 'nosort' => false), @@ -320,6 +320,18 @@ class news_admin_ui extends e_admin_ui protected $cats = array(); protected $newspost; + + protected $news_renderTypes = array( + + '0' => "Default", + '1' => "Default - Title", + '4' => "Default - Title/Summary", + '2' => "Sidebar - Othernews", + '3' => "Sidebar - Othernews 2", + + '5' => "Featurebox" + ); + function init() { @@ -332,9 +344,15 @@ class news_admin_ui extends e_admin_ui } asort($this->cats); $this->fields['news_category']['writeParms'] = $this->cats; - $this->fields['news_render_type']['writeParms'] = array(NWSLAN_75,NWSLAN_76,NWSLAN_77,NWSLAN_77." 2","Featurebox"); + + + + $this->fields['news_render_type']['writeParms'] = $this->news_renderTypes; // array(NWSLAN_75,NWSLAN_76,NWSLAN_77,NWSLAN_77." 2","Featurebox"); $this->newspost = new admin_newspost; + + $this->newspost->news_renderTypes = $this->news_renderTypes; + $this->newspost->observer(); @@ -541,7 +559,7 @@ function headerjs() "; */ - // TODO - move this to external JS when news becomes a plugin + // TODO - REMOVE $ret .= "