Completed
Push — master ( 234b0e...1578b3 )
by Michael
14s
created

xoops_version.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
// $Id: xoops_version.php 11819 2013-07-09 18:21:40Z zyspec $
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                    Copyright (c) 2000 XOOPS.org                           //
6
//                       <http://www.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
28
if (!defined('XOOPS_ROOT_PATH')) exit;
29
$module_dirname = basename(__DIR__);
30
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig;
31
32
$modversion['dirname']     = basename( __DIR__ );
33
$modversion['name']        = _MI_MYLINKS_NAME;
34
$modversion['version']     = 3.11;
35
$modversion['description'] = _MI_MYLINKS_DESC;
36
$modversion['author']      = 'Kazumi Ono';
37
$modversion['nickname']    = 'Onokazu';
38
$modversion['credits']     = 'Wanikoo, ZySpec, Mamba';
39
$modversion['official']    = 1;
40
//$modversion['release_date']= 1300453080;
41
$modversion['image']               = 'images/mylinks_slogo.png';
42
$modversion['help']                = 'page=help';
43
$modversion['license']             = 'GNU GPL 2.0';
44
$modversion['license_url']         = 'www.gnu.org/licenses/gpl-2.0.html';
45
$modversion['module_website_url']  = 'http://xoops.org';
46
$modversion['module_website_name'] = 'XOOPS';
47
$modversion['author_website_url']  = 'http://xoops.org';
48
$modversion['author_website_name'] = 'XOOPS';
49
50
//about
51
$modversion['release_date']     = '2016/04/25';
52
$modversion['module_status']    = 'RC5';
53
$modversion['min_php']          = '5.3.0';
54
$modversion['min_xoops']        = '2.5.7';
55
$modversion['min_db']           = array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
56
$modversion['min_admin']        = '1.1';
57
$modversion['dirmoduleadmin']   = '/Frameworks/moduleclasses/moduleadmin';
58
$modversion['icons16']          = '../../Frameworks/moduleclasses/icons/16';
59
$modversion['icons32']          = '../../Frameworks/moduleclasses/icons/32';
60
61
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
62
// All tables should not have any prefix!
63
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
64
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";
65
66
// Tables created by sql file (without prefix!)
67
$modversion['tables'] = array(
68
    'mylinks_broken',
69
    'mylinks_cat',
70
    'mylinks_links',
71
    'mylinks_mod',
72
    'mylinks_text',
73
    'mylinks_votedata'
74
                        );
75
76
// Admin things
77
$modversion['hasAdmin']   = 1;
78
$modversion['adminindex'] = 'admin/index.php';
79
$modversion['adminmenu']  = 'admin/menu.php';
80
81
//Install/Uninstall Functions
82
$modversion['onInstall']    = 'include/oninstall.inc.php';
83
$modversion['onUpdate']     = 'include/onupdate.inc.php';
84
$modversion['onUninstall']  = 'include/onuninstall.inc.php';
85
86
// Blocks
87
$modversion['blocks'][1] = array(
88
    'file'        => 'mylinks_top.php',
89
    'name'        => _MI_MYLINKS_BNAME1,
90
    'description' => _MI_MYLINKS_BNAME1DESC,
91
    'show_func'   => 'b_mylinks_top_show',
92
    'edit_func'   => 'b_mylinks_top_edit',
93
    'options'     => 'date|10|25',
94
    'template'    => 'mylinks_block_new.html'
95
                );
96
97
$modversion['blocks'][2] = array(
98
    'file'        => 'mylinks_top.php',
99
    'name'        => _MI_MYLINKS_BNAME2,
100
    'description' => _MI_MYLINKS_BNAME2DESC,
101
    'show_func'   => 'b_mylinks_top_show',
102
    'edit_func'   => 'b_mylinks_top_edit',
103
    'options'     => 'hits|10|25',
104
    'template'    => 'mylinks_block_top.html'
105
                );
