XoopsModules25x /
news
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | // |
||
| 3 | // ------------------------------------------------------------------------ // |
||
| 4 | // XOOPS - PHP Content Management System // |
||
| 5 | // Copyright (c) 2000-2016 XOOPS.org // |
||
| 6 | // <http://xoops.org/> // |
||
| 7 | // ------------------------------------------------------------------------ // |
||
| 8 | // This program is free software; you can redistribute it and/or modify // |
||
| 9 | // it under the terms of the GNU General Public License as published by // |
||
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
||
| 11 | // (at your option) any later version. // |
||
| 12 | // // |
||
| 13 | // You may not change or alter any portion of this comment or credits // |
||
| 14 | // of supporting developers from this source code or any supporting // |
||
| 15 | // source code which is considered copyrighted (c) material of the // |
||
| 16 | // original comment or credit authors. // |
||
| 17 | // // |
||
| 18 | // This program is distributed in the hope that it will be useful, // |
||
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
||
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
||
| 21 | // GNU General Public License for more details. // |
||
| 22 | // // |
||
| 23 | // You should have received a copy of the GNU General Public License // |
||
| 24 | // along with this program; if not, write to the Free Software // |
||
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
||
| 26 | // ------------------------------------------------------------------------ // |
||
| 27 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
||
| 28 | $moduleDirName = basename(__DIR__); |
||
| 29 | |||
| 30 | $modversion['name'] = _MI_NEWS_NAME; |
||
| 31 | $modversion['version'] = 1.71; |
||
| 32 | $modversion['description'] = _MI_NEWS_DESC; |
||
| 33 | $modversion['credits'] = 'XOOPS Project, Christian, Pilou, Marco, <br />ALL the members of the Newbb Team, GIJOE, Zoullou, Mithrandir, <br />Setec Astronomy, Marcan, 5vision, Anne, Trabis, dhsoft, Mamba, Mage, Timgno'; |
||
| 34 | $modversion['author'] = 'XOOPS Project Module Dev Team & Hervé Thouzard'; |
||
| 35 | $modversion['nickname'] = 'hervet'; |
||
| 36 | $modversion['help'] = 'page=help'; |
||
| 37 | $modversion['license'] = 'GNU General Public License'; |
||
| 38 | $modversion['license_url'] = 'http://www.gnu.org/licenses/gpl.html'; |
||
| 39 | $modversion['official'] = 0; //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported |
||
| 40 | $modversion['image'] = 'assets/images/logo_module.png'; |
||
| 41 | $modversion['dirname'] = $moduleDirName; |
||
| 42 | $modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; |
||
| 43 | $modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; |
||
| 44 | $modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; |
||
| 45 | $modversion['onInstall'] = 'include/install_function.php'; |
||
| 46 | $modversion['onUpdate'] = 'include/update_function.php'; |
||
| 47 | |||
| 48 | //about |
||
| 49 | $modversion['module_status'] = 'Beta 2'; |
||
| 50 | $modversion['release_date'] = '2016/04/02'; |
||
| 51 | $modversion['module_website_url'] = 'www.xoops.org/'; |
||
| 52 | $modversion['module_website_name'] = 'XOOPS'; |
||
| 53 | $modversion['author_website_url'] = 'http://xoops.org/'; |
||
| 54 | $modversion['author_website_name'] = 'XOOPS'; |
||
| 55 | $modversion['min_php'] = '5.5'; |
||
| 56 | $modversion['min_xoops'] = '2.5.8'; |
||
| 57 | $modversion['min_admin'] = '1.1'; |
||
| 58 | $modversion['min_db'] = array('mysql' => '5.0.7', 'mysqli' => '5.0.7'); |
||
| 59 | |||
| 60 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
||
| 61 | |||
| 62 | // Tables created by sql file (without prefix!) |
||
| 63 | $modversion['tables'][0] = 'news_stories'; |
||
| 64 | $modversion['tables'][1] = 'news_topics'; |
||
| 65 | $modversion['tables'][2] = 'news_stories_files'; |
||
| 66 | $modversion['tables'][3] = 'news_stories_votedata'; |
||
| 67 | |||
| 68 | // Scripts to run upon installation or update |
||
|
0 ignored issues
–
show
|
|||
| 69 | //$modversion['onInstall']['file'] = "include/install_function.php"; |
||
| 70 | //$modversion['onInstall']['func'] = "xoops_module_install_news"; |
||
| 71 | //$modversion['onUpdate'] = "include/update_function.php"; |
||
| 72 | |||
| 73 | // Admin things |
||
| 74 | $modversion['hasAdmin'] = 1; |
||
| 75 | $modversion['system_menu'] = 1; |
||
| 76 | $modversion['adminindex'] = 'admin/index.php'; |
||
| 77 | $modversion['adminmenu'] = 'admin/menu.php'; |
||
| 78 | |||
| 79 | // Templates |
||
| 80 | $i = 1; |
||
| 81 | $modversion['templates'][$i]['file'] = 'news_item.tpl'; |
||
| 82 | $modversion['templates'][$i]['description'] = ''; |
||
| 83 | ++$i; |
||
| 84 | $modversion['templates'][$i]['file'] = 'news_archive.tpl'; |
||
| 85 | $modversion['templates'][$i]['description'] = ''; |
||
| 86 | ++$i; |
||
| 87 | $modversion['templates'][$i]['file'] = 'news_article.tpl'; |
||
| 88 | $modversion['templates'][$i]['description'] = ''; |
||
| 89 | ++$i; |
||
| 90 | $modversion['templates'][$i]['file'] = 'news_index.tpl'; |
||
| 91 | $modversion['templates'][$i]['description'] = ''; |
||
| 92 | ++$i; |
||
| 93 | $modversion['templates'][$i]['file'] = 'news_by_topic.tpl'; |
||
| 94 | $modversion['templates'][$i]['description'] = ''; |
||
| 95 | ++$i; |
||
| 96 | $modversion['templates'][$i]['file'] = 'news_by_this_author.tpl'; |
||
| 97 | $modversion['templates'][$i]['description'] = 'Shows a page resuming all the articles of the same author (according to the perms)'; |
||
| 98 | ++$i; |
||
| 99 | $modversion['templates'][$i]['file'] = 'news_ratenews.tpl'; |
||
| 100 | $modversion['templates'][$i]['description'] = 'Template used to rate a news'; |
||
| 101 | ++$i; |
||
| 102 | $modversion['templates'][$i]['file'] = 'news_rss.tpl'; |
||
| 103 | $modversion['templates'][$i]['description'] = 'Used for RSS per topics'; |
||
| 104 | ++$i; |
||
| 105 | $modversion['templates'][$i]['file'] = 'news_whos_who.tpl'; |
||
| 106 | $modversion['templates'][$i]['description'] = "Who's who"; |
||
| 107 | ++$i; |
||
| 108 | $modversion['templates'][$i]['file'] = 'news_topics_directory.tpl'; |
||
| 109 | $modversion['templates'][$i]['description'] = 'Topics Directory'; |
||
| 110 | |||
| 111 | // Blocks |
||
| 112 | $modversion['blocks'][1]['file'] = 'news_topics.php'; |
||
| 113 | $modversion['blocks'][1]['name'] = _MI_NEWS_BNAME1; |
||
| 114 | $modversion['blocks'][1]['description'] = 'Shows news topics'; |
||
| 115 | $modversion['blocks'][1]['show_func'] = 'b_news_topics_show'; |
||
| 116 | $modversion['blocks'][1]['template'] = 'news_block_topics.tpl'; |
||
| 117 | |||
| 118 | $modversion['blocks'][2]['file'] = 'news_bigstory.php'; |
||
| 119 | $modversion['blocks'][2]['name'] = _MI_NEWS_BNAME3; |
||
| 120 | $modversion['blocks'][2]['description'] = 'Shows most read story of the day'; |
||
| 121 | $modversion['blocks'][2]['show_func'] = 'b_news_bigstory_show'; |
||
| 122 | $modversion['blocks'][2]['template'] = 'news_block_bigstory.tpl'; |
||
| 123 | |||
| 124 | $modversion['blocks'][3]['file'] = 'news_top.php'; |
||
| 125 | $modversion['blocks'][3]['name'] = _MI_NEWS_BNAME4; |
||
| 126 | $modversion['blocks'][3]['description'] = 'Shows top read news articles'; |
||
| 127 | $modversion['blocks'][3]['show_func'] = 'b_news_top_show'; |
||
| 128 | $modversion['blocks'][3]['edit_func'] = 'b_news_top_edit'; |
||
| 129 | $modversion['blocks'][3]['options'] = 'counter|10|25|0|0|0|0||1||||||'; |
||
| 130 | $modversion['blocks'][3]['template'] = 'news_block_top.tpl'; |
||
| 131 | |||
| 132 | $modversion['blocks'][4]['file'] = 'news_top.php'; |
||
| 133 | $modversion['blocks'][4]['name'] = _MI_NEWS_BNAME5; |
||
| 134 | $modversion['blocks'][4]['description'] = 'Shows recent articles'; |
||
| 135 | $modversion['blocks'][4]['show_func'] = 'b_news_top_show'; |
||
| 136 | $modversion['blocks'][4]['edit_func'] = 'b_news_top_edit'; |
||
| 137 | $modversion['blocks'][4]['options'] = 'published|10|25|0|0|0|0||1||||||'; |
||
| 138 | $modversion['blocks'][4]['template'] = 'news_block_top.tpl'; |
||
| 139 | |||
| 140 | $modversion['blocks'][5]['file'] = 'news_moderate.php'; |
||
| 141 | $modversion['blocks'][5]['name'] = _MI_NEWS_BNAME6; |
||
| 142 | $modversion['blocks'][5]['description'] = 'Shows a block to moderate articles'; |
||
| 143 | $modversion['blocks'][5]['show_func'] = 'b_news_topics_moderate'; |
||
| 144 | $modversion['blocks'][5]['template'] = 'news_block_moderate.tpl'; |
||
| 145 | |||
| 146 | $modversion['blocks'][6]['file'] = 'news_topicsnav.php'; |
||
| 147 | $modversion['blocks'][6]['name'] = _MI_NEWS_BNAME7; |
||
| 148 | $modversion['blocks'][6]['description'] = 'Shows a block to navigate topics'; |
||
| 149 | $modversion['blocks'][6]['show_func'] = 'b_news_topicsnav_show'; |
||
| 150 | $modversion['blocks'][6]['template'] = 'news_block_topicnav.tpl'; |
||
| 151 | $modversion['blocks'][6]['options'] = '0'; |
||
| 152 | $modversion['blocks'][6]['edit_func'] = 'b_news_topicsnav_edit'; |
||
| 153 | |||
| 154 | $modversion['blocks'][7]['file'] = 'news_randomnews.php'; |
||
| 155 | $modversion['blocks'][7]['name'] = _MI_NEWS_BNAME8; |
||
| 156 | $modversion['blocks'][7]['description'] = 'Shows a block where news appears randomly'; |
||
| 157 | $modversion['blocks'][7]['show_func'] = 'b_news_randomnews_show'; |
||
| 158 | $modversion['blocks'][7]['template'] = 'news_block_randomnews.tpl'; |
||
| 159 | $modversion['blocks'][7]['options'] = 'published|10|25|0|0'; |
||
| 160 | $modversion['blocks'][7]['edit_func'] = 'b_news_randomnews_edit'; |
||
| 161 | |||
| 162 | $modversion['blocks'][8]['file'] = 'news_archives.php'; |
||
| 163 | $modversion['blocks'][8]['name'] = _MI_NEWS_BNAME9; |
||
| 164 | $modversion['blocks'][8]['description'] = 'Shows a block where you can see archives'; |
||
| 165 | $modversion['blocks'][8]['show_func'] = 'b_news_archives_show'; |
||
| 166 | $modversion['blocks'][8]['template'] = 'news_block_archives.tpl'; |
||
| 167 | $modversion['blocks'][8]['options'] = '0|0|0|0|1|1'; // Starting date (year, month), ending date (year, month), until today, sort order |
||
| 168 | $modversion['blocks'][8]['edit_func'] = 'b_news_archives_edit'; |
||
| 169 | |||
| 170 | // Added in v1.63 |
||
| 171 | $modversion['blocks'][9]['file'] = 'news_block_tag.php'; |
||
| 172 | $modversion['blocks'][9]['name'] = _MI_NEWS_BNAME10; |
||
| 173 | $modversion['blocks'][9]['description'] = 'Show tag cloud'; |
||
| 174 | $modversion['blocks'][9]['show_func'] = 'news_tag_block_cloud_show'; |
||
| 175 | $modversion['blocks'][9]['edit_func'] = 'news_tag_block_cloud_edit'; |
||
| 176 | $modversion['blocks'][9]['options'] = '100|0|150|80'; |
||
| 177 | $modversion['blocks'][9]['template'] = 'news_tag_block_cloud.tpl'; |
||
| 178 | |||
| 179 | $modversion['blocks'][10]['file'] = 'news_block_tag.php'; |
||
| 180 | $modversion['blocks'][10]['name'] = _MI_NEWS_BNAME11; |
||
| 181 | $modversion['blocks'][10]['description'] = 'Show top tags'; |
||
| 182 | $modversion['blocks'][10]['show_func'] = 'news_tag_block_top_show'; |
||
| 183 | $modversion['blocks'][10]['edit_func'] = 'news_tag_block_top_edit'; |
||
| 184 | $modversion['blocks'][10]['options'] = '50|30|c'; |
||
| 185 | $modversion['blocks'][10]['template'] = 'news_tag_block_top.tpl'; |
||
| 186 | |||
| 187 | // Menu |
||
| 188 | $modversion['hasMain'] = 1; |
||
| 189 | |||
| 190 | $cansubmit = 0; |
||
| 191 | |||
| 192 | /** |
||
| 193 | * This part inserts the selected topics as sub items in the Xoops main menu |
||
| 194 | */ |
||
| 195 | $module_handler = xoops_getHandler('module'); |
||
| 196 | $module = $module_handler->getByDirname($modversion['dirname']); |
||
| 197 | if ($module) { |
||
| 198 | global $xoopsUser; |
||
| 199 | if (is_object($xoopsUser)) { |
||
| 200 | $groups = $xoopsUser->getGroups(); |
||
| 201 | } else { |
||
| 202 | $groups = XOOPS_GROUP_ANONYMOUS; |
||
| 203 | } |
||
| 204 | $gperm_handler = xoops_getHandler('groupperm'); |
||
| 205 | if ($gperm_handler->checkRight('news_submit', 0, $groups, $module->getVar('mid'))) { |
||
| 206 | $cansubmit = 1; |
||
| 207 | } |
||
| 208 | } |
||
| 209 | |||
| 210 | // ************ |
||
| 211 | $i = 1; |
||
| 212 | global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig; |
||
| 213 | // We try to "win" some time |
||
| 214 | // 1) Check to see it the module is the current module |
||
| 215 | if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) { |
||
| 216 | // 2) If there's no topics to display as sub menus we can go on |
||
| 217 | if (!isset($_SESSION['items_count']) || $_SESSION['items_count'] == -1) { |
||
| 218 | $sql = 'SELECT COUNT(*) as cpt FROM ' . $xoopsDB->prefix('news_topics') . ' WHERE menu=1'; |
||
| 219 | $result = $xoopsDB->query($sql); |
||
| 220 | list($count) = $xoopsDB->fetchRow($result); |
||
| 221 | $_SESSION['items_count'] = $count; |
||
| 222 | } else { |
||
| 223 | $count = $_SESSION['items_count']; |
||
| 224 | } |
||
| 225 | if ($count > 0) { |
||
| 226 | include_once XOOPS_ROOT_PATH . '/class/tree.php'; |
||
| 227 | include_once XOOPS_ROOT_PATH . '/modules/news/class/class.newstopic.php'; |
||
| 228 | include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php'; |
||
| 229 | $xt = new NewsTopic(); |
||
| 230 | $allTopics = $xt->getAllTopics(news_getmoduleoption('restrictindex')); |
||
| 231 | $topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid'); |
||
| 232 | $topics_arr = $topic_tree->getAllChild(0); |
||
| 233 | if ($module) { |
||
| 234 | foreach ($topics_arr as $onetopic) { |
||
| 235 | if ($gperm_handler->checkRight('news_view', $onetopic->topic_id(), $groups, $xoopsModule->getVar('mid')) && $onetopic->menu()) { |
||
| 236 | $modversion['sub'][$i]['name'] = $onetopic->topic_title(); |
||
| 237 | $modversion['sub'][$i]['url'] = 'index.php?storytopic=' . $onetopic->topic_id(); |
||
| 238 | } |
||
| 239 | ++$i; |
||
| 240 | } |
||
| 241 | } |
||
| 242 | unset($xt); |
||
| 243 | } |
||
| 244 | } |
||
| 245 | |||
| 246 | $modversion['sub'][$i]['name'] = _MI_NEWS_SMNAME2; |
||
| 247 | $modversion['sub'][$i]['url'] = 'archive.php'; |
||
| 248 | if ($cansubmit) { |
||
| 249 | ++$i; |
||
| 250 | $modversion['sub'][$i]['name'] = _MI_NEWS_SMNAME1; |
||
| 251 | $modversion['sub'][$i]['url'] = 'submit.php'; |
||
| 252 | } |
||
| 253 | unset($cansubmit); |
||
| 254 | |||
| 255 | include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php'; |
||
| 256 | if (news_getmoduleoption('newsbythisauthor')) { |
||
| 257 | ++$i; |
||
| 258 | $modversion['sub'][$i]['name'] = _MI_NEWS_WHOS_WHO; |
||
| 259 | $modversion['sub'][$i]['url'] = 'whoswho.php'; |
||
| 260 | } |
||
| 261 | |||
| 262 | ++$i; |
||
| 263 | $modversion['sub'][$i]['name'] = _MI_NEWS_TOPICS_DIRECTORY; |
||
| 264 | $modversion['sub'][$i]['url'] = 'topics_directory.php'; |
||
| 265 | |||
| 266 | // Search |
||
| 267 | $modversion['hasSearch'] = 1; |
||
| 268 | $modversion['search']['file'] = 'include/search.inc.php'; |
||
| 269 | $modversion['search']['func'] = 'news_search'; |
||
| 270 | |||
| 271 | // Comments |
||
| 272 | $modversion['hasComments'] = 1; |
||
| 273 | $modversion['comments']['pageName'] = 'article.php'; |
||
| 274 | $modversion['comments']['itemName'] = 'storyid'; |
||
| 275 | // Comment callback functions |
||
| 276 | $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; |
||
| 277 | $modversion['comments']['callback']['approve'] = 'news_com_approve'; |
||
| 278 | $modversion['comments']['callback']['update'] = 'news_com_update'; |
||
| 279 | |||
| 280 | // start module optins |
||
| 281 | $i = 0; |
||
| 282 | /** |
||
| 283 | * Select the number of news items to display on top page |
||
| 284 | */ |
||
| 285 | ++$i; |
||
| 286 | $modversion['config'][$i]['name'] = 'storyhome'; |
||
| 287 | $modversion['config'][$i]['title'] = '_MI_STORYHOME'; |
||
| 288 | $modversion['config'][$i]['description'] = '_MI_STORYHOMEDSC'; |
||
| 289 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 290 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 291 | $modversion['config'][$i]['default'] = 5; |
||
| 292 | $modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30); |
||
| 293 | |||
| 294 | /** |
||
| 295 | * Format of the date to use in the module, if you don't specify anything then the default date's format will be used |
||
| 296 | */ |
||
| 297 | ++$i; |
||
| 298 | $modversion['config'][$i]['name'] = 'dateformat'; |
||
| 299 | $modversion['config'][$i]['title'] = '_MI_NEWS_DATEFORMAT'; |
||
| 300 | $modversion['config'][$i]['description'] = '_MI_NEWS_DATEFORMAT_DESC'; |
||
| 301 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 302 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 303 | $modversion['config'][$i]['default'] = ''; |
||
| 304 | |||
| 305 | /** |
||
| 306 | * Display a navigation's box on the pages ? |
||
| 307 | * This navigation's box enable you to jump from one topic to another |
||
| 308 | */ |
||
| 309 | ++$i; |
||
| 310 | $modversion['config'][$i]['name'] = 'displaynav'; |
||
| 311 | $modversion['config'][$i]['title'] = '_MI_DISPLAYNAV'; |
||
| 312 | $modversion['config'][$i]['description'] = '_MI_DISPLAYNAVDSC'; |
||
| 313 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 314 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 315 | $modversion['config'][$i]['default'] = 1; |
||
| 316 | |||
| 317 | /* |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
75% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. Loading history...
|
|||
| 318 | ++$i; |
||
| 319 | $modversion['config'][$i]['name'] = 'anonpost'; |
||
| 320 | $modversion['config'][$i]['title'] = '_MI_ANONPOST'; |
||
| 321 | $modversion['config'][$i]['description'] = ''; |
||
| 322 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 323 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 324 | $modversion['config'][$i]['default'] = 0; |
||
| 325 | */ |
||
| 326 | |||
| 327 | /** |
||
| 328 | * Auto approuve submited stories |
||
| 329 | */ |
||
| 330 | ++$i; |
||
| 331 | $modversion['config'][$i]['name'] = 'autoapprove'; |
||
| 332 | $modversion['config'][$i]['title'] = '_MI_AUTOAPPROVE'; |
||
| 333 | $modversion['config'][$i]['description'] = '_MI_AUTOAPPROVEDSC'; |
||
| 334 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 335 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 336 | $modversion['config'][$i]['default'] = 0; |
||
| 337 | |||
| 338 | /** |
||
| 339 | * Dispay layout, classic or by topics |
||
| 340 | */ |
||
| 341 | ++$i; |
||
| 342 | $modversion['config'][$i]['name'] = 'newsdisplay'; |
||
| 343 | $modversion['config'][$i]['title'] = '_MI_NEWSDISPLAY'; |
||
| 344 | $modversion['config'][$i]['description'] = '_MI_NEWSDISPLAYDESC'; |
||
| 345 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 346 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 347 | $modversion['config'][$i]['default'] = 'Classic'; |
||
| 348 | $modversion['config'][$i]['options'] = array('_MI_NEWSCLASSIC' => 'Classic', '_MI_NEWSBYTOPIC' => 'Bytopic'); |
||
| 349 | |||
| 350 | /** |
||
| 351 | * How to display Author's name, username, full name or nothing ? |
||
| 352 | */ |
||
| 353 | ++$i; |
||
| 354 | $modversion['config'][$i]['name'] = 'displayname'; |
||
| 355 | $modversion['config'][$i]['title'] = '_MI_NAMEDISPLAY'; |
||
| 356 | $modversion['config'][$i]['description'] = '_MI_ADISPLAYNAMEDSC'; |
||
| 357 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 358 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 359 | $modversion['config'][$i]['default'] = 1; |
||
| 360 | $modversion['config'][$i]['options'] = array('_MI_DISPLAYNAME1' => 1, '_MI_DISPLAYNAME2' => 2, '_MI_DISPLAYNAME3' => 3); |
||
| 361 | |||
| 362 | /** |
||
| 363 | * Number of columns to use to display news |
||
| 364 | */ |
||
| 365 | ++$i; |
||
| 366 | $modversion['config'][$i]['name'] = 'columnmode'; |
||
| 367 | $modversion['config'][$i]['title'] = '_MI_COLUMNMODE'; |
||
| 368 | $modversion['config'][$i]['description'] = '_MI_COLUMNMODE_DESC'; |
||
| 369 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 370 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 371 | $modversion['config'][$i]['default'] = 1; |
||
| 372 | $modversion['config'][$i]['options'] = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5); |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Number of news and topics to display in the module's admin part |
||
| 376 | */ |
||
| 377 | ++$i; |
||
| 378 | $modversion['config'][$i]['name'] = 'storycountadmin'; |
||
| 379 | $modversion['config'][$i]['title'] = '_MI_STORYCOUNTADMIN'; |
||
| 380 | $modversion['config'][$i]['description'] = '_MI_STORYCOUNTADMIN_DESC'; |
||
| 381 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 382 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 383 | $modversion['config'][$i]['default'] = 10; |
||
| 384 | $modversion['config'][$i]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '35' => 35, '40' => 40); |
||
| 385 | |||
| 386 | /** |
||
| 387 | * Authorized groups to upload |
||
| 388 | */ |
||
| 389 | ++$i; |
||
| 390 | $modversion['config'][$i]['name'] = 'uploadgroups'; |
||
| 391 | $modversion['config'][$i]['title'] = '_MI_UPLOADGROUPS'; |
||
| 392 | $modversion['config'][$i]['description'] = '_MI_UPLOADGROUPS_DESC'; |
||
| 393 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 394 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 395 | $modversion['config'][$i]['default'] = 2; |
||
| 396 | $modversion['config'][$i]['options'] = array('_MI_UPLOAD_GROUP1' => 1, '_MI_UPLOAD_GROUP2' => 2, '_MI_UPLOAD_GROUP3' => 3); |
||
| 397 | |||
| 398 | /** |
||
| 399 | * MAX Filesize Upload in kilo bytes |
||
| 400 | */ |
||
| 401 | ++$i; |
||
| 402 | $modversion['config'][$i]['name'] = 'maxuploadsize'; |
||
| 403 | $modversion['config'][$i]['title'] = '_MI_UPLOADFILESIZE'; |
||
| 404 | $modversion['config'][$i]['description'] = '_MI_UPLOADFILESIZE_DESC'; |
||
| 405 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 406 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 407 | $modversion['config'][$i]['default'] = 1048576; |
||
| 408 | |||
| 409 | /** |
||
| 410 | * Restrict Topics on Index Page |
||
| 411 | * |
||
| 412 | * This is one of the mot important option in the module. |
||
| 413 | * If you set it to No, then the users can see the introduction's text of each |
||
| 414 | * story even if they don't have the right to see the topic attached to the news. |
||
| 415 | * If you set it to Yes then you can only see what you have the right to see. |
||
| 416 | * Many of the permissions are based on this option. |
||
| 417 | */ |
||
| 418 | ++$i; |
||
| 419 | $modversion['config'][$i]['name'] = 'restrictindex'; |
||
| 420 | $modversion['config'][$i]['title'] = '_MI_RESTRICTINDEX'; |
||
| 421 | $modversion['config'][$i]['description'] = '_MI_RESTRICTINDEXDSC'; |
||
| 422 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 423 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 424 | $modversion['config'][$i]['default'] = 0; |
||
| 425 | |||
| 426 | /** |
||
| 427 | * Do you want to enable your visitors to see all the other articles |
||
| 428 | * created by the author they are currently reading ? |
||
| 429 | */ |
||
| 430 | ++$i; |
||
| 431 | $modversion['config'][$i]['name'] = 'newsbythisauthor'; |
||
| 432 | $modversion['config'][$i]['title'] = '_MI_NEWSBYTHISAUTHOR'; |
||
| 433 | $modversion['config'][$i]['description'] = '_MI_NEWSBYTHISAUTHORDSC'; |
||
| 434 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 435 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 436 | $modversion['config'][$i]['default'] = 0; |
||
| 437 | |||
| 438 | /** |
||
| 439 | * If you set this option to yes then you will see two links at the bottom |
||
| 440 | * of each article. The first link will enable you to go to the previous |
||
| 441 | * article and the other link will bring you to the next article |
||
| 442 | */ |
||
| 443 | ++$i; |
||
| 444 | $modversion['config'][$i]['name'] = 'showprevnextlink'; |
||
| 445 | $modversion['config'][$i]['title'] = '_MI_NEWS_PREVNEX_LINK'; |
||
| 446 | $modversion['config'][$i]['description'] = '_MI_NEWS_PREVNEX_LINK_DESC'; |
||
| 447 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 448 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 449 | $modversion['config'][$i]['default'] = 0; |
||
| 450 | |||
| 451 | /** |
||
| 452 | * Do you want to see a summary table at the bottom of each article ? |
||
| 453 | */ |
||
| 454 | ++$i; |
||
| 455 | $modversion['config'][$i]['name'] = 'showsummarytable'; |
||
| 456 | $modversion['config'][$i]['title'] = '_MI_NEWS_SUMMARY_SHOW'; |
||
| 457 | $modversion['config'][$i]['description'] = '_MI_NEWS_SUMMARY_SHOW_DESC'; |
||
| 458 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 459 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 460 | $modversion['config'][$i]['default'] = 0; |
||
| 461 | |||
| 462 | /** |
||
| 463 | * Do you enable author's to edit their posts ? |
||
| 464 | */ |
||
| 465 | ++$i; |
||
| 466 | $modversion['config'][$i]['name'] = 'authoredit'; |
||
| 467 | $modversion['config'][$i]['title'] = '_MI_NEWS_AUTHOR_EDIT'; |
||
| 468 | $modversion['config'][$i]['description'] = '_MI_NEWS_AUTHOR_EDIT_DESC'; |
||
| 469 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 470 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 471 | $modversion['config'][$i]['default'] = 1; |
||
| 472 | |||
| 473 | /** |
||
| 474 | * Do you want to enable your visitors to rate news ? |
||
| 475 | */ |
||
| 476 | ++$i; |
||
| 477 | $modversion['config'][$i]['name'] = 'ratenews'; |
||
| 478 | $modversion['config'][$i]['title'] = '_MI_NEWS_RATE_NEWS'; |
||
| 479 | $modversion['config'][$i]['description'] = ''; |
||
| 480 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 481 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 482 | $modversion['config'][$i]['default'] = 0; |
||
| 483 | |||
| 484 | /** |
||
| 485 | * You can set RSS feeds per topic |
||
| 486 | */ |
||
| 487 | ++$i; |
||
| 488 | $modversion['config'][$i]['name'] = 'topicsrss'; |
||
| 489 | $modversion['config'][$i]['title'] = '_MI_NEWS_TOPICS_RSS'; |
||
| 490 | $modversion['config'][$i]['description'] = '_MI_NEWS_TOPICS_RSS_DESC'; |
||
| 491 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 492 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 493 | $modversion['config'][$i]['default'] = 0; |
||
| 494 | |||
| 495 | /** |
||
| 496 | * If you set this option to yes then the approvers can type the keyword |
||
| 497 | * and description's meta datas |
||
| 498 | */ |
||
| 499 | ++$i; |
||
| 500 | $modversion['config'][$i]['name'] = 'metadata'; |
||
| 501 | $modversion['config'][$i]['title'] = '_MI_NEWS_META_DATA'; |
||
| 502 | $modversion['config'][$i]['description'] = '_MI_NEWS_META_DATA_DESC'; |
||
| 503 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 504 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 505 | $modversion['config'][$i]['default'] = 0; |
||
| 506 | |||
| 507 | /** |
||
| 508 | * Editor to use |
||
| 509 | */ |
||
| 510 | ++$i; |
||
| 511 | $modversion['config'][$i]['name'] = 'form_options'; |
||
| 512 | $modversion['config'][$i]['title'] = '_MI_NEWS_FORM_OPTIONS'; |
||
| 513 | $modversion['config'][$i]['description'] = '_MI_NEWS_FORM_OPTIONS_DESC'; |
||
| 514 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 515 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 516 | $modversion['config'][$i]['default'] = 'dhtml'; |
||
| 517 | xoops_load('xoopseditorhandler'); |
||
| 518 | $editor_handler = XoopsEditorHandler::getInstance(); |
||
| 519 | $modversion['config'][$i]['options'] = array_flip($editor_handler->getList()); |
||
| 520 | |||
| 521 | /** |
||
| 522 | * If you set this option to Yes then the keywords entered in the |
||
| 523 | * search will be highlighted in the articles. |
||
| 524 | */ |
||
| 525 | ++$i; |
||
| 526 | $modversion['config'][$i]['name'] = 'keywordshighlight'; |
||
| 527 | $modversion['config'][$i]['title'] = '_MI_NEWS_KEYWORDS_HIGH'; |
||
| 528 | $modversion['config'][$i]['description'] = '_MI_NEWS_KEYWORDS_HIGH_DESC'; |
||
| 529 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 530 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 531 | $modversion['config'][$i]['default'] = 0; |
||
| 532 | |||
| 533 | /** |
||
| 534 | * If you have enabled the previous option then with this one |
||
| 535 | * you can select the color to use to highlight words |
||
| 536 | */ |
||
| 537 | ++$i; |
||
| 538 | $modversion['config'][$i]['name'] = 'highlightcolor'; |
||
| 539 | $modversion['config'][$i]['title'] = '_MI_NEWS_HIGH_COLOR'; |
||
| 540 | $modversion['config'][$i]['description'] = '_MI_NEWS_HIGH_COLOR_DES'; |
||
| 541 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 542 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 543 | $modversion['config'][$i]['default'] = '#FFFF80'; |
||
| 544 | |||
| 545 | /** |
||
| 546 | * Tooltips, or infotips are some small textes you can see when you |
||
| 547 | * move your mouse over an article's title. This text contains the |
||
| 548 | * first (x) characters of the story |
||
| 549 | */ |
||
| 550 | ++$i; |
||
| 551 | $modversion['config'][$i]['name'] = 'infotips'; |
||
| 552 | $modversion['config'][$i]['title'] = '_MI_NEWS_INFOTIPS'; |
||
| 553 | $modversion['config'][$i]['description'] = '_MI_NEWS_INFOTIPS_DES'; |
||
| 554 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 555 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 556 | $modversion['config'][$i]['default'] = '0'; |
||
| 557 | |||
| 558 | /** |
||
| 559 | * This option is specific to Mozilla/Firefox and Opera |
||
| 560 | * Both of them can display a toolbar wich contains buttons to |
||
| 561 | * go from article to article. It can show other information too |
||
| 562 | */ |
||
| 563 | ++$i; |
||
| 564 | $modversion['config'][$i]['name'] = 'sitenavbar'; |
||
| 565 | $modversion['config'][$i]['title'] = '_MI_NEWS_SITE_NAVBAR'; |
||
| 566 | $modversion['config'][$i]['description'] = '_MI_NEWS_SITE_NAVBAR_DESC'; |
||
| 567 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 568 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 569 | $modversion['config'][$i]['default'] = 0; |
||
| 570 | |||
| 571 | /** |
||
| 572 | * With this option you can select the skin (apparence) to use for the blocks containing tabs |
||
| 573 | */ |
||
| 574 | ++$i; |
||
| 575 | $modversion['config'][$i]['name'] = 'tabskin'; |
||
| 576 | $modversion['config'][$i]['title'] = '_MI_NEWS_TABS_SKIN'; |
||
| 577 | $modversion['config'][$i]['description'] = '_MI_NEWS_TABS_SKIN_DESC'; |
||
| 578 | $modversion['config'][$i]['formtype'] = 'select'; |
||
| 579 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 580 | $modversion['config'][$i]['options'] = array( |
||
| 581 | _MI_NEWS_SKIN_1 => 1, |
||
| 582 | _MI_NEWS_SKIN_2 => 2, |
||
| 583 | _MI_NEWS_SKIN_3 => 3, |
||
| 584 | _MI_NEWS_SKIN_4 => 4, |
||
| 585 | _MI_NEWS_SKIN_5 => 5, |
||
| 586 | _MI_NEWS_SKIN_6 => 6, |
||
| 587 | _MI_NEWS_SKIN_7 => 7, |
||
| 588 | _MI_NEWS_SKIN_8 => 8); |
||
| 589 | $modversion['config'][$i]['default'] = 6; |
||
| 590 | |||
| 591 | /** |
||
| 592 | * Display a navigation's box on the pages ? |
||
| 593 | * This navigation's box enable you to jump from one topic to another |
||
| 594 | */ |
||
| 595 | ++$i; |
||
| 596 | $modversion['config'][$i]['name'] = 'footNoteLinks'; |
||
| 597 | $modversion['config'][$i]['title'] = '_MI_NEWS_FOOTNOTES'; |
||
| 598 | $modversion['config'][$i]['description'] = ''; |
||
| 599 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 600 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 601 | $modversion['config'][$i]['default'] = 1; |
||
| 602 | |||
| 603 | /** |
||
| 604 | * Activate Dublin Core Metadata ? |
||
| 605 | */ |
||
| 606 | ++$i; |
||
| 607 | $modversion['config'][$i]['name'] = 'dublincore'; |
||
| 608 | $modversion['config'][$i]['title'] = '_MI_NEWS_DUBLINCORE'; |
||
| 609 | $modversion['config'][$i]['description'] = '_MI_NEWS_DUBLINCORE_DSC'; |
||
| 610 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 611 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 612 | $modversion['config'][$i]['default'] = 0; |
||
| 613 | |||
| 614 | /** |
||
| 615 | * Display a "Bookmark this article at these sites" block ? |
||
| 616 | */ |
||
| 617 | ++$i; |
||
| 618 | $modversion['config'][$i]['name'] = 'bookmarkme'; |
||
| 619 | $modversion['config'][$i]['title'] = '_MI_NEWS_BOOKMARK_ME'; |
||
| 620 | $modversion['config'][$i]['description'] = '_MI_NEWS_BOOKMARK_ME_DSC'; |
||
| 621 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 622 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 623 | $modversion['config'][$i]['default'] = 0; |
||
| 624 | |||
| 625 | /** |
||
| 626 | * Activate Firefox 2 microformats ? //obsolete, see here : http://wiki.mozilla.org/Microsummaries (cesagonchu) |
||
| 627 | * ++$i; |
||
| 628 | * $modversion['config'][$i]['name'] = 'firefox_microsummaries'; |
||
| 629 | * $modversion['config'][$i]['title'] = '_MI_NEWS_FF_MICROFORMAT'; |
||
| 630 | * $modversion['config'][$i]['description'] = '_MI_NEWS_FF_MICROFORMAT_DSC'; |
||
| 631 | * $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 632 | * $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 633 | * $modversion['config'][$i]['default'] = 0; |
||
| 634 | */ |
||
| 635 | |||
| 636 | /** |
||
| 637 | * Advertisement |
||
| 638 | */ |
||
| 639 | ++$i; |
||
| 640 | $modversion['config'][$i]['name'] = 'advertisement'; |
||
| 641 | $modversion['config'][$i]['title'] = '_MI_NEWS_ADVERTISEMENT'; |
||
| 642 | $modversion['config'][$i]['description'] = '_MI_NEWS_ADV_DESCR'; |
||
| 643 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
| 644 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 645 | $modversion['config'][$i]['default'] = ''; |
||
| 646 | |||
| 647 | /** |
||
| 648 | * Mime Types |
||
| 649 | * |
||
| 650 | * Default values : Web pictures (png, gif, jpeg), zip, pdf, gtar, tar, pdf |
||
| 651 | */ |
||
| 652 | ++$i; |
||
| 653 | $modversion['config'][$i]['name'] = 'mimetypes'; |
||
| 654 | $modversion['config'][$i]['title'] = '_MI_NEWS_MIME_TYPES'; |
||
| 655 | $modversion['config'][$i]['description'] = ''; |
||
| 656 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
| 657 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 658 | $modversion['config'][$i]['default'] = "image/gif\nimage/jpeg\nimage/pjpeg\nimage/x-png\nimage/png\napplication/x-zip-compressed\napplication/zip\napplication/pdf\napplication/x-gtar\napplication/x-tar"; |
||
| 659 | |||
| 660 | /** |
||
| 661 | * Use enhanced page separator ? |
||
| 662 | */ |
||
| 663 | ++$i; |
||
| 664 | $modversion['config'][$i]['name'] = 'enhanced_pagenav'; |
||
| 665 | $modversion['config'][$i]['title'] = '_MI_NEWS_ENHANCED_PAGENAV'; |
||
| 666 | $modversion['config'][$i]['description'] = '_MI_NEWS_ENHANCED_PAGENAV_DSC'; |
||
| 667 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 668 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 669 | $modversion['config'][$i]['default'] = 0; |
||
| 670 | |||
| 671 | /** |
||
| 672 | * Use the TAGS system ? |
||
| 673 | */ |
||
| 674 | ++$i; |
||
| 675 | $modversion['config'][$i]['name'] = 'tags'; |
||
| 676 | $modversion['config'][$i]['title'] = '_MI_NEWS_TAGS'; |
||
| 677 | $modversion['config'][$i]['description'] = '_MI_NEWS_TAGS_DSC'; |
||
| 678 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 679 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 680 | $modversion['config'][$i]['default'] = 0; |
||
| 681 | |||
| 682 | /** |
||
| 683 | * Introduction text to show on the submit page |
||
| 684 | */ |
||
| 685 | ++$i; |
||
| 686 | $modversion['config'][$i]['name'] = 'submitintromsg'; |
||
| 687 | $modversion['config'][$i]['title'] = '_MI_NEWS_INTRO_TEXT'; |
||
| 688 | $modversion['config'][$i]['description'] = ''; |
||
| 689 | $modversion['config'][$i]['formtype'] = 'textarea'; |
||
| 690 | $modversion['config'][$i]['valuetype'] = 'text'; |
||
| 691 | $modversion['config'][$i]['default'] = ''; |
||
| 692 | |||
| 693 | /** |
||
| 694 | * Max width |
||
| 695 | */ |
||
| 696 | ++$i; |
||
| 697 | $modversion['config'][$i]['name'] = 'maxwidth'; |
||
| 698 | $modversion['config'][$i]['title'] = '_MI_NEWS_IMAGE_MAX_WIDTH'; |
||
| 699 | $modversion['config'][$i]['description'] = ''; |
||
| 700 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 701 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 702 | $modversion['config'][$i]['default'] = 640; |
||
| 703 | |||
| 704 | /** |
||
| 705 | * Max height |
||
| 706 | */ |
||
| 707 | ++$i; |
||
| 708 | $modversion['config'][$i]['name'] = 'maxheight'; |
||
| 709 | $modversion['config'][$i]['title'] = '_MI_NEWS_IMAGE_MAX_HEIGHT'; |
||
| 710 | $modversion['config'][$i]['description'] = ''; |
||
| 711 | $modversion['config'][$i]['formtype'] = 'textbox'; |
||
| 712 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 713 | $modversion['config'][$i]['default'] = 480; |
||
| 714 | |||
| 715 | /** |
||
| 716 | * Display a "share" items ? |
||
| 717 | */ |
||
| 718 | ++$i; |
||
| 719 | $modversion['config'][$i]['name'] = 'share'; |
||
| 720 | $modversion['config'][$i]['title'] = '_MI_NEWS_SHARE_ME'; |
||
| 721 | $modversion['config'][$i]['description'] = '_MI_NEWS_SHARE_ME_DSC'; |
||
| 722 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 723 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 724 | $modversion['config'][$i]['default'] = 0; |
||
| 725 | |||
| 726 | /** |
||
| 727 | * Display Print and Email icons in each article ? |
||
| 728 | */ |
||
| 729 | ++$i; |
||
| 730 | $modversion['config'][$i]['name'] = 'showicons'; |
||
| 731 | $modversion['config'][$i]['title'] = '_MI_NEWS_SHOWICONS'; |
||
| 732 | $modversion['config'][$i]['description'] = '_MI_NEWS_SHOWICONS_DSC'; |
||
| 733 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 734 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 735 | $modversion['config'][$i]['default'] = 1; |
||
| 736 | |||
| 737 | /** |
||
| 738 | * Display PDF icon in each article ? |
||
| 739 | */ |
||
| 740 | |||
| 741 | ++$i; |
||
| 742 | $modversion['config'][$i]['name'] = 'show_pdficon'; |
||
| 743 | $modversion['config'][$i]['title'] = '_MI_NEWS_SHOWICONS_PDF'; |
||
| 744 | $modversion['config'][$i]['description'] = '_MI_NEWS_SHOWICONS_PDF_DSC'; |
||
| 745 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 746 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 747 | $modversion['config'][$i]['default'] = 0; |
||
| 748 | |||
| 749 | /** |
||
| 750 | * Allow Facebook Comments? |
||
| 751 | */ |
||
| 752 | ++$i; |
||
| 753 | $modversion['config'][$i]['name'] = 'fbcomments'; |
||
| 754 | $modversion['config'][$i]['title'] = '_MI_NEWS_FACEBOOKCOMMENTS'; |
||
| 755 | $modversion['config'][$i]['description'] = '_MI_NEWS_FACEBOOKCOMMENTS_DSC'; |
||
| 756 | $modversion['config'][$i]['formtype'] = 'yesno'; |
||
| 757 | $modversion['config'][$i]['valuetype'] = 'int'; |
||
| 758 | $modversion['config'][$i]['default'] = 0; |
||
| 759 | |||
| 760 | // Notification |
||
| 761 | $modversion['hasNotification'] = 1; |
||
| 762 | $modversion['notification']['lookup_file'] = 'include/notification.inc.php'; |
||
| 763 | $modversion['notification']['lookup_func'] = 'news_notify_iteminfo'; |
||
| 764 | |||
| 765 | $modversion['notification']['category'][1]['name'] = 'global'; |
||
| 766 | $modversion['notification']['category'][1]['title'] = _MI_NEWS_GLOBAL_NOTIFY; |
||
| 767 | $modversion['notification']['category'][1]['description'] = _MI_NEWS_GLOBAL_NOTIFYDSC; |
||
| 768 | $modversion['notification']['category'][1]['subscribe_from'] = array('index.php', 'article.php'); |
||
| 769 | |||
| 770 | $modversion['notification']['category'][2]['name'] = 'story'; |
||
| 771 | $modversion['notification']['category'][2]['title'] = _MI_NEWS_STORY_NOTIFY; |
||
| 772 | $modversion['notification']['category'][2]['description'] = _MI_NEWS_STORY_NOTIFYDSC; |
||
| 773 | $modversion['notification']['category'][2]['subscribe_from'] = array('article.php'); |
||
| 774 | $modversion['notification']['category'][2]['item_name'] = 'storyid'; |
||
| 775 | $modversion['notification']['category'][2]['allow_bookmark'] = 1; |
||
| 776 | |||
| 777 | // Added by Lankford on 2007/3/23 |
||
| 778 | $modversion['notification']['category'][3]['name'] = 'category'; |
||
| 779 | $modversion['notification']['category'][3]['title'] = _MI_NEWS_CATEGORY_NOTIFY; |
||
| 780 | $modversion['notification']['category'][3]['description'] = _MI_NEWS_CATEGORY_NOTIFYDSC; |
||
| 781 | $modversion['notification']['category'][3]['subscribe_from'] = array('index.php', 'article.php'); |
||
| 782 | $modversion['notification']['category'][3]['item_name'] = 'storytopic'; |
||
| 783 | $modversion['notification']['category'][3]['allow_bookmark'] = 1; |
||
| 784 | |||
| 785 | $modversion['notification']['event'][1]['name'] = 'new_category'; |
||
| 786 | $modversion['notification']['event'][1]['category'] = 'global'; |
||
| 787 | $modversion['notification']['event'][1]['title'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFY; |
||
| 788 | $modversion['notification']['event'][1]['caption'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYCAP; |
||
| 789 | $modversion['notification']['event'][1]['description'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYDSC; |
||
| 790 | $modversion['notification']['event'][1]['mail_template'] = 'global_newcategory_notify'; |
||
| 791 | $modversion['notification']['event'][1]['mail_subject'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYSBJ; |
||
| 792 | |||
| 793 | $modversion['notification']['event'][2]['name'] = 'story_submit'; |
||
| 794 | $modversion['notification']['event'][2]['category'] = 'global'; |
||
| 795 | $modversion['notification']['event'][2]['admin_only'] = 1; |
||
| 796 | $modversion['notification']['event'][2]['title'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFY; |
||
| 797 | $modversion['notification']['event'][2]['caption'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYCAP; |
||
| 798 | $modversion['notification']['event'][2]['description'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYDSC; |
||
| 799 | $modversion['notification']['event'][2]['mail_template'] = 'global_storysubmit_notify'; |
||
| 800 | $modversion['notification']['event'][2]['mail_subject'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYSBJ; |
||
| 801 | |||
| 802 | $modversion['notification']['event'][3]['name'] = 'new_story'; |
||
| 803 | $modversion['notification']['event'][3]['category'] = 'global'; |
||
| 804 | $modversion['notification']['event'][3]['title'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFY; |
||
| 805 | $modversion['notification']['event'][3]['caption'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYCAP; |
||
| 806 | $modversion['notification']['event'][3]['description'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYDSC; |
||
| 807 | $modversion['notification']['event'][3]['mail_template'] = 'global_newstory_notify'; |
||
| 808 | $modversion['notification']['event'][3]['mail_subject'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYSBJ; |
||
| 809 | |||
| 810 | $modversion['notification']['event'][4]['name'] = 'approve'; |
||
| 811 | $modversion['notification']['event'][4]['category'] = 'story'; |
||
| 812 | $modversion['notification']['event'][4]['invisible'] = 1; |
||
| 813 | $modversion['notification']['event'][4]['title'] = _MI_NEWS_STORY_APPROVE_NOTIFY; |
||
| 814 | $modversion['notification']['event'][4]['caption'] = _MI_NEWS_STORY_APPROVE_NOTIFYCAP; |
||
| 815 | $modversion['notification']['event'][4]['description'] = _MI_NEWS_STORY_APPROVE_NOTIFYDSC; |
||
| 816 | $modversion['notification']['event'][4]['mail_template'] = 'story_approve_notify'; |
||
| 817 | $modversion['notification']['event'][4]['mail_subject'] = _MI_NEWS_STORY_APPROVE_NOTIFYSBJ; |
||
| 818 | |||
| 819 | // Added by Lankford on 2007/3/23 |
||
| 820 | $modversion['notification']['event'][5]['name'] = 'new_story'; |
||
| 821 | $modversion['notification']['event'][5]['category'] = 'category'; |
||
| 822 | $modversion['notification']['event'][5]['title'] = _MI_NEWS_CATEGORY_STORYPOSTED_NOTIFY; |
||
| 823 | $modversion['notification']['event'][5]['caption'] = _MI_NEWS_CATEGORY_STORYPOSTED_NOTIFYCAP; |
||
| 824 | $modversion['notification']['event'][5]['description'] = _MI_NEWS_CATEGORY_STORYPOSTED_NOTIFYDSC; |
||
| 825 | $modversion['notification']['event'][5]['mail_template'] = 'category_newstory_notify'; |
||
| 826 | $modversion['notification']['event'][5]['mail_subject'] = _MI_NEWS_CATEGORY_STORYPOSTED_NOTIFYSBJ; |
||
| 827 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.