From 2b16251e6ff5ad6b7d2db3ff3c3a26847497191d Mon Sep 17 00:00:00 2001 From: mambax7 Date: Mon, 7 May 2018 23:46:18 -0400 Subject: [PATCH] notifications, responsive image --- admin/file.php | 1 + admin/index.php | 1 + admin/item.php | 1 + admin/menu.php | 1 + admin/permissions.php | 1 + admin/preferences.php | 3 ++- admin/pw_upload_file.php | 1 + assets/css/publisher.css | 6 ++++++ backend.php | 1 + blocks/category_items_sel.php | 1 + blocks/date_to_date.php | 1 + blocks/items_columns.php | 1 + blocks/items_menu.php | 1 + blocks/items_new.php | 1 + blocks/items_random_item.php | 1 + blocks/items_recent.php | 1 + blocks/items_spot.php | 4 +++- blocks/latest_files.php | 1 + blocks/latest_news.php | 1 + blocks/search.php | 3 ++- class/Helper.php | 2 +- class/Seo.php | 1 + comment_new.php | 4 ++++ docs/changelog.txt | 6 ++++++ file.php | 2 +- footer.php | 4 ++++ header.php | 5 +++++ include/ajax_rating.php | 1 + include/comment_functions.php | 4 ++-- include/common.php | 6 +++--- include/notification.inc.php | 9 ++++++--- index.php | 3 ++- item.php | 12 +++++------- language/english/common.php | 9 +++++++++ makepdf.php | 1 - templates/publisher_footer.tpl | 10 +++++++--- templates/publisher_item.tpl | 12 +++++++----- xoops_version.php | 27 ++++++++++++++------------- 38 files changed, 107 insertions(+), 43 deletions(-) diff --git a/admin/file.php b/admin/file.php index e4b32f3c..92573519 100644 --- a/admin/file.php +++ b/admin/file.php @@ -32,6 +32,7 @@ */ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); diff --git a/admin/index.php b/admin/index.php index b46b4e0d..5a6b81f7 100644 --- a/admin/index.php +++ b/admin/index.php @@ -26,6 +26,7 @@ //require_once dirname(__DIR__) . '/class/Utility.php'; xoops_cp_header(); +/** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $helper->loadLanguage('main'); $adminObject = \Xmf\Module\Admin::getInstance(); diff --git a/admin/item.php b/admin/item.php index 340e38da..4162e003 100644 --- a/admin/item.php +++ b/admin/item.php @@ -393,6 +393,7 @@ */ function publisher_editItem($showmenu = false, $itemid = 0, $clone = false) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); global $publisherCurrentPage; diff --git a/admin/menu.php b/admin/menu.php index c47c688a..22b87cf5 100644 --- a/admin/menu.php +++ b/admin/menu.php @@ -25,6 +25,7 @@ $moduleDirName = basename(dirname(__DIR__)); +/** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); // get path to icons diff --git a/admin/permissions.php b/admin/permissions.php index 9d8d6209..5d090faa 100644 --- a/admin/permissions.php +++ b/admin/permissions.php @@ -28,6 +28,7 @@ Publisher\Utility::cpHeader(); //publisher_adminMenu(3, _AM_PUBLISHER_PERMISSIONS); +/** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); // View Categories permissions diff --git a/admin/preferences.php b/admin/preferences.php index 9a87c1f8..9025e603 100644 --- a/admin/preferences.php +++ b/admin/preferences.php @@ -23,7 +23,8 @@ require_once __DIR__ . '/admin_header.php'; -$helper = Publisher\Helper::getInstance(); +/** @var Publisher\Helper $helper */ +$helper = Publisher\Helper::getInstance(); $module = $helper->getModule(); $modId = $module->mid(); diff --git a/admin/pw_upload_file.php b/admin/pw_upload_file.php index 6a2f427f..84690b68 100644 --- a/admin/pw_upload_file.php +++ b/admin/pw_upload_file.php @@ -43,6 +43,7 @@ function publisher_pagewrap_upload(&$errors) // require_once PUBLISHER_ROOT_PATH . '/class/uploader.php'; xoops_load('XoopsMediaUploader'); + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $postField = 'fileupload'; diff --git a/assets/css/publisher.css b/assets/css/publisher.css index 5ba52622..d331dff8 100644 --- a/assets/css/publisher.css +++ b/assets/css/publisher.css @@ -919,3 +919,9 @@ display: block; } .btn{border-radius: 4px;} +.image img, .imagesp img, .images img, .imagess img, .illustration img, .illustrationy img { + max-width: 575px; +} +.wrap img, .wrap1 img { + max-width: 525px; +} diff --git a/backend.php b/backend.php index a05cc712..bfe42a2a 100644 --- a/backend.php +++ b/backend.php @@ -20,6 +20,7 @@ */ use Xmf\Request; +use XoopsModules\Publisher; require_once __DIR__ . '/header.php'; //xoops_load('XoopsLocal'); //mb diff --git a/blocks/category_items_sel.php b/blocks/category_items_sel.php index e16f6081..7941d478 100644 --- a/blocks/category_items_sel.php +++ b/blocks/category_items_sel.php @@ -32,6 +32,7 @@ */ function publisher_category_items_sel_show($options) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $block = $item = []; diff --git a/blocks/date_to_date.php b/blocks/date_to_date.php index 2936e0d0..78691568 100644 --- a/blocks/date_to_date.php +++ b/blocks/date_to_date.php @@ -33,6 +33,7 @@ function publisher_date_to_date_show($options) { $myts = \MyTextSanitizer::getInstance(); + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $block = $newItems = []; diff --git a/blocks/items_columns.php b/blocks/items_columns.php index 5b618c1d..3f2fb907 100644 --- a/blocks/items_columns.php +++ b/blocks/items_columns.php @@ -35,6 +35,7 @@ function publisher_items_columns_show($options) { // global $xoTheme; + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); //Column Settings diff --git a/blocks/items_menu.php b/blocks/items_menu.php index eaf6389b..6d45108b 100644 --- a/blocks/items_menu.php +++ b/blocks/items_menu.php @@ -35,6 +35,7 @@ function publisher_items_menu_show($options) { $block = []; + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); // Getting all top cats diff --git a/blocks/items_new.php b/blocks/items_new.php index 735fc53f..77c9b2a4 100644 --- a/blocks/items_new.php +++ b/blocks/items_new.php @@ -33,6 +33,7 @@ */ function publisher_items_new_show($options) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $selectedcatids = explode(',', $options[0]); diff --git a/blocks/items_random_item.php b/blocks/items_random_item.php index 901d9b30..d276f360 100644 --- a/blocks/items_random_item.php +++ b/blocks/items_random_item.php @@ -34,6 +34,7 @@ function publisher_items_random_item_show($options) { $block = []; + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); // creating the ITEM object $itemsObj = $helper->getHandler('Item')->getRandomItem('', [Constants::PUBLISHER_STATUS_PUBLISHED]); diff --git a/blocks/items_recent.php b/blocks/items_recent.php index 3aac158b..37813143 100644 --- a/blocks/items_recent.php +++ b/blocks/items_recent.php @@ -33,6 +33,7 @@ */ function publisher_items_recent_show($options) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $myts = \MyTextSanitizer::getInstance(); diff --git a/blocks/items_spot.php b/blocks/items_spot.php index a2ec0348..ed75d041 100644 --- a/blocks/items_spot.php +++ b/blocks/items_spot.php @@ -32,7 +32,8 @@ function publisher_items_spot_show($options) { // global $xoTheme; - $helper = Publisher\Helper::getInstance(); + /** @var Publisher\Helper $helper */ + $helper = Publisher\Helper::getInstance(); $optDisplayLast = $options[0]; $optItemsCount = $options[1]; $optCategoryId = $options[2]; @@ -127,6 +128,7 @@ function publisher_items_spot_edit($options) $autoEle = new \XoopsFormRadioYN(_MB_PUBLISHER_AUTO_LAST_ITEMS, 'options[0]', $options[0]); $countEle = new \XoopsFormText(_MB_PUBLISHER_LAST_ITEMS_COUNT, 'options[1]', 2, 255, $options[1]); $catEle = new \XoopsFormLabel(_MB_PUBLISHER_SELECTCAT, Publisher\Utility::createCategorySelect($options[2], 0, true, 'options[2]')); + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $criteria = new \CriteriaCompo(); $criteria->setSort('datesub'); diff --git a/blocks/latest_files.php b/blocks/latest_files.php index 474b11ce..7fa0a6c7 100644 --- a/blocks/latest_files.php +++ b/blocks/latest_files.php @@ -33,6 +33,7 @@ */ function publisher_latest_files_show($options) { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); /** diff --git a/blocks/latest_news.php b/blocks/latest_news.php index 54f0cc04..85f87f54 100644 --- a/blocks/latest_news.php +++ b/blocks/latest_news.php @@ -36,6 +36,7 @@ function publisher_latest_news_show($options) { $block = []; + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); $helper->loadLanguage('main'); // xoops_loadLanguage('main', 'publisher'); diff --git a/blocks/search.php b/blocks/search.php index 365dae39..379f4902 100644 --- a/blocks/search.php +++ b/blocks/search.php @@ -34,7 +34,8 @@ function publisher_search_show($options) { $block = []; - $helper = Publisher\Helper::getInstance(); + /** @var Publisher\Helper $helper */ + $helper = Publisher\Helper::getInstance(); $categories = $helper->getHandler('Category')->getCategoriesForSearch(); if (0 == count($categories)) { return $block; diff --git a/class/Helper.php b/class/Helper.php index 1cad4765..8356b6f8 100644 --- a/class/Helper.php +++ b/class/Helper.php @@ -36,7 +36,7 @@ class Helper extends \Xmf\Module\Helper * @internal param $debug * @param bool $debug */ - protected function __construct($debug = false) + public function __construct($debug = false) { $this->debug = $debug; $moduleDirName = basename(dirname(__DIR__)); diff --git a/class/Seo.php b/class/Seo.php index c58b207d..b4e2197d 100644 --- a/class/Seo.php +++ b/class/Seo.php @@ -112,6 +112,7 @@ public static function getTitle($title = '', $withExt = true) */ public static function generateUrl($op, $id, $shortUrl = '') { + /** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); if ('none' !== $helper->getConfig('seo_url_rewrite')) { if (!empty($shortUrl)) { diff --git a/comment_new.php b/comment_new.php index 052d1c1e..2c1f69ba 100644 --- a/comment_new.php +++ b/comment_new.php @@ -19,10 +19,14 @@ */ use Xmf\Request; +use XoopsModules\Publisher; require_once dirname(dirname(__DIR__)) . '/mainfile.php'; require_once __DIR__ . '/include/common.php'; +/** @var Publisher\Helper $helper */ +$helper = Publisher\Helper::getInstance(); + $com_itemid = Request::getInt('com_itemid', 0, 'GET'); if ($com_itemid > 0) { $itemObj = $helper->getHandler('Item')->get($com_itemid); diff --git a/docs/changelog.txt b/docs/changelog.txt index d9154da3..7f948809 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,3 +1,9 @@ +
1.06 Beta 4 [2018-05-07]
Dev: Xoops 2.5.9, PHP 7.2.5 +
+- fixed notifications bug (mamba) +- added responsive image (mamba) + +
1.06 Beta 3 [2018-03-15]
Dev: Xoops 2.5.9, PHP 7.2.3
- added Constants (mamba) diff --git a/file.php b/file.php index 0d5f3b6e..44a75fde 100644 --- a/file.php +++ b/file.php @@ -22,7 +22,7 @@ use XoopsModules\Publisher; require_once __DIR__ . '/header.php'; -$helper = Publisher\Helper::getInstance(); + $helper->loadLanguage('admin'); //xoops_loadLanguage('admin', PUBLISHER_DIRNAME); diff --git a/footer.php b/footer.php index ac0417fb..f5b83b5b 100644 --- a/footer.php +++ b/footer.php @@ -19,10 +19,14 @@ * @author The SmartFactory */ +use XoopsModules\Publisher; + // defined('XOOPS_ROOT_PATH') || die('Restricted access'); require_once __DIR__ . '/include/common.php'; +/** @var Publisher\Helper $helper */ +$helper = Publisher\Helper::getInstance(); $xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/publisher.css'); //$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.style.css'); diff --git a/header.php b/header.php index 4f45dcf7..bb038dc3 100644 --- a/header.php +++ b/header.php @@ -18,11 +18,16 @@ * @author trabis */ +use XoopsModules\Publisher; + require_once dirname(dirname(__DIR__)) . '/mainfile.php'; require_once __DIR__ . '/include/common.php'; $myts = \MyTextSanitizer::getInstance(); +/** @var Publisher\Helper $helper */ +$helper = Publisher\Helper::getInstance(); + if ('none' !== $helper->getConfig('seo_url_rewrite')) { require_once PUBLISHER_ROOT_PATH . '/include/seo.inc.php'; } diff --git a/include/ajax_rating.php b/include/ajax_rating.php index 6addd3df..116bc90f 100644 --- a/include/ajax_rating.php +++ b/include/ajax_rating.php @@ -21,6 +21,7 @@ use XoopsModules\Publisher; require_once dirname(__DIR__) . '/header.php'; +/** @var Publisher\Helper $helper */ $helper = Publisher\Helper::getInstance(); error_reporting(0); diff --git a/include/comment_functions.php b/include/comment_functions.php index 4e223d82..e16eeec8 100644 --- a/include/comment_functions.php +++ b/include/comment_functions.php @@ -23,9 +23,9 @@ function publisher_com_update($itemId, $totalNum) { - global $module; + global $xoopsModule; $db = \XoopsDatabaseFactory::getDatabaseConnection(); - $sql = 'UPDATE ' . $db->prefix($module->getVar('dirname', 'n') . '_items') . ' SET comments = ' . $totalNum . ' WHERE itemid = ' . $itemId; + $sql = 'UPDATE ' . $db->prefix($xoopsModule->getVar('dirname', 'n') . '_items') . ' SET comments = ' . $totalNum . ' WHERE itemid = ' . $itemId; $db->query($sql); } diff --git a/include/common.php b/include/common.php index 1088561d..21d15a48 100644 --- a/include/common.php +++ b/include/common.php @@ -55,9 +55,9 @@ define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName); define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName); define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName); - define($moduleDirNameUpper . '_IMAGES_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/'); - define($moduleDirNameUpper . '_IMAGES_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images/'); - define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); + define($moduleDirNameUpper . '_IMAGES_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images'); + define($moduleDirNameUpper . '_IMAGES_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images'); + define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin'); define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); diff --git a/include/notification.inc.php b/include/notification.inc.php index b3019f0c..8da52cec 100644 --- a/include/notification.inc.php +++ b/include/notification.inc.php @@ -40,10 +40,13 @@ function publisher_notify_iteminfo($category, $itemId) return $item; } - global $module; + global $xoopsModule; + /** @var Publisher\Helper $helper */ + $helper = Publisher\Helper::getInstance(); + if ('category' === $category) { // Assume we have a valid category id - $sql = 'SELECT name, short_url FROM ' . $GLOBALS['xoopsDB']->prefix($module->getVar('dirname', 'n') . '_categories') . ' WHERE categoryid = ' . $itemId; + $sql = 'SELECT name, short_url FROM ' . $GLOBALS['xoopsDB']->prefix($helper->getDirname() . '_categories') . ' WHERE categoryid = ' . $itemId; $result = $GLOBALS['xoopsDB']->query($sql); // TODO: error check $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); $item['name'] = $resultArray['name']; @@ -54,7 +57,7 @@ function publisher_notify_iteminfo($category, $itemId) if ('item' === $category) { // Assume we have a valid story id - $sql = 'SELECT title, short_url FROM ' . $GLOBALS['xoopsDB']->prefix($module->getVar('dirname', 'n') . '_items') . ' WHERE itemid = ' . $itemId; + $sql = 'SELECT title, short_url FROM ' . $GLOBALS['xoopsDB']->prefix($helper->getDirname() . '_items') . ' WHERE itemid = ' . $itemId; $result = $GLOBALS['xoopsDB']->query($sql); // TODO: error check $resultArray = $GLOBALS['xoopsDB']->fetchArray($result); $item['name'] = $resultArray['title']; diff --git a/index.php b/index.php index 52521d86..be89912f 100644 --- a/index.php +++ b/index.php @@ -75,7 +75,8 @@ // Hide sub categories in main page only - hacked by Mowaffak if ('nomain' === $helper->getConfig('idxcat_show_subcats')) { - $helper->setConfig('idxcat_show_subcats', 'no'); +// $GLOBALS['xoopsModuleConfig']->setConfig('idxcat_show_subcats', 'no'); + $GLOBALS['xoopsModuleConfig']['idxcat_show_subcats'] = 'no'; } $categories = []; diff --git a/item.php b/item.php index 9233dfac..22dcc193 100644 --- a/item.php +++ b/item.php @@ -32,6 +32,9 @@ // exit(); } +/** @var Publisher\Helper $helper */ +$helper = Publisher\Helper::getInstance(); + // Creating the item object for the selected item $itemObj = $helper->getHandler('Item')->get($itemId); @@ -52,6 +55,7 @@ //$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/jquery.popeye.style.css'); //$xoTheme->addStylesheet(PUBLISHER_URL . '/assets/css/publisher.css'); + require_once PUBLISHER_ROOT_PATH . '/footer.php'; // Creating the category object that holds the selected item @@ -259,10 +263,4 @@ } $xoopsTpl->assign('item', $item); -require_once $GLOBALS['xoops']->path('footer.php'); -?> - - - - - +require_once XOOPS_ROOT_PATH . '/footer.php'; diff --git a/language/english/common.php b/language/english/common.php index 6a7a13d6..870f5f97 100644 --- a/language/english/common.php +++ b/language/english/common.php @@ -163,3 +163,12 @@ define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer'); define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License'); define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support'); + + +//Sample Data +define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA', 'Add Sample Data (will delete ALL current data)'); +define('CO_' . $moduleDirNameUpper . '_' . 'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully'); +define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML'); +define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?'); +define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.'); + diff --git a/makepdf.php b/makepdf.php index 987f3702..f1232246 100644 --- a/makepdf.php +++ b/makepdf.php @@ -11,7 +11,6 @@ error_reporting(E_ALL); require_once __DIR__ . '/header.php'; -$helper = Publisher\Helper::getInstance(); $itemid = Request::getInt('itemid', 0, 'GET'); $item_page_id = Request::getInt('page', -1, 'GET'); diff --git a/templates/publisher_footer.tpl b/templates/publisher_footer.tpl index dc82cc4d..af90a499 100644 --- a/templates/publisher_footer.tpl +++ b/templates/publisher_footer.tpl @@ -1,5 +1,6 @@ <{if $isAdmin == 1}> - <{/if}> + +<{/if}> <{if ($commentatarticlelevel && $item.cancomment) || $com_rule != 0}> @@ -12,9 +13,12 @@ -
<{/if}> + +<{/if}> <{if $rssfeed_link != ""}> -
<{$rssfeed_link}>
<{/if}> +
<{$rssfeed_link}>
+<{/if}> <{include file='db:system_notification_select.tpl'}> + diff --git a/templates/publisher_item.tpl b/templates/publisher_item.tpl index 7aaf4e10..945ad6fa 100644 --- a/templates/publisher_item.tpl +++ b/templates/publisher_item.tpl @@ -190,17 +190,19 @@ <{/foreach}> <{/if}> - <{if $rating_enabled}> - <{$item.ratingbar}><{/if}> - <{include file='db:publisher_footer.tpl'}> +<{if $rating_enabled}> + <{$item.ratingbar}> +<{/if}> +<{include file='db:publisher_footer.tpl'}> + diff --git a/xoops_version.php b/xoops_version.php index 853a31e8..613a699b 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -34,8 +34,8 @@ $modversion = [ 'version' => '1.06', - 'module_status' => 'Beta 2', - 'release_date' => '2018/03/14', + 'module_status' => 'Beta 4', + 'release_date' => '2018/05/07', 'name' => _MI_PUBLISHER_MD_NAME, 'description' => _MI_PUBLISHER_MD_DESC, 'author' => 'Trabis (www.Xuups.com)', @@ -122,7 +122,8 @@ $modversion['search']['file'] = 'include/search.inc.php'; $modversion['search']['func'] = 'publisher_search'; -if (is_object($GLOBALS['xoopsModule']) && $GLOBALS['xoopsModule']->getVar('dirname') == $modversion['dirname']) { +global $xoopsModule; +if (is_object($xoopsModule) && $xoopsModule->dirname() == $modversion['dirname'] && $xoopsModule->isactive()) { $isAdmin = false; if (is_object($GLOBALS['xoopsUser'])) { $isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->getVar('mid')); @@ -1301,17 +1302,17 @@ $modversion['notification']['lookup_func'] = 'publisher_notify_iteminfo'; $modversion['notification']['category'][] = [ - 'name' => 'global_item', + 'name' => 'global', 'title' => _MI_PUBLISHER_GLOBAL_ITEM_NOTIFY, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_NOTIFY_DSC, - 'subscribe_from' => "array('index.php', 'category.php', 'item.php')" + 'subscribe_from' => ['index.php', 'category.php', 'item.php'] ]; $modversion['notification']['category'][] = [ - 'name' => 'category_item', + 'name' => 'category', 'title' => _MI_PUBLISHER_CATEGORY_ITEM_NOTIFY, 'description' => _MI_PUBLISHER_CATEGORY_ITEM_NOTIFY_DSC, - 'subscribe_from' => "array('index.php', 'category.php', 'item.php')", + 'subscribe_from' => ['index.php', 'category.php', 'item.php'], 'item_name' => 'categoryid', 'allow_bookmark' => 1 ]; @@ -1319,14 +1320,14 @@ 'name' => 'item', 'title' => _MI_PUBLISHER_ITEM_NOTIFY, 'description' => _MI_PUBLISHER_ITEM_NOTIFY_DSC, - 'subscribe_from' => "array('item.php')", + 'subscribe_from' => ['item.php'], 'item_name' => 'itemid', 'allow_bookmark' => 1 ]; $modversion['notification']['event'][] = [ 'name' => 'category_created', - 'category' => 'global_item', + 'category' => 'global', 'title' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY, 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_CATEGORY_CREATED_NOTIFY_DSC, @@ -1335,7 +1336,7 @@ ]; $modversion['notification']['event'][] = [ 'name' => 'submitted', - 'category' => 'global_item', + 'category' => 'global', 'admin_only' => 1, 'title' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY, 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_SUBMITTED_NOTIFY_CAP, @@ -1345,7 +1346,7 @@ ]; $modversion['notification']['event'][] = [ 'name' => 'published', - 'category' => 'global_item', + 'category' => 'global', 'title' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY, 'caption' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_GLOBAL_ITEM_PUBLISHED_NOTIFY_DSC, @@ -1354,7 +1355,7 @@ ]; $modversion['notification']['event'][] = [ 'name' => 'submitted', - 'category' => 'category_item', + 'category' => 'category', 'admin_only' => 1, 'title' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY, 'caption' => _MI_PUBLISHER_CATEGORY_ITEM_SUBMITTED_NOTIFY_CAP, @@ -1364,7 +1365,7 @@ ]; $modversion['notification']['event'][] = [ 'name' => 'published', - 'category' => 'category_item', + 'category' => 'category', 'title' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY, 'caption' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_CAP, 'description' => _MI_PUBLISHER_CATEGORY_ITEM_PUBLISHED_NOTIFY_DSC,