106
107
$modversion['blocks'][3] = array(
108
    'file'        => 'mylinks_rand.php',
109
    'name'        => _MI_MYLINKS_BNAME3,
110
    'description' => _MI_MYLINKS_BNAME3DESC,
111
    'show_func'   => 'b_mylinks_random_show',
112
    'template'    => 'mylinks_block_rand.html'
113
                );
114
115
// Menu
116
$modversion['hasMain'] = 1;
117
$i = 1;
118
$hModConfig = xoops_getHandler('config');
119
$hModule = xoops_getHandler('module');
120
if ($mylinksModule =& $hModule->getByDirname($module_dirname)) {
121
    if ($mylinksConfig =& $hModConfig->getConfigsByCat(0, $mylinksModule->getVar('mid'))) {
122
        if ($xoopsUser || ($mylinksConfig['anonpost'] == 1)) {
123
            $modversion['sub'][$i] = array('name' => _MI_MYLINKS_SMNAME1,
124
                                           'url'  => 'submit.php');
125
            $i++;
126
        }
127
    }
128
}
129
//$modversion['sub'][1]['name'] = _MI_MYLINKS_SMNAME1;
130
//$modversion['sub'][1]['url']  = "submit.php";
131
/*
132
 * sort =    1    Top Rated
133
 *             2    Popular
134
 *             3    Most Recent
135
 */
