From a16950e9bdb722a29acdd762e13ee4834c76ee5e Mon Sep 17 00:00:00 2001 From: MikeyGMT Date: Fri, 2 Dec 2016 20:44:17 +0000 Subject: [PATCH] RSS Menu Lans to Generic Terms #6 Replace duplicates with common terms in RSS Plugin --- e107_languages/English/admin/lan_admin.php | 3 +- e107_plugins/rss_menu/admin_prefs.php | 64 +++++++++---------- e107_plugins/rss_menu/e_meta.php | 2 +- e107_plugins/rss_menu/e_url.php | 8 +-- .../languages/English_admin_rss_menu.php | 39 +++++------ .../rss_menu/languages/English_global.php | 10 ++- e107_plugins/rss_menu/rss.php | 2 +- e107_plugins/rss_menu/rss_menu.php | 2 +- e107_plugins/rss_menu/rss_setup.php | 4 +- e107_plugins/rss_menu/rss_shortcodes.php | 13 +++- 10 files changed, 84 insertions(+), 63 deletions(-) diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index d13898d95..530924f8e 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -1,6 +1,6 @@ array('caption'=> LAN_MANAGE, 'perm' => 'P'), - 'main/import' => array('caption'=> "Add New Feed", 'perm' => 'P'), + 'main/import' => array('caption'=> LAN_CREATE, 'perm' => 'P'), 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'), /* @@ -75,7 +75,7 @@ class rss_admin extends e_admin_dispatcher { if(E107_DEBUG_LEVEL > 0) { - $this->adminMenu['main/create'] = array('caption'=> "Add Custom Feed", 'perm' => 'P'); + $this->adminMenu['main/create'] = array('caption'=> LAN_CREATE, 'perm' => 'P'); } } } @@ -94,19 +94,19 @@ class rss_ui extends e_admin_ui protected $perPage = 10; protected $fields = array ( - 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => false, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), + 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => false, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ), 'rss_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'rss_name' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'rss_path' => array ( 'title' => 'Plugin-Dir', 'type' => 'text', 'data' => 'str', 'readonly'=>1, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'rss_path' => array ( 'title' => LAN_PLUGIN_FOLDER,'type' => 'text', 'data' => 'str', 'readonly'=>1, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'rss_url' => array ( 'title' => LAN_URL, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), - 'rss_topicid' => array ( 'title' => 'Topic id', 'type' => 'text', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), + 'rss_topicid' => array ( 'title' => LAN_ID, 'type' => 'text', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), - 'rss_text' => array ( 'title' => 'Text', 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), + 'rss_text' => array ( 'title' => LAN_DESCRIPTION,'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ), 'rss_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'datestamp', 'data' => 'int', 'readonly'=>true, 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'rss_class' => array ( 'title' => LAN_VISIBILITY, 'type' => 'dropdown', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => array('optArray'=> array(RSS_LAN_ADMIN_21,RSS_LAN_ADMIN_22,RSS_LAN_ADMIN_23),'size'=>'xlarge'), 'class' => 'left', 'thclass' => 'left', ), - 'rss_limit' => array ( 'title' => 'Limit', 'type' => 'number', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), + 'rss_limit' => array ( 'title' => LAN_LIMIT, 'type' => 'number', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ), 'options' => array ( 'title' => LAN_OPTIONS, 'type' => null, 'data' => '', 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ), - ); + ); protected $fieldpref = array('checkboxes', 'rss_name','rss_url', 'rss_topicid', 'rss_limit', 'rss_class', 'options'); @@ -178,12 +178,12 @@ class rss_ui extends e_admin_ui - "; } @@ -192,7 +192,7 @@ class rss_ui extends e_admin_ui $RSS_ADMIN_IMPORT_TABLE = " - + @@ -499,12 +499,12 @@ if(!isset($RSS_ADMIN_LIST_HEADER))
Add + ".LAN_SELECT." ".LAN_NAME." - ".RSS_LAN_ADMIN_3." + ".LAN_PLUGIN_FOLDER." - ".RSS_LAN_ADMIN_5." - ".RSS_LAN_ADMIN_12." + ".LAN_URL." + ".LAN_ID."
{RSS_ADMIN_IMPORT_CHECK}{RSS_ADMIN_IMPORT_NAME}{RSS_ADMIN_IMPORT_TEXT}{RSS_ADMIN_IMPORT_NAME} - {RSS_ADMIN_IMPORT_TEXT} {RSS_ADMIN_IMPORT_PATH} {RSS_ADMIN_IMPORT_URL}
- - - - - - + + + + + + @@ -548,27 +548,27 @@ if(!isset($RSS_ADMIN_CREATE_TABLE)) - + - + - + - + - + - + @@ -619,10 +619,10 @@ if(!isset($RSS_ADMIN_IMPORT_HEADER))
{RSS_ADMIN_CAPTION=id,RSS_LAN_ADMIN_2}{RSS_ADMIN_CAPTION=name,RSS_LAN_ADMIN_4}{RSS_ADMIN_CAPTION=path,RSS_LAN_ADMIN_3}{RSS_ADMIN_CAPTION=url,RSS_LAN_ADMIN_5}".RSS_LAN_ADMIN_12."{RSS_ADMIN_CAPTION=limit,RSS_LAN_ADMIN_7}{RSS_ADMIN_CAPTION=id,LAN_ID}{RSS_ADMIN_CAPTION=name,LAN_NAME}{RSS_ADMIN_CAPTION=path,LAN_PLUGIN_FOLDER}{RSS_ADMIN_CAPTION=url,LAN_URL}".LAN_ID."{RSS_ADMIN_CAPTION=limit,LAN_LIMIT} ".LAN_OPTIONS."
{RSS_ADMIN_FORM_NAME}
".RSS_LAN_ADMIN_5."".LAN_URL." {RSS_ADMIN_FORM_URL}
".RSS_LAN_ADMIN_12."".LAN_ID." {RSS_ADMIN_FORM_TOPICID}
".RSS_LAN_ADMIN_3."".LAN_PLUGIN_FOLDER." {RSS_ADMIN_FORM_PATH}
".RSS_LAN_ADMIN_6."".LAN_DESCRIPTION." {RSS_ADMIN_FORM_TEXT}
".RSS_LAN_ADMIN_7."".LAN_LIMIT." {RSS_ADMIN_FORM_LIMIT}
".RSS_LAN_ADMIN_8."".LAN_VISIBILITY." {RSS_ADMIN_FORM_CLASS}
"; } if(!isset($RSS_ADMIN_IMPORT_TABLE)) @@ -911,7 +911,7 @@ class rss if(!$render) { - $this->show_message(RSS_LAN_ADMIN_11, RSS_LAN_ERROR_6); + $this->show_message(RSS_LAN_ADMIN_11, LAN_DESCRIPTION); } else { @@ -1045,8 +1045,8 @@ class rss } else { - return RSS_LAN_ADMIN_28; + return LAN_NOCHANGE_NOTSAVED; } } } // End class rss -?> \ No newline at end of file +?> diff --git a/e107_plugins/rss_menu/e_meta.php b/e107_plugins/rss_menu/e_meta.php index 3c1eacdc3..7381ef1c0 100644 --- a/e107_plugins/rss_menu/e_meta.php +++ b/e107_plugins/rss_menu/e_meta.php @@ -3,7 +3,7 @@ + ----------------------------------------------------------------------------+ | e107 website system | -| Copyright (C) 2008-2009 e107 Inc (e107.org) +| Copyright (C) 2008-2016 e107 Inc (e107.org) | http://e107.org | | diff --git a/e107_plugins/rss_menu/e_url.php b/e107_plugins/rss_menu/e_url.php index 7003e1afc..25bdad8e1 100644 --- a/e107_plugins/rss_menu/e_url.php +++ b/e107_plugins/rss_menu/e_url.php @@ -2,7 +2,7 @@ /* * e107 Bootstrap CMS * - * Copyright (C) 2008-2014 e107 Inc (e107.org) + * Copyright (C) 2008-2016 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) @@ -19,21 +19,21 @@ class rss_menu_url // plugin-folder + '_url' $config = array(); $config['rss'] = array( - 'alias' => 'feed', + 'alias' => 'feed', 'regex' => '^{alias}/(.*)/rss/?([\d]*)?$', 'sef' => '{alias}/{rss_url}/rss/{rss_topicid}', 'redirect' => '{e_PLUGIN}rss_menu/rss.php?cat=$1&type=2&topic=$2' ); $config['atom'] = array( - 'alias' => 'feed', + 'alias' => 'feed', 'regex' => '^{alias}/(.*)/atom/?([\d]*)?$', 'sef' => '{alias}/{rss_url}/atom/{rss_topicid}', 'redirect' => '{e_PLUGIN}rss_menu/rss.php?cat=$1&type=4&topic=$2' ); $config['index'] = array( - 'alias' => 'feed', + 'alias' => 'feed', 'regex' => '^{alias}/?$', 'sef' => '{alias}', 'redirect' => '{e_PLUGIN}rss_menu/rss.php', diff --git a/e107_plugins/rss_menu/languages/English_admin_rss_menu.php b/e107_plugins/rss_menu/languages/English_admin_rss_menu.php index 4b80fb99c..8497ac0db 100644 --- a/e107_plugins/rss_menu/languages/English_admin_rss_menu.php +++ b/e107_plugins/rss_menu/languages/English_admin_rss_menu.php @@ -1,10 +1,13 @@ addInfo(print_a($insert,true)); $status = ($sql->insert('rss', $insert)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR; - $mes->add("Adding Default table data to table: rss",$status); //TODO Generic LAN "LAN_DEFAULT_TABLE_DATA" + $mes->add(LAN_DEFAULT_TABLE_DATA.": rss",$status); } diff --git a/e107_plugins/rss_menu/rss_shortcodes.php b/e107_plugins/rss_menu/rss_shortcodes.php index 2ae76b8e1..88b492d3f 100644 --- a/e107_plugins/rss_menu/rss_shortcodes.php +++ b/e107_plugins/rss_menu/rss_shortcodes.php @@ -1,5 +1,14 @@ ".ADMIN_EDIT_ICON." - toJS(LAN_CONFIRMDEL ." [".RSS_LAN_ADMIN_2.": ".$delid." : ".$delname."]\\n\\n")."')\"/>"; + toJS(LAN_CONFIRMDEL ." [".LAN_ID.": ".$delid." : ".$delname."]\\n\\n")."')\"/>"; return $options; } @@ -161,7 +170,7 @@ class rss_menu_shortcodes extends e_shortcode function sc_rss_admin_form_url() { global $row,$PLUGINS_DIRECTORY; - return SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".e_LANQRY." .{".LAN_TYPE."}.{".RSS_LAN_ADMIN_12."}"; + return SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".e_LANQRY." .{".LAN_TYPE."}.{".LAN_ID."}"; } function sc_rss_admin_form_topicid()
".RSS_LAN_ADMIN_16." - ".RSS_LAN_ADMIN_3." + ".LAN_PLUGIN_FOLDER." ".LAN_NAME." - ".RSS_LAN_ADMIN_5." - ".RSS_LAN_ADMIN_12." + ".LAN_URL." + ".LAN_ID."