txmodxoops /
tdmcreate
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
| 1 | <?php |
||
| 2 | /* |
||
| 3 | You may not change or alter any portion of this comment or credits |
||
| 4 | of supporting developers from this source code or any supporting source code |
||
| 5 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
| 6 | |||
| 7 | This program is distributed in the hope that it will be useful, |
||
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
| 10 | */ |
||
| 11 | |||
| 12 | /** |
||
| 13 | * My Module module for xoops |
||
| 14 | * |
||
| 15 | * @copyright 2020 XOOPS Project (https://xooops.org) |
||
| 16 | * @license GPL 2.0 or later |
||
| 17 | * @package mymodule |
||
| 18 | * @since 1.0 |
||
| 19 | * @min_xoops 2.5.9 |
||
| 20 | * @author TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org> |
||
| 21 | */ |
||
| 22 | |||
| 23 | // |
||
| 24 | $moduleDirName = basename(__DIR__); |
||
| 25 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
||
| 26 | // ------------------- Informations ------------------- // |
||
| 27 | $modversion = [ |
||
| 28 | 'name' => _MI_MYMODULE_NAME, |
||
| 29 | 'version' => 1.0, |
||
| 30 | 'description' => _MI_MYMODULE_DESC, |
||
| 31 | 'author' => 'TDM XOOPS', |
||
| 32 | 'author_mail' => '[email protected]', |
||
| 33 | 'author_website_url' => 'http://xoops.org', |
||
| 34 | 'author_website_name' => 'XOOPS Project', |
||
| 35 | 'credits' => 'XOOPS Development Team', |
||
| 36 | 'license' => 'GPL 2.0 or later', |
||
| 37 | 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', |
||
| 38 | 'help' => 'page=help', |
||
| 39 | 'release_info' => 'release_info', |
||
| 40 | 'release_file' => XOOPS_URL . '/modules/mymodule/docs/release_info file', |
||
| 41 | 'release_date' => '2020/04/07', |
||
| 42 | 'manual' => 'link to manual file', |
||
| 43 | 'manual_file' => XOOPS_URL . '/modules/mymodule/docs/install.txt', |
||
| 44 | 'min_php' => '7.0', |
||
| 45 | 'min_xoops' => '2.5.9', |
||
| 46 | 'min_admin' => '1.2', |
||
| 47 | 'min_db' => array('mysql' => '5.6', 'mysqli' => '5.6'), |
||
| 48 | 'image' => 'assets/images/logoModule.png', |
||
| 49 | 'dirname' => basename(__DIR__), |
||
| 50 | 'dirmoduleadmin' => 'Frameworks/moduleclasses/moduleadmin', |
||
| 51 | 'sysicons16' => '../../Frameworks/moduleclasses/icons/16', |
||
| 52 | 'sysicons32' => '../../Frameworks/moduleclasses/icons/32', |
||
| 53 | 'modicons16' => 'assets/icons/16', |
||
| 54 | 'modicons32' => 'assets/icons/32', |
||
| 55 | 'demo_site_url' => 'https://xoops.org', |
||
| 56 | 'demo_site_name' => 'XOOPS Demo Site', |
||
| 57 | 'support_url' => 'https://xoops.org/modules/newbb', |
||
| 58 | 'support_name' => 'Support Forum', |
||
| 59 | 'module_website_url' => 'www.xoops.org', |
||
| 60 | 'module_website_name' => 'XOOPS Project', |
||
| 61 | 'release' => '2017-12-02', |
||
| 62 | 'module_status' => 'Beta 1', |
||
| 63 | 'system_menu' => 1, |
||
| 64 | 'hasAdmin' => 1, |
||
| 65 | 'hasMain' => 1, |
||
| 66 | 'adminindex' => 'admin/index.php', |
||
| 67 | 'adminmenu' => 'admin/menu.php', |
||
| 68 | 'onInstall' => 'include/install.php', |
||
| 69 | 'onUninstall' => 'include/uninstall.php', |
||
| 70 | 'onUpdate' => 'include/update.php', |
||
| 71 | ]; |
||
| 72 | // ------------------- Templates ------------------- // |
||
| 73 | $modversion['templates'] = [ |
||
| 74 | // Admin templates |
||
| 75 | ['file' => 'mymodule_admin_about.tpl', 'description' => '', 'type' => 'admin'], |
||
| 76 | ['file' => 'mymodule_admin_header.tpl', 'description' => '', 'type' => 'admin'], |
||
| 77 | ['file' => 'mymodule_admin_index.tpl', 'description' => '', 'type' => 'admin'], |
||
| 78 | ['file' => 'mymodule_admin_categories.tpl', 'description' => '', 'type' => 'admin'], |
||
| 79 | ['file' => 'mymodule_admin_articles.tpl', 'description' => '', 'type' => 'admin'], |
||
| 80 | ['file' => 'mymodule_admin_permissions.tpl', 'description' => '', 'type' => 'admin'], |
||
| 81 | ['file' => 'mymodule_admin_footer.tpl', 'description' => '', 'type' => 'admin'], |
||
| 82 | // User templates |
||
| 83 | ['file' => 'mymodule_header.tpl', 'description' => ''], |
||
| 84 | ['file' => 'mymodule_index.tpl', 'description' => ''], |
||
| 85 | ['file' => 'mymodule_categories.tpl', 'description' => ''], |
||
| 86 | ['file' => 'mymodule_categories_list.tpl', 'description' => ''], |
||
| 87 | ['file' => 'mymodule_articles.tpl', 'description' => ''], |
||
| 88 | ['file' => 'mymodule_articles_list.tpl', 'description' => ''], |
||
| 89 | ['file' => 'mymodule_breadcrumbs.tpl', 'description' => ''], |
||
| 90 | ['file' => 'mymodule_broken.tpl', 'description' => ''], |
||
| 91 | ['file' => 'mymodule_pdf.tpl', 'description' => ''], |
||
| 92 | ['file' => 'mymodule_print.tpl', 'description' => ''], |
||
| 93 | ['file' => 'mymodule_rate.tpl', 'description' => ''], |
||
| 94 | ['file' => 'mymodule_rss.tpl', 'description' => ''], |
||
| 95 | ['file' => 'mymodule_search.tpl', 'description' => ''], |
||
| 96 | ['file' => 'mymodule_single.tpl', 'description' => ''], |
||
| 97 | ['file' => 'mymodule_submit.tpl', 'description' => ''], |
||
| 98 | ['file' => 'mymodule_footer.tpl', 'description' => ''], |
||
| 99 | ]; |
||
| 100 | // ------------------- Mysql ------------------- // |
||
| 101 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
||
| 102 | // Tables |
||
| 103 | $modversion['tables'] = [ |
||
| 104 | 'mymodule_categories', |
||
| 105 | 'mymodule_articles', |
||
| 106 | ]; |
||
| 107 | // ------------------- Search ------------------- // |
||
| 108 | $modversion['hasSearch'] = 1; |
||
| 109 | $modversion['search'] = [ |
||
| 110 | 'file' => 'include/search.inc.php', |
||
| 111 | 'func' => 'mymodule_search', |
||
| 112 | ]; |
||
| 113 | // ------------------- Comments ------------------- // |
||
| 114 | $modversion['comments']['pageName'] = 'comments.php'; |
||
| 115 | $modversion['comments']['itemName'] = 'com_id'; |
||
| 116 | // Comment callback functions |
||
| 117 | $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; |
||
| 118 | $modversion['comments']['callback'] = [ |
||
| 119 | 'approve' => 'mymoduleCommentsApprove', |
||
| 120 | 'update' => 'mymoduleCommentsUpdate', |
||
| 121 | ]; |
||
| 122 | // ------------------- Menu ------------------- // |
||
| 123 | $currdirname = isset($GLOBALS['xoopsModule']) && is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : 'system'; |
||
| 124 | if($moduleDirName == $currdirname) { |
||
| 125 | $modversion['sub'][] = [ |
||
| 126 | 'name' => _MI_MYMODULE_SMNAME1, |
||
| 127 | 'url' => 'index.php', |
||
| 128 | ]; |
||
| 129 | // Sub articles |
||
| 130 | $modversion['sub'][] = [ |
||
| 131 | 'name' => _MI_MYMODULE_SMNAME2, |
||
| 132 | 'url' => 'articles.php', |
||
| 133 | ]; |
||
| 134 | // Sub Submit |
||
| 135 | $modversion['sub'][] = [ |
||
| 136 | 'name' => _MI_MYMODULE_SMNAME3, |
||
| 137 | 'url' => 'submit.php', |
||
| 138 | ]; |
||
| 139 | // Sub Search |
||
| 140 | $modversion['sub'][] = [ |
||
| 141 | 'name' => _MI_MYMODULE_SMNAME4, |
||
| 142 | 'url' => 'search.php', |
||
| 143 | ]; |
||
| 144 | } |
||
| 145 | // ------------------- Blocks ------------------- // |
||
| 146 | // Articles last |
||
| 147 | $modversion['blocks'][] = [ |
||
| 148 | 'file' => 'articles.php', |
||
| 149 | 'name' => _MI_MYMODULE_ARTICLES_BLOCK_LAST, |
||
| 150 | 'description' => _MI_MYMODULE_ARTICLES_BLOCK_LAST_DESC, |
||
| 151 | 'show_func' => 'b_mymodule_articles_show', |
||
| 152 | 'edit_func' => 'b_mymodule_articles_edit', |
||
| 153 | 'template' => 'mymodule_block_articles.tpl', |
||
| 154 | 'options' => 'last|5|25|0', |
||
| 155 | ]; |
||
| 156 | // Articles new |
||
| 157 | $modversion['blocks'][] = [ |
||
| 158 | 'file' => 'articles.php', |
||
| 159 | 'name' => _MI_MYMODULE_ARTICLES_BLOCK_NEW, |
||
| 160 | 'description' => _MI_MYMODULE_ARTICLES_BLOCK_NEW_DESC, |
||
| 161 | 'show_func' => 'b_mymodule_articles_show', |
||
| 162 | 'edit_func' => 'b_mymodule_articles_edit', |
||
| 163 | 'template' => 'mymodule_block_articles.tpl', |
||
| 164 | 'options' => 'new|5|25|0', |
||
| 165 | ]; |
||
| 166 | // Articles hits |
||
| 167 | $modversion['blocks'][] = [ |
||
| 168 | 'file' => 'articles.php', |
||
| 169 | 'name' => _MI_MYMODULE_ARTICLES_BLOCK_HITS, |
||
| 170 | 'description' => _MI_MYMODULE_ARTICLES_BLOCK_HITS_DESC, |
||
| 171 | 'show_func' => 'b_mymodule_articles_show', |
||
| 172 | 'edit_func' => 'b_mymodule_articles_edit', |
||
| 173 | 'template' => 'mymodule_block_articles.tpl', |
||
| 174 | 'options' => 'hits|5|25|0', |
||
| 175 | ]; |
||
| 176 | // Articles top |
||
| 177 | $modversion['blocks'][] = [ |
||
| 178 | 'file' => 'articles.php', |
||
| 179 | 'name' => _MI_MYMODULE_ARTICLES_BLOCK_TOP, |
||
| 180 | 'description' => _MI_MYMODULE_ARTICLES_BLOCK_TOP_DESC, |
||
| 181 | 'show_func' => 'b_mymodule_articles_show', |
||
| 182 | 'edit_func' => 'b_mymodule_articles_edit', |
||
| 183 | 'template' => 'mymodule_block_articles.tpl', |
||
| 184 | 'options' => 'top|5|25|0', |
||
| 185 | ]; |
||
| 186 | // Articles random |
||
| 187 | $modversion['blocks'][] = [ |
||
| 188 | 'file' => 'articles.php', |
||
| 189 | 'name' => _MI_MYMODULE_ARTICLES_BLOCK_RANDOM, |
||
| 190 | 'description' => _MI_MYMODULE_ARTICLES_BLOCK_RANDOM_DESC, |
||
| 191 | 'show_func' => 'b_mymodule_articles_show', |
||
| 192 | 'edit_func' => 'b_mymodule_articles_edit', |
||
| 193 | 'template' => 'mymodule_block_articles.tpl', |
||
| 194 | 'options' => 'random|5|25|0', |
||
| 195 | ]; |
||
| 196 | // ------------------- Config ------------------- // |
||
| 197 | // Editor descr |
||
| 198 | xoops_load('xoopseditorhandler'); |
||
| 199 | $editorHandlerDescr = XoopsEditorHandler::getInstance(); |
||
| 200 | $modversion['config'][] = [ |
||
| 201 | 'name' => 'editor_descr', |
||
| 202 | 'title' => '_MI_MYMODULE_EDITOR_DESCR', |
||
| 203 | 'description' => '_MI_MYMODULE_EDITOR_DESCR_DESC', |
||
| 204 | 'formtype' => 'select', |
||
| 205 | 'valuetype' => 'text', |
||
| 206 | 'default' => 'dhtml', |
||
| 207 | 'options' => array_flip($editorHandlerDescr->getList()), |
||
| 208 | ]; |
||
| 209 | // Get groups |
||
| 210 | $memberHandler = xoops_getHandler('member'); |
||
| 211 | $xoopsGroups = $memberHandler->getGroupList(); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 212 | foreach($xoopsGroups as $key => $group) { |
||
| 213 | $groups[$group] = $key; |
||
| 214 | } |
||
| 215 | // General access groups |
||
| 216 | $modversion['config'][] = [ |
||
| 217 | 'name' => 'groups', |
||
| 218 | 'title' => '_MI_MYMODULE_GROUPS', |
||
| 219 | 'description' => '_MI_MYMODULE_GROUPS_DESC', |
||
| 220 | 'formtype' => 'select_multi', |
||
| 221 | 'valuetype' => 'array', |
||
| 222 | 'default' => $groups, |
||
| 223 | 'options' => $groups, |
||
| 224 | ]; |
||
| 225 | // Upload groups |
||
| 226 | $modversion['config'][] = [ |
||
| 227 | 'name' => 'upload_groups', |
||
| 228 | 'title' => '_MI_MYMODULE_UPLOAD_GROUPS', |
||
| 229 | 'description' => '_MI_MYMODULE_UPLOAD_GROUPS_DESC', |
||
| 230 | 'formtype' => 'select_multi', |
||
| 231 | 'valuetype' => 'array', |
||
| 232 | 'default' => $groups, |
||
| 233 | 'options' => $groups, |
||
| 234 | ]; |
||
| 235 | // Get Admin groups |
||
| 236 | $criteria = new \CriteriaCompo(); |
||
| 237 | $criteria->add( new \Criteria( 'group_type', 'Admin' ) ); |
||
| 238 | $memberHandler = xoops_getHandler('member'); |
||
| 239 | $adminXoopsGroups = $memberHandler->getGroupList($criteria); |
||
| 240 | foreach($adminXoopsGroups as $key => $adminGroup) { |
||
| 241 | $adminGroups[$adminGroup] = $key; |
||
| 242 | } |
||
| 243 | $modversion['config'][] = [ |
||
| 244 | 'name' => 'admin_groups', |
||
| 245 | 'title' => '_MI_MYMODULE_ADMIN_GROUPS', |
||
| 246 | 'description' => '_MI_MYMODULE_ADMIN_GROUPS_DESC', |
||
| 247 | 'formtype' => 'select_multi', |
||
| 248 | 'valuetype' => 'array', |
||
| 249 | 'default' => $adminGroups, |
||
| 250 | 'options' => $adminGroups, |
||
| 251 | ]; |
||
| 252 | // Keywords |
||
| 253 | $modversion['config'][] = [ |
||
| 254 | 'name' => 'keywords', |
||
| 255 | 'title' => '_MI_MYMODULE_KEYWORDS', |
||
| 256 | 'description' => '_MI_MYMODULE_KEYWORDS_DESC', |
||
| 257 | 'formtype' => 'textbox', |
||
| 258 | 'valuetype' => 'text', |
||
| 259 | 'default' => 'mymodule, categories, articles', |
||
| 260 | ]; |
||
| 261 | // Uploads : maxsize of image |
||
| 262 | $modversion['config'][] = [ |
||
| 263 | 'name' => 'maxsize', |
||
| 264 | 'title' => '_MI_MYMODULE_MAXSIZE', |
||
| 265 | 'description' => '_MI_MYMODULE_MAXSIZE_DESC', |
||
| 266 | 'formtype' => 'textbox', |
||
| 267 | 'valuetype' => 'int', |
||
| 268 | 'default' => 5000000, |
||
| 269 | ]; |
||
| 270 | // Uploads : mimetypes of image |
||
| 271 | $modversion['config'][] = [ |
||
| 272 | 'name' => 'mimetypes', |
||
| 273 | 'title' => '_MI_MYMODULE_MIMETYPES', |
||
| 274 | 'description' => '_MI_MYMODULE_MIMETYPES_DESC', |
||
| 275 | 'formtype' => 'select_multi', |
||
| 276 | 'valuetype' => 'array', |
||
| 277 | 'default' => array('image/gif', 'image/jpeg', 'image/png'), |
||
| 278 | 'options' => array('bmp' => 'image/bmp','gif' => 'image/gif','pjpeg' => 'image/pjpeg', 'jpeg' => 'image/jpeg','jpg' => 'image/jpg','jpe' => 'image/jpe', 'png' => 'image/png'), |
||
| 279 | ]; |
||
| 280 | // Admin pager |
||
| 281 | $modversion['config'][] = [ |
||
| 282 | 'name' => 'adminpager', |
||
| 283 | 'title' => '_MI_MYMODULE_ADMIN_PAGER', |
||
| 284 | 'description' => '_MI_MYMODULE_ADMIN_PAGER_DESC', |
||
| 285 | 'formtype' => 'textbox', |
||
| 286 | 'valuetype' => 'int', |
||
| 287 | 'default' => 10, |
||
| 288 | ]; |
||
| 289 | // User pager |
||
| 290 | $modversion['config'][] = [ |
||
| 291 | 'name' => 'userpager', |
||
| 292 | 'title' => '_MI_MYMODULE_USER_PAGER', |
||
| 293 | 'description' => '_MI_MYMODULE_USER_PAGER_DESC', |
||
| 294 | 'formtype' => 'textbox', |
||
| 295 | 'valuetype' => 'int', |
||
| 296 | 'default' => 10, |
||
| 297 | ]; |
||
| 298 | // Use tag |
||
| 299 | $modversion['config'][] = [ |
||
| 300 | 'name' => 'usetag', |
||
| 301 | 'title' => '_MI_MYMODULE_USE_TAG', |
||
| 302 | 'description' => '_MI_MYMODULE_USE_TAG_DESC', |
||
| 303 | 'formtype' => 'yesno', |
||
| 304 | 'valuetype' => 'int', |
||
| 305 | 'default' => 0, |
||
| 306 | ]; |
||
| 307 | // Number column |
||
| 308 | $modversion['config'][] = [ |
||
| 309 | 'name' => 'numb_col', |
||
| 310 | 'title' => '_MI_MYMODULE_NUMB_COL', |
||
| 311 | 'description' => '_MI_MYMODULE_NUMB_COL_DESC', |
||
| 312 | 'formtype' => 'select', |
||
| 313 | 'valuetype' => 'int', |
||
| 314 | 'default' => 1, |
||
| 315 | 'options' => array(1 => '1', 2 => '2', 3 => '3', 4 => '4'), |
||
| 316 | ]; |
||
| 317 | // Divide by |
||
| 318 | $modversion['config'][] = [ |
||
| 319 | 'name' => 'divideby', |
||
| 320 | 'title' => '_MI_MYMODULE_DIVIDEBY', |
||
| 321 | 'description' => '_MI_MYMODULE_DIVIDEBY_DESC', |
||
| 322 | 'formtype' => 'select', |
||
| 323 | 'valuetype' => 'int', |
||
| 324 | 'default' => 1, |
||
| 325 | 'options' => array(1 => '1', 2 => '2', 3 => '3', 4 => '4'), |
||
| 326 | ]; |
||
| 327 | // Table type |
||
| 328 | $modversion['config'][] = [ |
||
| 329 | 'name' => 'table_type', |
||
| 330 | 'title' => '_MI_MYMODULE_TABLE_TYPE', |
||
| 331 | 'description' => '_MI_MYMODULE_DIVIDEBY_DESC', |
||
| 332 | 'formtype' => 'select', |
||
| 333 | 'valuetype' => 'int', |
||
| 334 | 'default' => 'bordered', |
||
| 335 | 'options' => array('bordered' => 'bordered', 'striped' => 'striped', 'hover' => 'hover', 'condensed' => 'condensed'), |
||
| 336 | ]; |
||
| 337 | // Panel by |
||
| 338 | $modversion['config'][] = [ |
||
| 339 | 'name' => 'panel_type', |
||
| 340 | 'title' => '_MI_MYMODULE_PANEL_TYPE', |
||
| 341 | 'description' => '_MI_MYMODULE_PANEL_TYPE_DESC', |
||
| 342 | 'formtype' => 'select', |
||
| 343 | 'valuetype' => 'text', |
||
| 344 | 'default' => 'default', |
||
| 345 | 'options' => array('default' => 'default', 'primary' => 'primary', 'success' => 'success', 'info' => 'info', 'warning' => 'warning', 'danger' => 'danger'), |
||
| 346 | ]; |
||
| 347 | // Advertise |
||
| 348 | $modversion['config'][] = [ |
||
| 349 | 'name' => 'advertise', |
||
| 350 | 'title' => '_MI_MYMODULE_ADVERTISE', |
||
| 351 | 'description' => '_MI_MYMODULE_ADVERTISE_DESC', |
||
| 352 | 'formtype' => 'textarea', |
||
| 353 | 'valuetype' => 'text', |
||
| 354 | 'default' => '', |
||
| 355 | ]; |
||
| 356 | // Bookmarks |
||
| 357 | $modversion['config'][] = [ |
||
| 358 | 'name' => 'bookmarks', |
||
| 359 | 'title' => '_MI_MYMODULE_BOOKMARKS', |
||
| 360 | 'description' => '_MI_MYMODULE_BOOKMARKS_DESC', |
||
| 361 | 'formtype' => 'yesno', |
||
| 362 | 'valuetype' => 'int', |
||
| 363 | 'default' => 0, |
||
| 364 | ]; |
||
| 365 | // Make Sample button visible? |
||
| 366 | $modversion['config'][] = [ |
||
| 367 | 'name' => 'displaySampleButton', |
||
| 368 | 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
||
| 369 | 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
||
| 370 | 'formtype' => 'yesno', |
||
| 371 | 'valuetype' => 'int', |
||
| 372 | 'default' => 1, |
||
| 373 | ]; |
||
| 374 | // Maintained by |
||
| 375 | $modversion['config'][] = [ |
||
| 376 | 'name' => 'maintainedby', |
||
| 377 | 'title' => '_MI_MYMODULE_MAINTAINEDBY', |
||
| 378 | 'description' => '_MI_MYMODULE_MAINTAINEDBY_DESC', |
||
| 379 | 'formtype' => 'textbox', |
||
| 380 | 'valuetype' => 'text', |
||
| 381 | 'default' => 'https://xoops.org/modules/newbb', |
||
| 382 | ]; |
||
| 383 | // ------------------- Notifications ------------------- // |
||
| 384 | $modversion['hasNotification'] = 1; |
||
| 385 | $modversion['notification'] = [ |
||
| 386 | 'lookup_file' => 'include/notification.inc.php', |
||
| 387 | 'lookup_func' => 'mymodule_notify_iteminfo', |
||
| 388 | ]; |
||
| 389 | // Global Notify |
||
| 390 | $modversion['notification']['category'][1] = [ |
||
| 391 | 'name' => 'global', |
||
| 392 | 'title' => _MI_MYMODULE_GLOBAL_NOTIFY, |
||
| 393 | 'description' => _MI_MYMODULE_GLOBAL_NOTIFY_DESC, |
||
| 394 | 'subscribe_from' => array('index.php', 'articles.php'), |
||
| 395 | ]; |
||
| 396 | // Category Notify |
||
| 397 | $modversion['notification']['category'][2] = [ |
||
| 398 | 'name' => 'category', |
||
| 399 | 'title' => _MI_MYMODULE_CATEGORY_NOTIFY, |
||
| 400 | 'description' => _MI_MYMODULE_CATEGORY_NOTIFY_DESC, |
||
| 401 | 'subscribe_from' => array('articles.php'), |
||
| 402 | 'item_name' => 'art_cat', |
||
| 403 | 'allow_bookmark' => 1, |
||
| 404 | ]; |
||
| 405 | // Article Notify |
||
| 406 | $modversion['notification']['category'][3] = [ |
||
| 407 | 'name' => 'article', |
||
| 408 | 'title' => _MI_MYMODULE_ARTICLE_NOTIFY, |
||
| 409 | 'description' => _MI_MYMODULE_ARTICLE_NOTIFY_DESC, |
||
| 410 | 'subscribe_from' => 'articles.php', |
||
| 411 | 'item_name' => 'art_id', |
||
| 412 | 'allow_bookmark' => 1, |
||
| 413 | ]; |
||
| 414 | // GLOBAL_NEW_CATEGORY Notify |
||
| 415 | $modversion['notification']['event'][1] = [ |
||
| 416 | 'name' => 'new_category', |
||
| 417 | 'category' => 'global', |
||
| 418 | 'admin_only' => 0, |
||
| 419 | 'title' => _MI_MYMODULE_GLOBAL_NEW_CATEGORY_NOTIFY, |
||
| 420 | 'caption' => _MI_MYMODULE_GLOBAL_NEW_CATEGORY_NOTIFY_CAPTION, |
||
| 421 | 'description' => _MI_MYMODULE_GLOBAL_NEW_CATEGORY_NOTIFY_DESC, |
||
| 422 | 'mail_template' => 'global_newcategory_notify', |
||
| 423 | 'mail_subject' => _MI_MYMODULE_GLOBAL_NEW_CATEGORY_NOTIFY_SUBJECT, |
||
| 424 | ]; |
||
| 425 | // GLOBAL_MODIFY Notify |
||
| 426 | $modversion['notification']['event'][2] = [ |
||
| 427 | 'name' => 'modify', |
||
| 428 | 'category' => 'global', |
||
| 429 | 'admin_only' => 1, |
||
| 430 | 'title' => _MI_MYMODULE_GLOBAL_MODIFY_NOTIFY, |
||
| 431 | 'caption' => _MI_MYMODULE_GLOBAL_MODIFY_NOTIFY_CAPTION, |
||
| 432 | 'description' => _MI_MYMODULE_GLOBAL_MODIFY_NOTIFY_DESC, |
||
| 433 | 'mail_template' => 'global_modify_notify', |
||
| 434 | 'mail_subject' => _MI_MYMODULE_GLOBAL_MODIFY_NOTIFY_SUBJECT, |
||
| 435 | ]; |
||
| 436 | // GLOBAL_BROKEN Notify |
||
| 437 | $modversion['notification']['event'][3] = [ |
||
| 438 | 'name' => 'broken', |
||
| 439 | 'category' => 'global', |
||
| 440 | 'admin_only' => 1, |
||
| 441 | 'title' => _MI_MYMODULE_GLOBAL_BROKEN_NOTIFY, |
||
| 442 | 'caption' => _MI_MYMODULE_GLOBAL_BROKEN_NOTIFY_CAPTION, |
||
| 443 | 'description' => _MI_MYMODULE_GLOBAL_BROKEN_NOTIFY_DESC, |
||
| 444 | 'mail_template' => 'global_broken_notify', |
||
| 445 | 'mail_subject' => _MI_MYMODULE_GLOBAL_BROKEN_NOTIFY_SUBJECT, |
||
| 446 | ]; |
||
| 447 | // GLOBAL_SUBMIT Notify |
||
| 448 | $modversion['notification']['event'][4] = [ |
||
| 449 | 'name' => 'submit', |
||
| 450 | 'category' => 'global', |
||
| 451 | 'admin_only' => 1, |
||
| 452 | 'title' => _MI_MYMODULE_GLOBAL_SUBMIT_NOTIFY, |
||
| 453 | 'caption' => _MI_MYMODULE_GLOBAL_SUBMIT_NOTIFY_CAPTION, |
||
| 454 | 'description' => _MI_MYMODULE_GLOBAL_SUBMIT_NOTIFY_DESC, |
||
| 455 | 'mail_template' => 'global_submit_notify', |
||
| 456 | 'mail_subject' => _MI_MYMODULE_GLOBAL_SUBMIT_NOTIFY_SUBJECT, |
||
| 457 | ]; |
||
| 458 | // GLOBAL_NEW Notify |
||
| 459 | $modversion['notification']['event'][5] = [ |
||
| 460 | 'name' => 'new_article', |
||
| 461 | 'category' => 'global', |
||
| 462 | 'admin_only' => 0, |
||
| 463 | 'title' => _MI_MYMODULE_GLOBAL_NEW_NOTIFY, |
||
| 464 | 'caption' => _MI_MYMODULE_GLOBAL_NEW_NOTIFY_CAPTION, |
||
| 465 | 'description' => _MI_MYMODULE_GLOBAL_NEW_NOTIFY_DESC, |
||
| 466 | 'mail_template' => 'global_newarticle_notify', |
||
| 467 | 'mail_subject' => _MI_MYMODULE_GLOBAL_NEW_NOTIFY_SUBJECT, |
||
| 468 | ]; |
||
| 469 | // CATEGORY_SUBMIT Notify |
||
| 470 | $modversion['notification']['event'][6] = [ |
||
| 471 | 'name' => 'submit', |
||
| 472 | 'category' => 'category', |
||
| 473 | 'admin_only' => 1, |
||
| 474 | 'title' => _MI_MYMODULE_CATEGORY_SUBMIT_NOTIFY, |
||
| 475 | 'caption' => _MI_MYMODULE_CATEGORY_SUBMIT_NOTIFY_CAPTION, |
||
| 476 | 'description' => _MI_MYMODULE_CATEGORY_SUBMIT_NOTIFY_DESC, |
||
| 477 | 'mail_template' => 'category_articlesubmit_notify', |
||
| 478 | 'mail_subject' => _MI_MYMODULE_CATEGORY_SUBMIT_NOTIFY_SUBJECT, |
||
| 479 | ]; |
||
| 480 | // CATEGORY Notify |
||
| 481 | $modversion['notification']['event'][7] = [ |
||
| 482 | 'name' => 'new_category', |
||
| 483 | 'category' => 'category', |
||
| 484 | 'admin_only' => 0, |
||
| 485 | 'title' => _MI_MYMODULE_CATEGORY_NOTIFY, |
||
| 486 | 'caption' => _MI_MYMODULE_CATEGORY_NOTIFY_CAPTION, |
||
| 487 | 'description' => _MI_MYMODULE_CATEGORY_NOTIFY_DESC, |
||
| 488 | 'mail_template' => 'category_newarticle_notify', |
||
| 489 | 'mail_subject' => _MI_MYMODULE_CATEGORY_NOTIFY_SUBJECT, |
||
| 490 | ]; |
||
| 491 | // ARTICLE Notify |
||
| 492 | $modversion['notification']['event'][8] = [ |
||
| 493 | 'name' => 'approve', |
||
| 494 | 'category' => 'article', |
||
| 495 | 'admin_only' => 1, |
||
| 496 | 'title' => _MI_MYMODULE_ARTICLE_NOTIFY, |
||
| 497 | 'caption' => _MI_MYMODULE_ARTICLE_NOTIFY_CAPTION, |
||
| 498 | 'description' => _MI_MYMODULE_ARTICLE_NOTIFY_DESC, |
||
| 499 | 'mail_template' => 'article_approve_notify', |
||
| 500 | 'mail_subject' => _MI_MYMODULE_ARTICLE_NOTIFY_SUBJECT, |
||
| 501 | ]; |
||
| 502 |