136
$modversion['sub'][$i] = array('name' => _MI_MYLINKS_SMNAME3,
137
                               'url'  => 'topten.php?sort=1'
138
);
139
$i++;
140
$modversion['sub'][$i] = array('name' => _MI_MYLINKS_SMNAME2,
141
                               'url'  => 'topten.php?sort=2'
142
);
143
$i++;
144
$modversion['sub'][$i] = array('name' => _MI_MYLINKS_SMNAME4,
145
                               'url'  => 'topten.php?sort=3'
146
);
147
148
// Set to 1 if you want to display menu generated by system module
149
$modversion['system_menu'] = 1;
150
151
// Search
152
$modversion['hasSearch'] = 1;
153
$modversion['search']['file'] = 'include/search.inc.php';
154
$modversion['search']['func'] = 'mylinks_search';
155
156
// Comments
157
$modversion['hasComments']             = 1;
158
$modversion['comments']['itemName']    = 'lid';
159
$modversion['comments']['pageName']    = 'singlelink.php';
160
$modversion['comments']['extraParams'] = array('cid');
161
// Comment callback functions
162
$modversion['comments']['callbackFile']        = 'include/comment_functions.php';
163
$modversion['comments']['callback']['approve'] = 'mylinks_com_approve';
164
$modversion['comments']['callback']['update']  = 'mylinks_com_update';
165
166
// Templates
167
$i = 1;
168
$modversion['templates'][$i]['file']        = 'mylinks_brokenlink.html';
169
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_BROKEN;
170
$i++;
171
$modversion['templates'][$i]['file']        = 'mylinks_link.html';
172
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_LINK;
173
$i++;
174
$modversion['templates'][$i]['file']        = 'mylinks_index.html';
175
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_INDEX;
176
$i++;
177
$modversion['templates'][$i]['file']        = 'mylinks_modlink.html';
178
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_MODLINK;
179
$i++;
180
$modversion['templates'][$i]['file']        = 'mylinks_ratelink.html';
181
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_RATELINK;
182
$i++;
183
$modversion['templates'][$i]['file']        = 'mylinks_singlelink.html';
184
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_SINGLELINK;
185
$i++;
186
$modversion['templates'][$i]['file']        = 'mylinks_submit.html';
187
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_SUBMIT;
188
$i++;
189
$modversion['templates'][$i]['file']        = 'mylinks_topten.html';
190
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_TOPTEN;
191
$i++;
192
$modversion['templates'][$i]['file']        = 'mylinks_viewcat.html';
193
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_VIEWCAT;
194
/*
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% 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...
195
$i++;
196
$modversion["templates"][$i]["file"]         = "admin/" . $module_dirname . "_admin_index.html";
197
$modversion["templates"][$i]["description"] = _MI_MYLINKS_TPLDESC_ADMIN_INDEX;
198
$i++;
199
$modversion["templates"][$i]["file"]         = "admin/" . $module_dirname . "_admin_about.html";
200
$modversion["templates"][$i]["description"] = _MI_MYLINKS_TPLDESC_ADMIN_ABOUT;
201
$i++;
202
$modversion["templates"][$i]["file"]         = "admin/" . $module_dirname . "_admin_help.html";
203
$modversion["templates"][$i]["description"] = _MI_MYLINKS_TPLDESC_ADMIN_HELP;
204
*/
205
$i++;
206
$modversion['templates'][$i]['file']        = 'mylinks_search_inc.html';
207
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_SEARCHINC;
208
$i++;
209
$modversion['templates'][$i]['file']        = 'mylinks_atom.html';
210
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_ATOM;
211
$i++;
212
$modversion['templates'][$i]['file']        = 'mylinks_pda.html';
213
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_PDA;
214
$i++;
215
$modversion['templates'][$i]['file']        = 'mylinks_rss.html';
216
$modversion['templates'][$i]['description'] = _MI_MYLINKS_TPLDESC_RSS;
217
218
// Config Settings (only for modules that need config settings generated automatically)
219
220
// name of config option for accessing its specified value. i.e. $xoopsModuleConfig['storyhome']
221
$modversion['config'][1]['name'] = 'popular';
222
223
// title of this config option displayed in config settings form
224
$modversion['config'][1]['title'] = '_MI_MYLINKS_POPULAR';
225
226
// description of this config option displayed under title
227
$modversion['config'][1]['description'] = '_MI_MYLINKS_POPULARDSC';
228
229
// form element type used in config form for this option. can be one of either textbox, textarea, select, select_multi, yesno, group, group_multi
230
$modversion['config'][1]['formtype'] = 'select';
231
232
// value type of this config option. can be one of either int, text, float, array, or other
233
// form type of 'group_multi', 'select_multi' must always be 'array'
234
// form type of 'yesno', 'group' must be always be 'int'
235
$modversion['config'][1]['valuetype'] = 'int';
236
237
// the default value for this option
238
// ignore it if no default
239
// 'yesno' formtype must be either 0(no) or 1(yes)
240
$modversion['config'][1]['default'] = 100;
241
242
// options to be displayed in selection box
243
// required and valid for 'select' or 'select_multi' formtype option only
244
// language constants can be used for both array keys and values
245
$modversion['config'][1]['options'] = array('5' => 5, '10' => 10, '50' => 50, '100' => 100, '200' => 200, '500' => 500, '1000' => 1000);
246
247
$modversion['config'][] = array(
248
                            'name'        => 'newlinks',
249
                            'title'       => '_MI_MYLINKS_NEWLINKS',
250
                            'description' => '_MI_MYLINKS_NEWLINKSDSC',
251
                            'formtype'    => 'select',
252
                            'valuetype'   => 'int',
253
                            'default'     => 10,
254
                            'options'     => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50)
255
                          );
256
257
$modversion['config'][] = array(
258
                            'name'        => 'perpage',
259
                            'title'       => '_MI_MYLINKS_PERPAGE',
260
                            'description' => '_MI_MYLINKS_PERPAGEDSC',
261
                            'formtype'    => 'select',
262
                            'valuetype'   => 'int',
263
                            'default'     => 10,
264
                            'options'     => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50)
265
                          );
266
267
$modversion['config'][] = array(
268
                            'name'        => 'anonpost',
269
                            'title'       => '_MI_MYLINKS_ANONPOST',
270
                            'description' => '',
271
                            'formtype'    => 'yesno',
272
                            'valuetype'   => 'int',
273
                            'default'     => 0
274
                          );
275
276
$modversion['config'][] = array(
277
                            'name'        => 'autoapprove',
278
                            'title'       => '_MI_MYLINKS_AUTOAPPROVE',
279
                            'description' => '_MI_MYLINKS_AUTOAPPROVEDSC',
280
                            'formtype'    => 'yesno',
281
                            'valuetype'   => 'int',
282
                            'default'     => 0
283
                            );
284
285
$modversion['config'][] = array(
286
                            'name'        => 'frame',
287
                            'title'       => '_MI_MYLINKS_USEFRAMES',
288
                            'description' => '_MI_MYLINKS_USEFRAMEDSC',
289
                            'formtype'    => 'yesno',
290
                            'valuetype'   => 'int',
291
                            'default'     => 0
292
                          );
293
294
$modversion['config'][] = array(
295
                            'name'        => 'useshots',
296
                            'title'       => '_MI_MYLINKS_USESHOTS',
297
                            'description' => '_MI_MYLINKS_USESHOTSDSC',
298
                            'formtype'    => 'yesno',
299
                            'valuetype'   => 'int',
300
                            'default'     => 0
301
                          );
302
303
$modversion['config'][] = array(
304
                            'name'        => 'shotwidth',
305
                            'title'       => '_MI_MYLINKS_SHOTWIDTH',
306
                            'description' => '_MI_MYLINKS_SHOTWIDTHDSC',
307
                            'formtype'    => 'textbox',
308
                            'valuetype'   => 'int',
309
                            'default'     => 140
310
                          );
311
312
$options = array('None'=>_NONE);
313
$fileList = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . '/class/providers');
314
foreach ($fileList as $filename) {
315
    if ('.php' == substr($filename, - 4)
316
        && file_exists(XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . "/class/providers/{$filename}")
317
    ) {
318
        include_once XOOPS_ROOT_PATH . '/modules/' . $modversion['dirname'] . "/class/providers/{$filename}";
319
        $provider = substr($filename, 0, -4);
320
        $providerKey = ucfirst($provider);
321
        $provClass = ucfirst($modversion['dirname']) . $providerKey;
322
        $provObj = new $provClass;
323
        if ($provObj instanceof MylinksThumbPlugin) {
324
            $options[$providerKey] = $provObj->getProviderName();
325
        }
326
    }
327
}
328
329
$modversion['config'][] = array(
330
                            'name'        => 'shotprovider',
331
                            'title'       => '_MI_MYLINKS_SHOTPROVIDER',
332
                            'description' => '_MI_MYLINKS_SHOTPROVIDERDSC',
333
                            'formtype'    => 'select',
334
                            'valuetype'   => 'text',
335
                            'default'     => _NONE,
336
                            'options'     => $options);
337
/*
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% 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...
338
$modversion['config'][] = array(
339
                            'name'        => 'shotprovider',
340
                            'title'       => '_MI_MYLINKS_SHOTPROVIDER',
341
                            'description' => '_MI_MYLINKS_SHOTPROVIDERDSC',
342
                            'formtype'    => 'select',
343
                            'valuetype'   => 'text',
344
                            'default'     => _MI_MYLINKS_SHPROV0_VAL,
345
                            'options'     => array('_MI_MYLINKS_SHPROV0' => _MI_MYLINKS_SHPROV0_VAL,
346
                                                   '_MI_MYLINKS_SHPROV1' => _MI_MYLINKS_SHPROV1_VAL,
347
                                                   '_MI_MYLINKS_SHPROV2' => _MI_MYLINKS_SHPROV2_VAL)
348
                          );
349
*/
350
351
$modversion['config'][] = array(
352
                            'name'        => 'shotpubkey',
353
                            'title'       => '_MI_MYLINKS_SHOTPUBKEY',
354
                            'description' => '_MI_MYLINKS_SHOTPUBKEYDSC',
355
                            'formtype'    => 'textbox',
356
                            'valuetype'   => 'text',
357
                            'default'     => '',
358
                          );
359
360
$modversion['config'][] = array(
361
                            'name'        => 'shotprivkey',
362
                            'title'       => '_MI_MYLINKS_SHOTPRIVKEY',
363
                            'description' => '_MI_MYLINKS_SHOTPRIVKEYDSC',
364
                            'formtype'    => 'textbox',
365
                            'valuetype'   => 'text',
366
                            'default'     => '',
367
                          );
368
369
$modversion['config'][] = array(
370
                            'name'        => 'shotattribution',
371
                            'title'       => '_MI_MYLINKS_DISPATTR',
372
                            'description' => '_MI_MYLINKS_DISPATTRRDSC',
373
                            'formtype'    => 'yesno',
374
                            'valuetype'   => 'int',
375
                            'default'     => 1
376
                          );
377
$modversion['config'][] = array(
378
                            'name'        => 'incadmin',
379
                            'title'       => '_MI_MYLINKS_INCADMIN',
380
                            'description' => '_MI_MYLINKS_INCADMINDSC',
381
                            'formtype'    => 'yesno',
382
                            'valuetype'   => 'int',
383
                            'default'     => 1
384
                          );
385
386
$modversion['config'][] = array(
387
                            'name'        => 'showextrafunc',
388
                            'title'       => '_MI_MYLINKS_SHOWEXTRAFUNC',
389
                            'description' => '_MI_MYLINKS_SHOWEXTRAFUNCDSC',
390
                            'formtype'    => 'yesno',
391
                            'valuetype'   => 'int',
392
                            'default'     => 1
393
                          );
394
395
$modversion['config'][] = array(
396
                            'name'        => 'canprint',
397
                            'title'       => '_MI_MYLINKS_CANPRINT',
398
                            'description' => '_MI_MYLINKS_CANPRINTDSC',
399
                            'formtype'    => 'select',
400
                            'valuetype'   => 'int',
401
                            'default'     => _MI_MYLINKS_ALLOW,
402
                            'options'     => array('_MI_MYLINKS_DISALLOWDSC' => _MI_MYLINKS_DISALLOW, '_MI_MYLINKS_MEMBERONLYDSC' => _MI_MYLINKS_MEMBERONLY, '_MI_MYLINKS_ALLOWDSC' => _MI_MYLINKS_ALLOW)
403
                          );
404
405
$modversion['config'][] = array(
406
                            'name'        => 'canpdf',
407
                            'title'       => '_MI_MYLINKS_CANPDF',
408
                            'description' => '_MI_MYLINKS_CANPDFDSC',
409
                            'formtype'    => 'select',
410
                            'valuetype'   => 'int',
411
                            'default'     => _MI_MYLINKS_ALLOW,
412
                            'options'     => array('_MI_MYLINKS_DISALLOWDSC' => _MI_MYLINKS_DISALLOW, '_MI_MYLINKS_MEMBERONLYDSC' => _MI_MYLINKS_MEMBERONLY, '_MI_MYLINKS_ALLOWDSC' => _MI_MYLINKS_ALLOW)
413
                          );
414
415
$modversion['config'][] = array(
416
                            'name'        => 'canbookmark',
417
                            'title'       => '_MI_MYLINKS_CANBOOKMARK',
418
                            'description' => '_MI_MYLINKS_CANBOOKMARKDSC',
419
                            'formtype'    => 'select',
420
                            'valuetype'   => 'int',
421
                            'default'     => _MI_MYLINKS_ALLOW,
422
                            'options'     => array('_MI_MYLINKS_DISALLOWDSC' => _MI_MYLINKS_DISALLOW, '_MI_MYLINKS_MEMBERONLYDSC' => _MI_MYLINKS_MEMBERONLY, '_MI_MYLINKS_ALLOWDSC' => _MI_MYLINKS_ALLOW)
423
                          );
424
425
$modversion['config'][] = array(
426
                            'name'        => 'canqrcode',
427
                            'title'       => '_MI_MYLINKS_CANQRCODE',
428
                            'description' => '_MI_MYLINKS_CANQRCODEDSC',
429
                            'formtype'    => 'select',
430
                            'valuetype'   => 'int',
431
                            'default'     => _MI_MYLINKS_MEMBERONLY,
432
                            'options'     => array('_MI_MYLINKS_DISALLOWDSC' => _MI_MYLINKS_DISALLOW, '_MI_MYLINKS_MEMBERONLYDSC' => _MI_MYLINKS_MEMBERONLY, '_MI_MYLINKS_ALLOWDSC' => _MI_MYLINKS_ALLOW)
433
                          );
434
435
$modversion['config'][] = array(
436
                            'name'        => 'showlogo',
437
                            'title'       => '_MI_MYLINKS_SHOWLOGO',
438
                            'description' => '_MI_MYLINKS_SHOWLOGODSC',
439
                            'formtype'    => 'yesno',
440
                            'valuetype'   => 'int',
441
                            'default'     => 1
442
                          );
443
444
$modversion['config'][] = array(
445
                            'name'        => 'showxoopssearch',
446
                            'title'       => '_MI_MYLINKS_SHOWXOOPSSEARCH',
447
                            'description' => '_MI_MYLINKS_SHOWXOOPSSEARCHDSC',
448
                            'formtype'    => 'yesno',
449
                            'valuetype'   => 'int',
450
                            'default'     => 0
451
                          );
452
453
$modversion['config'][] = array(
454
                            'name'        => 'showtoolbar',
455
                            'title'       => '_MI_MYLINKS_SHOWTOOLBAR',
456
                            'description' => '_MI_MYLINKS_SHOWTOOLBARDSC',
457
                            'formtype'    => 'yesno',
458
                            'valuetype'   => 'int',
459
                            'default'     => 0
460
                          );
461
462
$modversion['config'][] = array(
463
                            'name'        => 'showletters',
464
                            'title'       => '_MI_MYLINKS_SHOWLETTERS',
465
                            'description' => '_MI_MYLINKS_SHOWLETTERSDSC',
466
                            'formtype'    => 'yesno',
467
                            'valuetype'   => 'int',
468
                            'default'     => 1
469
                          );
470
471
$modversion['config'][] = array(
472
                            'name'        => 'showfeed',
473
                            'title'       => '_MI_MYLINKS_SHOWFEED',
474
                            'description' => '_MI_MYLINKS_SHOWFEEDDSC',
475
                            'formtype'    => 'yesno',
476
                            'valuetype'   => 'int',
477
                            'default'     => 1
478
                          );
479
480
$modversion['config'][] = array(
481
                            'name'        => 'showsiteinfo',
482
                            'title'       => '_MI_MYLINKS_SHOWSITEINFO',
483
                            'description' => '_MI_MYLINKS_SHOWSITEINFODSC',
484
                            'formtype'    => 'yesno',
485
                            'valuetype'   => 'int',
486
                            'default'     => 1
487
                          );
488
489
$modversion['config'][] = array(
490
                            'name'        => 'anontellafriend',
491
                            'title'       => '_MI_MYLINKS_ANONTELLAFRIEND',
492
                            'description' => '_MI_MYLINKS_ANONTELLAFRIENDDSC',
493
                            'formtype'    => 'yesno',
494
                            'valuetype'   => 'int',
495
                            'default'     => 1
496
                          );
497
498
// Notification
499
500
$modversion['hasNotification'] = 1;
501
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
502
$modversion['notification']['lookup_func'] = 'mylinks_notify_iteminfo';
503
504
$modversion['notification']['category'][1]['name']           = 'global';
505
$modversion['notification']['category'][1]['title']          = _MI_MYLINKS_GLOBAL_NOTIFY;
506
$modversion['notification']['category'][1]['description']    = _MI_MYLINKS_GLOBAL_NOTIFYDSC;
507
$modversion['notification']['category'][1]['subscribe_from'] = array('index.php','viewcat.php','singlelink.php');
508
509
$modversion['notification']['category'][2]['name']           = 'category';
510
$modversion['notification']['category'][2]['title']          = _MI_MYLINKS_CATEGORY_NOTIFY;
511
$modversion['notification']['category'][2]['description']    = _MI_MYLINKS_CATEGORY_NOTIFYDSC;
512
$modversion['notification']['category'][2]['subscribe_from'] = array('viewcat.php', 'singlelink.php');
513
$modversion['notification']['category'][2]['item_name']      = 'cid';
514
$modversion['notification']['category'][2]['allow_bookmark'] = 1;
515
516
$modversion['notification']['category'][3]['name']           = 'link';
517
$modversion['notification']['category'][3]['title']          = _MI_MYLINKS_LINK_NOTIFY;
518
$modversion['notification']['category'][3]['description']    = _MI_MYLINKS_LINK_NOTIFYDSC;
519
$modversion['notification']['category'][3]['subscribe_from'] = 'singlelink.php';
520
$modversion['notification']['category'][3]['item_name']      = 'lid';
521
$modversion['notification']['category'][3]['allow_bookmark'] = 1;
522
523
$modversion['notification']['event'][1]['name']              = 'new_category';
524
$modversion['notification']['event'][1]['category']          = 'global';
525
$modversion['notification']['event'][1]['title']             = _MI_MYLINKS_GLOBAL_NEWCATEGORY_NOTIFY;
526
$modversion['notification']['event'][1]['caption']           = _MI_MYLINKS_GLOBAL_NEWCATEGORY_NOTIFYCAP;
527
$modversion['notification']['event'][1]['description']       = _MI_MYLINKS_GLOBAL_NEWCATEGORY_NOTIFYDSC;
528
$modversion['notification']['event'][1]['mail_template']     = 'global_newcategory_notify';
529
$modversion['notification']['event'][1]['mail_subject']      = _MI_MYLINKS_GLOBAL_NEWCATEGORY_NOTIFYSBJ;
530
531
$modversion['notification']['event'][2]['name']              = 'link_modify';
532
$modversion['notification']['event'][2]['category']          = 'global';
533
$modversion['notification']['event'][2]['admin_only']        = 1;
534
$modversion['notification']['event'][2]['title']             = _MI_MYLINKS_GLOBAL_LINKMODIFY_NOTIFY;
535
$modversion['notification']['event'][2]['caption']           = _MI_MYLINKS_GLOBAL_LINKMODIFY_NOTIFYCAP;
536
$modversion['notification']['event'][2]['description']       = _MI_MYLINKS_GLOBAL_LINKMODIFY_NOTIFYDSC;
537
$modversion['notification']['event'][2]['mail_template']     = 'global_linkmodify_notify';
538
$modversion['notification']['event'][2]['mail_subject']      = _MI_MYLINKS_GLOBAL_LINKMODIFY_NOTIFYSBJ;
539
540
$modversion['notification']['event'][3]['name']          = 'link_broken';
541
$modversion['notification']['event'][3]['category']      = 'global';
542
$modversion['notification']['event'][3]['admin_only']    = 1;
543
$modversion['notification']['event'][3]['title']         = _MI_MYLINKS_GLOBAL_LINKBROKEN_NOTIFY;
544
$modversion['notification']['event'][3]['caption']       = _MI_MYLINKS_GLOBAL_LINKBROKEN_NOTIFYCAP;
545
$modversion['notification']['event'][3]['description']   = _MI_MYLINKS_GLOBAL_LINKBROKEN_NOTIFYDSC;
546
$modversion['notification']['event'][3]['mail_template'] = 'global_linkbroken_notify';
547
$modversion['notification']['event'][3]['mail_subject']  = _MI_MYLINKS_GLOBAL_LINKBROKEN_NOTIFYSBJ;
548
549
$modversion['notification']['event'][4]['name']          = 'link_submit';
550
$modversion['notification']['event'][4]['category']      = 'global';
551
$modversion['notification']['event'][4]['admin_only']    = 1;
552
$modversion['notification']['event'][4]['title']         = _MI_MYLINKS_GLOBAL_LINKSUBMIT_NOTIFY;
553
$modversion['notification']['event'][4]['caption']       = _MI_MYLINKS_GLOBAL_LINKSUBMIT_NOTIFYCAP;
554
$modversion['notification']['event'][4]['description']   = _MI_MYLINKS_GLOBAL_LINKSUBMIT_NOTIFYDSC;
555
$modversion['notification']['event'][4]['mail_template'] = 'global_linksubmit_notify';
556
$modversion['notification']['event'][4]['mail_subject']  = _MI_MYLINKS_GLOBAL_LINKSUBMIT_NOTIFYSBJ;
557
558
$modversion['notification']['event'][5]['name']          = 'new_link';
559
$modversion['notification']['event'][5]['category']      = 'global';
560
$modversion['notification']['event'][5]['title']         = _MI_MYLINKS_GLOBAL_NEWLINK_NOTIFY;
561
$modversion['notification']['event'][5]['caption']       = _MI_MYLINKS_GLOBAL_NEWLINK_NOTIFYCAP;
562
$modversion['notification']['event'][5]['description']   = _MI_MYLINKS_GLOBAL_NEWLINK_NOTIFYDSC;
563
$modversion['notification']['event'][5]['mail_template'] = 'global_newlink_notify';
564
$modversion['notification']['event'][5]['mail_subject']  = _MI_MYLINKS_GLOBAL_NEWLINK_NOTIFYSBJ;
565
566
$modversion['notification']['event'][6]['name']          = 'link_submit';
567
$modversion['notification']['event'][6]['category']      = 'category';
568
$modversion['notification']['event'][6]['admin_only']    = 1;
569
$modversion['notification']['event'][6]['title']         = _MI_MYLINKS_CATEGORY_LINKSUBMIT_NOTIFY;
570
$modversion['notification']['event'][6]['caption']       = _MI_MYLINKS_CATEGORY_LINKSUBMIT_NOTIFYCAP;
571
$modversion['notification']['event'][6]['description']   = _MI_MYLINKS_CATEGORY_LINKSUBMIT_NOTIFYDSC;
572
$modversion['notification']['event'][6]['mail_template'] = 'category_linksubmit_notify';
573
$modversion['notification']['event'][6]['mail_subject']  = _MI_MYLINKS_CATEGORY_LINKSUBMIT_NOTIFYSBJ;
574
575
$modversion['notification']['event'][7]['name']          = 'new_link';
576
$modversion['notification']['event'][7]['category']      = 'category';
577
$modversion['notification']['event'][7]['title']         = _MI_MYLINKS_CATEGORY_NEWLINK_NOTIFY;
578
$modversion['notification']['event'][7]['caption']       = _MI_MYLINKS_CATEGORY_NEWLINK_NOTIFYCAP;
579
$modversion['notification']['event'][7]['description']   = _MI_MYLINKS_CATEGORY_NEWLINK_NOTIFYDSC;
580
$modversion['notification']['event'][7]['mail_template'] = 'category_newlink_notify';
581
$modversion['notification']['event'][7]['mail_subject']  = _MI_MYLINKS_CATEGORY_NEWLINK_NOTIFYSBJ;
582
583
$modversion['notification']['event'][8]['name']          = 'approve';
584
$modversion['notification']['event'][8]['category']      = 'link';
585
$modversion['notification']['event'][8]['invisible']     = 1;
586
$modversion['notification']['event'][8]['title']         = _MI_MYLINKS_LINK_APPROVE_NOTIFY;
587
$modversion['notification']['event'][8]['caption']       = _MI_MYLINKS_LINK_APPROVE_NOTIFYCAP;
588
$modversion['notification']['event'][8]['description']   = _MI_MYLINKS_LINK_APPROVE_NOTIFYDSC;
589
$modversion['notification']['event'][8]['mail_template'] = 'link_approve_notify';
590
$modversion['notification']['event'][8]['mail_subject']  = _MI_MYLINKS_LINK_APPROVE_NOTIFYSBJ;
591
592
// onUpdate
593
/*
594
if( ! empty( $_POST['fct'] ) && ! empty( $_POST['op'] ) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname'] ) {
595
  include __DIR__ . "/include/onupdate.inc.php";
596
}
597
*/
598