Completed
Push — master ( 3024c9...954431 )
by Michael
04:21
created

xoops_version.php (6 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
3
/**
4
 * Module: XoopsTube
5
 *
6
 * You may not change or alter any portion of this comment or credits
7
 * of supporting developers from this source code or any supporting source code
8
 * which is considered copyrighted (c) material of the original comment or credit authors.
9
 *
10
 * PHP version 5
11
 *
12
 * @category        Module
13
 * @package         Xoopstube
14
 * @author          XOOPS Development Team
15
 * @copyright       2001-2016 XOOPS Project (http://xoops.org)
16
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17
 * @link            http://xoops.org/
18
 * @since           1.0.6
19
 */
20
21
$moduleDirName = basename(__DIR__);
22
23
// ------------------- Informations ------------------- //
24
$modversion = array(
25
    'name'                => _MI_XOOPSTUBE_NAME,
26
    'description'         => _MI_XOOPSTUBE_DESC,
27
    'version'             => 1.07,
28
    'official'            => 1, //1 indicates supported by XOOPS Dev Team, 0 means 3rd party supported
29
    'author'              => 'McDonald',
30
    'author_mail'         => 'http://xoops.org',
31
    'author_website_url'  => 'http://xoops.org',
32
    'author_website_name' => 'XOOPS',
33
    'credits'             => 'WF-Projects Team. Based on the module WF-Links, thanks to the dream-team for some code snippits.',
34
    'license'             => 'GPL 2.0 or later',
35
    'license_url'         => 'www.gnu.org/licenses/gpl-2.0.html/',
36
    'help'                => 'page=help',
37
    //
38
    'release_info'        => 'Changelog',
39
    'release_file'        => XOOPS_URL . "/modules/{$moduleDirName}/docs/changelog file",
40
    //
41
    'manual'              => 'link to manual file',
42
    'manual_file'         => XOOPS_URL . "/modules/{$moduleDirName}/docs/install.txt",
43
    'min_php'             => '5.5',
44
    'min_xoops'           => '2.5.8',
45
    'min_admin'           => '1.1',
46
    'min_db'              => array('mysql' => '5.0.7', 'mysqli' => '5.0.7'),
47
    // images
48
    'image'               => 'assets/images/logo_module.png',
49
    'iconsmall'           => 'assets/images/iconsmall.png',
50
    'iconbig'             => 'assets/images/iconbig.png',
51
    'dirname'             => "{$moduleDirName}",
52
    // Frameworks
53
    //    'dirmoduleadmin'      => 'Frameworks/moduleclasses/moduleadmin',
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% 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...
54
    'systemIcons16'       => 'Frameworks/moduleclasses/icons/16',
55
    'systemIcons32'       => 'Frameworks/moduleclasses/icons/32',
56
    'systemIcons32url'    => XOOPS_URL . '/' . 'Frameworks/moduleclasses/icons/32',
57
58
    //Frameworks
59
    'dirmoduleadmin'      => 'Frameworks/moduleclasses/moduleadmin',
60
    'sysIcons16'          => 'Frameworks/moduleclasses/icons/16',
61
    'sysIcons32'          => 'Frameworks/moduleclasses/icons/32',
62
    // Local path icons
63
    'modIcons16'          => 'assets/images/icons/16',
64
    'modIcons32'          => 'assets/images/icons/32',
65
66
    // Local path icons
67
    'moduleIcons16'       => 'assets/images/icons/16',
68
    'moduleIcons32'       => 'assets/images/icons/32',
69
    // About
70
    'module_status'       => 'Beta 1',
71
    //    'release_date'        => "2013/10/07",
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% 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...
72
    'release_date'        => '2016/06/16',
73
    //    'release'             => "2015-04-03",
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% 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...
74
    'demo_site_url'       => 'http://xoops.org',
75
    'demo_site_name'      => 'XOOPS Demo Site',
76
    'support_url'         => 'http://xoops.org/modules/newbb',
77
    'support_name'        => 'Support Forum',
78
    'module_website_url'  => 'www.xoops.org',
79
    'module_website_name' => 'XOOPS Project',
80
    // Admin system menu
81
    'system_menu'         => 1,
82
    // Admin menu
83
    'hasAdmin'            => 1,
84
    'adminindex'          => 'admin/index.php',
85
    'adminmenu'           => 'admin/menu.php',
86
    // Main menu
87
    'hasMain'             => 1,
88
    // Install/Update
89
    'onInstall'           => 'include/oninstall.php',
90
    'onUpdate'            => 'include/onupdate.php'
91
);
92
93
// ------------------- Mysql ------------------- //
94
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
95
// All tables should not have any prefix!
96
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
97
98
// Tables created by sql file (without prefix!)
99
//include_once 'include/config.php';
100
$modversion['tables'] = array(
101
    $moduleDirName . '_broken',
102
    $moduleDirName . '_cat',
103
    $moduleDirName . '_videos',
104
    $moduleDirName . '_mod',
105
    $moduleDirName . '_votedata',
106
    $moduleDirName . '_indexpage',
107
    $moduleDirName . '_altcat'
108
);
109
110
// ------------------- blocks ------------------- //
111
$modversion['blocks'][] = array(
112
    'file'        => $moduleDirName . '_top.php',
113
    'name'        => _MI_XOOPSTUBE_BNAME1,
114
    'description' => _MI_XOOPSTUBE_BNAME1_DESC,
115
    'show_func'   => 'showTopVideoBlock',
116
    'edit_func'   => 'editTopVideoBlock',
117
    'options'     => 'published|10|19|d/m/Y|0',
118
    'template'    => 'xoopstube_block_new_t.tpl',
119
    'can_clone'   => true
120
);
121
122
$modversion['blocks'][] = array(
123
    'file'        => $moduleDirName . '_top.php',
124
    'name'        => _MI_XOOPSTUBE_BNAME2,
125
    'description' => _MI_XOOPSTUBE_BNAME2_DESC,
126
    'show_func'   => 'showTopVideoBlock',
127
    'edit_func'   => 'editTopVideoBlock',
128
    'options'     => 'published|10|19|d/m/Y|0',
129
    'template'    => 'xoopstube_block_new.tpl',
130
    'can_clone'   => true
131
);
132
133
$modversion['blocks'][] = array(
134
    'file'        => $moduleDirName . '_top.php',
135
    'name'        => _MI_XOOPSTUBE_BNAME3,
136
    'description' => _MI_XOOPSTUBE_BNAME3_DESC,
137
    'show_func'   => 'showTopVideoBlock',
138
    'edit_func'   => 'editTopVideoBlock',
139
    'options'     => 'hits|10|19|d/m/Y|0',
140
    'template'    => 'xoopstube_block_top_t.tpl',
141
    'can_clone'   => true
142
);
143
144
$modversion['blocks'][] = array(
145
    'file'        => $moduleDirName . '_top.php',
146
    'name'        => _MI_XOOPSTUBE_BNAME4,
147
    'description' => _MI_XOOPSTUBE_BNAME4_DESC,
148
    'show_func'   => 'showTopVideoBlock',
149
    'edit_func'   => 'editTopVideoBlock',
150
    'options'     => 'hits|10|19|d/m/Y|0',
151
    'template'    => 'xoopstube_block_top.tpl',
152
    'can_clone'   => true
153
);
154
155
$modversion['blocks'][] = array(
156
    'file'        => $moduleDirName . '_top.php',
157
    'name'        => _MI_XOOPSTUBE_BNAME5,
158
    'description' => _MI_XOOPSTUBE_BNAME5_DESC,
159
    'show_func'   => 'showTopVideoBlock',
160
    'edit_func'   => 'editTopVideoBlock',
161
    'options'     => 'published|5|19|d/m/Y|0',
162
    'template'    => 'xoopstube_block_new_h.tpl',
163
    'can_clone'   => true
164
);
165
166
$modversion['blocks'][] = array(
167
    'file'        => $moduleDirName . '_top.php',
168
    'name'        => _MI_XOOPSTUBE_BNAME6,
169
    'description' => _MI_XOOPSTUBE_BNAME6_DESC,
170
    'show_func'   => 'getRandomVideo',
171
    'edit_func'   => 'editTopVideoBlock',
172
    'options'     => 'random|5|19|d/m/Y|0',
173
    'template'    => 'xoopstube_block_random.tpl',
174
    'can_clone'   => true
175
);
176
177
$modversion['blocks'][] = array(
178
    'file'        => $moduleDirName . '_top.php',
179
    'name'        => _MI_XOOPSTUBE_BNAME7,
180
    'description' => _MI_XOOPSTUBE_BNAME7_DESC,
181
    'show_func'   => 'getRandomVideoForHorizontalBlock',
182
    'edit_func'   => 'editTopVideoBlock',
183
    'options'     => 'randomh|5|19|d/m/Y|0',
184
    'template'    => 'xoopstube_block_random_h.tpl',
185
    'can_clone'   => true
186
);
187
188
$modversion['blocks'][] = array(
189
    'file'        => $moduleDirName . '_banner.php',
190
    'name'        => _MI_XOOPSTUBE_BNAME8,
191
    'description' => _MI_XOOPSTUBE_BNAME8_DESC,
192
    'show_func'   => 'xtubeShowBannerB',
193
    'edit_func'   => 'xtubeEditBannerB',
194
    'options'     => 'hits|10|19',
195
    'template'    => 'xoopstube_block_banner.tpl',
196
    'can_clone'   => true
197
);
198
199
$modversion['blocks'][] = array(
200
    'file'        => $moduleDirName . '_block_tag.php',
201
    'name'        => _MI_XOOPSTUBE_BNAME9,
202
    'description' => _MI_XOOPSTUBE_BNAME9_DESC,
203
    'show_func'   => 'xtubeShowTagBlockCloud',
204
    'edit_func'   => 'xtubeEditTagBlockCloud',
205
    'options'     => '100|0|150|80',
206
    'template'    => 'xoopstube_tag_block_cloud.tpl',
207
    'can_clone'   => true
208
);
209
210
$modversion['blocks'][] = array(
211
    'file'        => $moduleDirName . '_block_tag.php',
212
    'name'        => _MI_XOOPSTUBE_BNAME10,
213
    'description' => _MI_XOOPSTUBE_BNAME10_DESC,
214
    'show_func'   => 'xtubeShowTagBlockTop',
215
    'edit_func'   => 'xtubeEditTagBlockTop',
216
    'options'     => '50|30|c',
217
    'template'    => 'xoopstube_tag_block_tag.tpl',
218
    'can_clone'   => true
219
);
220
221
$modversion['blocks'][] = array(
222
    'file'        => $moduleDirName . '_top.php',
223
    'name'        => _MI_XOOPSTUBE_BNAME11,
224
    'description' => _MI_XOOPSTUBE_BNAME11_DESC,
225
    'show_func'   => 'getSpotlightVideos',
226
    'edit_func'   => 'editTopVideoBlock',
227
    'options'     => 'date|3|19',
228
    'template'    => 'xoopstube_block_spotlight.tpl',
229
    'can_clone'   => true
230
);
231
232
// This part inserts the selected topics as sub items in the Xoops main menu
233
$moduleHandler = xoops_getHandler('module');
234
$module        = $moduleHandler->getByDirname($modversion['dirname']);
235
$cansubmit     = 0;
236
if (is_object($module)) {
237
    $groups       = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
238
    $gpermHandler = xoops_getHandler('groupperm');
239
    if ($gpermHandler->checkRight('XTubeSubPerm', 0, $groups, $module->getVar('mid'))) {
240
        $cansubmit = 1;
241
    }
242
}
243
if (1 == $cansubmit) {
244
    $modversion['sub'][0]['name'] = _MI_XOOPSTUBE_SMNAME1;
245
    $modversion['sub'][0]['url']  = 'submit.php';
246
}
247
unset($cansubmit);
248
249
$i                             = 1;
250
$modversion['sub'][$i]['name'] = _MI_XOOPSTUBE_SMNAME2;
251
$modversion['sub'][$i]['url']  = 'topten.php?list=hit';
252
253
++$i;
254
$modversion['sub'][$i]['name'] = _MI_XOOPSTUBE_SMNAME3;
255
$modversion['sub'][$i]['url']  = 'topten.php?list=rate';
256
257
++$i;
258
$modversion['sub'][$i]['name'] = _MI_XOOPSTUBE_SMNAME4;
259
$modversion['sub'][$i]['url']  = 'newlist.php?newvideoshowdays=7';
260
unset($i);
261
262
// Search
263
$modversion['hasSearch']      = 1;
264
$modversion['search']['file'] = 'include/search.inc.php';
265
$modversion['search']['func'] = 'xtubeSearch';
266
267
// Comments
268
$modversion['hasComments']             = 1;
269
$modversion['comments']['itemName']    = 'lid';
270
$modversion['comments']['pageName']    = 'singlevideo.php';
271
$modversion['comments']['extraParams'] = array('cid');
272
273
// Comment callback functions
274
$modversion['comments']['callbackFile']        = 'include/comment_functions.php';
275
$modversion['comments']['callback']['approve'] = 'xtubeApproveComment';
276
$modversion['comments']['callback']['update']  = 'xtubeUpdateComment';
277
278
// ------------------- Templates ------------------- //
279
$modversion['templates'][] = array(
280
    'file'        => $modversion['dirname'] . '_brokenvideo.tpl',
281
    'description' => ''
282
);
283
284
$modversion['templates'][] = array(
285
    'file'        => $modversion['dirname'] . '_videoload.tpl',
286
    'description' => ''
287
);
288
289
$modversion['templates'][] = array(
290
    'file'        => $modversion['dirname'] . '_index.tpl',
291
    'description' => ''
292
);
293
294
$modversion['templates'][] = array(
295
    'file'        => $modversion['dirname'] . '_ratevideo.tpl',
296
    'description' => ''
297
);
298
299
$modversion['templates'][] = array(
300
    'file'        => $modversion['dirname'] . '_singlevideo.tpl',
301
    'description' => ''
302
);
303
304
$modversion['templates'][] = array(
305
    'file'        => $modversion['dirname'] . '_topten.tpl',
306
    'description' => ''
307
);
308
309
$modversion['templates'][] = array(
310
    'file'        => $modversion['dirname'] . '_viewcat.tpl',
311
    'description' => ''
312
);
313
314
$modversion['templates'][] = array(
315
    'file'        => $modversion['dirname'] . '_newlistindex.tpl',
316
    'description' => ''
317
);
318
319
$modversion['templates'][] = array(
320
    'file'        => $modversion['dirname'] . '_common_letterschoice.tpl',
321
    'description' => ''
322
);
323
324
$modversion['templates'][] = array(
325
    'file'        => $modversion['dirname'] . '_co_letterschoice.tpl',
326
    'description' => ''
327
);
328
329
// ------------------- Config ------------------- //
330
$modversion['config'][] = array(
331
    'name'        => 'popular',
332
    'title'       => '_MI_XOOPSTUBE_POPULAR',
333
    'description' => '_MI_XOOPSTUBE_POPULARDSC',
334
    'formtype'    => 'select',
335
    'valuetype'   => 'int',
336
    'default'     => 100,
337
    'options'     => array(
338
        '5'    => 5,
339
        '10'   => 10,
340
        '50'   => 50,
341
        '100'  => 100,
342
        '200'  => 200,
343
        '500'  => 500,
344
        '1000' => 1000
345
    )
346
);
347
348
$modversion['config'][] = array(
349
    'name'        => 'displayicons',
350
    'title'       => '_MI_XOOPSTUBE_ICONDISPLAY',
351
    'description' => '_MI_XOOPSTUBE_DISPLAYICONDSC',
352
    'formtype'    => 'select',
353
    'valuetype'   => 'int',
354
    'default'     => 1,
355
    'options'     => array(
356
        '_MI_XOOPSTUBE_DISPLAYICON1' => 1,
357
        '_MI_XOOPSTUBE_DISPLAYICON2' => 2,
358
        '_MI_XOOPSTUBE_DISPLAYICON3' => 3
359
    )
360
);
361
362
$modversion['config'][] = array(
363
    'name'        => 'daysnew',
364
    'title'       => '_MI_XOOPSTUBE_DAYSNEW',
365
    'description' => '_MI_XOOPSTUBE_DAYSNEWDSC',
366
    'formtype'    => 'textbox',
367
    'valuetype'   => 'int',
368
    'default'     => 10
369
);
370
371
$modversion['config'][] = array(
372
    'name'        => 'daysupdated',
373
    'title'       => '_MI_XOOPSTUBE_DAYSUPDATED',
374
    'description' => '_MI_XOOPSTUBE_DAYSUPDATEDDSC',
375
    'formtype'    => 'textbox',
376
    'valuetype'   => 'int',
377
    'default'     => 10
378
);
379
380
$modversion['config'][] = array(
381
    'name'        => 'perpage',
382
    'title'       => '_MI_XOOPSTUBE_PERPAGE',
383
    'description' => '_MI_XOOPSTUBE_PERPAGEDSC',
384
    'formtype'    => 'select',
385
    'valuetype'   => 'int',
386
    'default'     => 10,
387
    'options'     => array(
388
        '5'  => 5,
389
        '10' => 10,
390
        '15' => 15,
391
        '20' => 20,
392
        '25' => 25,
393
        '30' => 30,
394
        '50' => 50
395
    )
396
);
397
398
$modversion['config'][] = array(
399
    'name'        => 'admin_perpage',
400
    'title'       => '_MI_XOOPSTUBE_ADMINPAGE',
401
    'description' => '_MI_XOOPSTUBE_AMDMINPAGEDSC',
402
    'formtype'    => 'select',
403
    'valuetype'   => 'int',
404
    'default'     => 10,
405
    'options'     => array(
406
        '5'   => 5,
407
        '10'  => 10,
408
        '15'  => 15,
409
        '20'  => 20,
410
        '25'  => 25,
411
        '30'  => 30,
412
        '50'  => 50,
413
        '75'  => 75,
414
        '100' => 100
415
    )
416
);
417
418
$qa = ' (A)';
419
$qd = ' (D)';
420
421
$modversion['config'][] = array(
422
    'name'        => 'linkxorder',
423
    'title'       => '_MI_XOOPSTUBE_ARTICLESSORT',
424
    'description' => '_MI_XOOPSTUBE_ARTICLESSORTDSC',
425
    'formtype'    => 'select',
426
    'valuetype'   => 'text',
427
    'default'     => 'title ASC',
428
    'options'     => array(
429
        _MI_XOOPSTUBE_TITLE . $qa      => 'title ASC',
430
        _MI_XOOPSTUBE_TITLE . $qd      => 'title DESC',
431
        _MI_XOOPSTUBE_SUBMITTED2 . $qa => 'published ASC',
432
        _MI_XOOPSTUBE_SUBMITTED2 . $qd => 'published DESC',
433
        _MI_XOOPSTUBE_RATING . $qa     => 'rating ASC',
434
        _MI_XOOPSTUBE_RATING . $qd     => 'rating DESC',
435
        _MI_XOOPSTUBE_POPULARITY . $qa => 'hits ASC',
436
        _MI_XOOPSTUBE_POPULARITY . $qd => 'hits DESC'
437
    )
438
);
439
440
$modversion['config'][] = array(
441
    'name'        => 'sortcats',
442
    'title'       => '_MI_XOOPSTUBE_SORTCATS',
443
    'description' => '_MI_XOOPSTUBE_SORTCATSDSC',
444
    'formtype'    => 'select',
445
    'valuetype'   => 'text',
446
    'default'     => 'title',
447
    'options'     => array(
448
        'Weight' => 'weight',
449
        'Title'  => 'title'
450
    )
451
);
452
453
$modversion['config'][] = array(
454
    'name'        => 'subcats',
455
    'title'       => '_MI_XOOPSTUBE_SUBCATS',
456
    'description' => '_MI_XOOPSTUBE_SUBCATSDSC',
457
    'formtype'    => 'yesno',
458
    'valuetype'   => 'int',
459
    'default'     => 0
460
);
461
462
$modversion['config'][] = array(
463
    'name'        => 'catcolumns',
464
    'title'       => '_MI_XOOPSTUBE_CATCOLUMNS',
465
    'description' => '_MI_XOOPSTUBE_CATCOLUMNSDSC',
466
    'formtype'    => 'select',
467
    'valuetype'   => 'int',
468
    'default'     => 2,
469
    'options'     => array(
470
        '1' => 1,
471
        '2' => 2,
472
        '3' => 3,
473
        '4' => 4,
474
        '5' => 5
475
    )
476
);
477
478
xoops_load('XoopsEditorHandler');
479
$editorHandler = XoopsEditorHandler::getInstance();
480
$editorList    = array_flip($editorHandler->getList());
481
482
$modversion['config'][] = array(
483
    'name'        => 'form_options',
484
    'title'       => '_MI_XOOPSTUBE_EDITOR',
485
    'description' => '_MI_XOOPSTUBE_EDITORCHOICE',
486
    'formtype'    => 'select',
487
    'valuetype'   => 'text',
488
    'options'     => $editorList,
489
    'default'     => 'dhtmltextarea'
490
);
491
492
$modversion['config'][] = array(
493
    'name'        => 'form_optionsuser',
494
    'title'       => '_MI_XOOPSTUBE_EDITORUSER',
495
    'description' => '_MI_XOOPSTUBE_EDITORCHOICEUSER',
496
    'formtype'    => 'select',
497
    'valuetype'   => 'text',
498
    'options'     => $editorList,
499
    'default'     => 'dhtmltextarea'
500
);
501
502
//                                'default'     => 'dhtml'),
503
//                                'default'     => 'dhtmlext'),
504
505
$modversion['config'][] = array(
506
    'name'        => 'screenshot',
507
    'title'       => '_MI_XOOPSTUBE_USESHOTS',
508
    'description' => '_MI_XOOPSTUBE_USESHOTSDSC',
509
    'formtype'    => 'yesno',
510
    'valuetype'   => 'int',
511
    'default'     => 1
512
);
513
514
$modversion['config'][] = array(
515
    'name'        => 'usethumbs',
516
    'title'       => '_MI_XOOPSTUBE_USETHUMBS',
517
    'description' => '_MI_XOOPSTUBE_USETHUMBSDSC',
518
    'formtype'    => 'yesno',
519
    'valuetype'   => 'int',
520
    'default'     => 0
521
);
522
523
$modversion['config'][] = array(
524
    'name'        => 'updatethumbs',
525
    'title'       => '_MI_XOOPSTUBE_IMGUPDATE',
526
    'description' => '_MI_XOOPSTUBE_IMGUPDATEDSC',
527
    'formtype'    => 'yesno',
528
    'valuetype'   => 'int',
529
    'default'     => 1
530
);
531
532
$modversion['config'][] = array(
533
    'name'        => 'shotwidth',
534
    'title'       => '_MI_XOOPSTUBE_SHOTWIDTH',
535
    'description' => '_MI_XOOPSTUBE_SHOTWIDTHDSC',
536
    'formtype'    => 'textbox',
537
    'valuetype'   => 'int',
538
    'default'     => 120
539
);
540
541
$modversion['config'][] = array(
542
    'name'        => 'shotheight',
543
    'title'       => '_MI_XOOPSTUBE_SHOTHEIGHT',
544
    'description' => '_MI_XOOPSTUBE_SHOTHEIGHTDSC',
545
    'formtype'    => 'textbox',
546
    'valuetype'   => 'int',
547
    'default'     => 90
548
);
549
550
$modversion['config'][] = array(
551
    'name'        => 'maxfilesize',
552
    'title'       => '_MI_XOOPSTUBE_MAXFILESIZE',
553
    'description' => '_MI_XOOPSTUBE_MAXFILESIZEDSC',
554
    'formtype'    => 'textbox',
555
    'valuetype'   => 'int',
556
    'default'     => 200000
557
);
558
559
$modversion['config'][] = array(
560
    'name'        => 'maximgwidth',
561
    'title'       => '_MI_XOOPSTUBE_IMGWIDTH',
562
    'description' => '_MI_XOOPSTUBE_IMGWIDTHDSC',
563
    'formtype'    => 'textbox',
564
    'valuetype'   => 'int',
565
    'default'     => 600
566
);
567
568
$modversion['config'][] = array(
569
    'name'        => 'maximgheight',
570
    'title'       => '_MI_XOOPSTUBE_IMGHEIGHT',
571
    'description' => '_MI_XOOPSTUBE_IMGHEIGHTDSC',
572
    'formtype'    => 'textbox',
573
    'valuetype'   => 'int',
574
    'default'     => 600
575
);
576
577
$modversion['config'][] = array(
578
    'name'        => 'imagequality',
579
    'title'       => '_MI_XOOPSTUBE_QUALITY',
580
    'description' => '_MI_XOOPSTUBE_QUALITYDSC',
581
    'formtype'    => 'textbox',
582
    'valuetype'   => 'int',
583
    'default'     => 100
584
);
585
586
$modversion['config'][] = array(
587
    'name'        => 'imageaspect',
588
    'title'       => '_MI_XOOPSTUBE_IMAGEASPECT',
589
    'description' => '_MI_XOOPSTUBE_IMAGEASPECTDSC',
590
    'formtype'    => 'textbox',
591
    'valuetype'   => 'int',
592
    'default'     => 1
593
);
594
595
// Directories -----------------------------------------------
596
$modversion['config'][] = array(
597
    'name'        => 'directiories',
598
    'title'       => '_MI_XOOPSTUBE_PREFERENCES_DIRECTIORIES',
599
    'description' => '',
600
    'formtype'    => 'line_break',
601
    'valuetype'   => 'textbox',
602
    'default'     => 'odd'
603
);
604
605
$modversion['config'][] = array(
606
    'name'        => 'dirmode',
607
    'title'       => '_MI_XOOPSTUBE_PREFERENCES_DIRMODE',
608
    'description' => '_MI_XOOPSTUBE_PREFERENCES_DIRMODE_DESC',
609
    'formtype'    => 'textbox',
610
    'valuetype'   => 'text',
611
    'default'     => '0777'
612
);
613
614
$modversion['config'][] = array(
615
    'name'        => 'mainimagedir',
616
    'title'       => '_MI_XOOPSTUBE_MAINIMGDIR',
617
    'description' => '_MI_XOOPSTUBE_MAINIMGDIRDSC',
618
    'formtype'    => 'textbox',
619
    'valuetype'   => 'text',
620
    'default'     => 'modules/' . $moduleDirName . '/assets/images'
621
);
622
623
$modversion['config'][] = array(
624
    'name'        => 'catimage',
625
    'title'       => '_MI_XOOPSTUBE_CATEGORYIMG',
626
    'description' => '_MI_XOOPSTUBE_CATEGORYIMGDSC',
627
    'formtype'    => 'textbox',
628
    'valuetype'   => 'text',
629
    //'default'  => 'uploads/xt_images/category',
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
630
    'default'     => 'uploads/xoopstube/category'
631
);
632
633
$modversion['config'][] = array(
634
    'name'        => 'videodir',
635
    'title'       => '_MI_XOOPSTUBE_VIDEODIR',
636
    'description' => '_MI_XOOPSTUBE_VIDEODIRDSC',
637
    'formtype'    => 'textbox',
638
    'valuetype'   => 'text',
639
    //'default'  => 'uploads/xt_images/videos',
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
640
    'default'     => 'uploads/xoopstube/videos'
641
);
642
643
$modversion['config'][] = array(
644
    'name'        => 'videoimgdir',
645
    'title'       => '_MI_XOOPSTUBE_VIDEOIMGDIR',
646
    'description' => '_MI_XOOPSTUBE_VIDEOIMGDIRDSC',
647
    'formtype'    => 'textbox',
648
    'valuetype'   => 'text',
649
    //'default'  => 'uploads/xt_images/screenshots',
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% 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...
650
    'default'     => 'uploads/xoopstube/screenshots'
651
);
652
653
// Other -------------------------------------------------
654
$modversion['config'][] = array(
655
    'name'        => 'other',
656
    'title'       => '_MI_XOOPSTUBE_PREFERENCES_OTHERS',
657
    'description' => '',
658
    'formtype'    => 'line_break',
659
    'valuetype'   => 'textbox',
660
    'default'     => 'odd'
661
);
662
663
$modversion['config'][] = array(
664
    'name'        => 'dateformat',
665
    'title'       => '_MI_XOOPSTUBE_DATEFORMAT',
666
    'description' => '_MI_XOOPSTUBE_DATEFORMATDSC',
667
    'formtype'    => 'textbox',
668
    'valuetype'   => 'text',
669
    'default'     => 'D, d-M-Y'
670
);
671
672
$modversion['config'][] = array(
673
    'name'        => 'dateformatadmin',
674
    'title'       => '_MI_XOOPSTUBE_DATEFORMATADMIN',
675
    'description' => '_MI_XOOPSTUBE_DATEFORMATADMINDSC',
676
    'formtype'    => 'textbox',
677
    'valuetype'   => 'text',
678
    'default'     => 'D, d-M-Y - G:i'
679
);
680
681
$modversion['config'][] = array(
682
    'name'        => 'totalchars',
683
    'title'       => '_MI_XOOPSTUBE_TOTALCHARS',
684
    'description' => '_MI_XOOPSTUBE_TOTALCHARSDSC',
685
    'formtype'    => 'select',
686
    'valuetype'   => 'int',
687
    'default'     => 200,
688
    'options'     => array(
689
        '100' => 100,
690
        '200' => 200,
691
        '300' => 300,
692
        '400' => 400,
693
        '500' => 500,
694
        '750' => 750
695
    )
696
);
697
$modversion['config'][] = array(
698
    'name'        => 'autoplay',
699
    'title'       => '_MI_XOOPSTUBE_AUTOPLAY',
700
    'description' => '_MI_XOOPSTUBE_AUTOPLAYDSC',
701
    'formtype'    => 'yesno',
702
    'valuetype'   => 'int',
703
    'default'     => 0
704
);
705
706
$modversion['config'][] = array(
707
    'name'        => 'othervideos',
708
    'title'       => '_MI_XOOPSTUBE_OTHERVIDEOS',
709
    'description' => '_MI_XOOPSTUBE_OTHERVIDEOSDSC',
710
    'formtype'    => 'yesno',
711
    'valuetype'   => 'int',
712
    'default'     => 1
713
);
714
715
$modversion['config'][] = array(
716
    'name'        => 'showsubmitter',
717
    'title'       => '_MI_XOOPSTUBE_SHOWSUBMITTER',
718
    'description' => '_MI_XOOPSTUBE_SHOWSUBMITTERDSC',
719
    'formtype'    => 'yesno',
720
    'valuetype'   => 'int',
721
    'default'     => 1
722
);
723
724
$modversion['config'][] = array(
725
    'name'        => 'showsbookmarks',
726
    'title'       => '_MI_XOOPSTUBE_SHOWSBOOKMARKS',
727
    'description' => '_MI_XOOPSTUBE_SHOWSBOOKMARKSDSC',
728
    'formtype'    => 'yesno',
729
    'valuetype'   => 'int',
730
    'default'     => 1
731
);
732
733
$modversion['config'][] = array(
734
    'name'        => 'usemetadescr',
735
    'title'       => '_MI_XOOPSTUBE_USEMETADESCR',
736
    'description' => '_MI_XOOPSTUBE_USEMETADSC',
737
    'formtype'    => 'yesno',
738
    'valuetype'   => 'int',
739
    'default'     => 1
740
);
741
742
$modversion['config'][] = array(
743
    'name'        => 'usercantag',
744
    'title'       => '_MI_XOOPSTUBE_USERTAGDESCR',
745
    'description' => '_MI_XOOPSTUBE_USERTAGDSC',
746
    'formtype'    => 'yesno',
747
    'valuetype'   => 'int',
748
    'default'     => 0
749
);
750
751
$modversion['config'][] = array(
752
    'name'        => 'showrating',
753
    'title'       => '_MI_XOOPSTUBE_RATINGDISPLAY',
754
    'description' => '_MI_XOOPSTUBE_RATINGDISPLAYDSC',
755
    'formtype'    => 'yesno',
756
    'valuetype'   => 'int',
757
    'default'     => 1
758
);
759
760
$modversion['config'][] = array(
761
    'name'        => 'showdisclaimer',
762
    'title'       => '_MI_XOOPSTUBE_SHOWDISCLAIMER',
763
    'description' => '_MI_XOOPSTUBE_SHOWDISCLAIMERDSC',
764
    'formtype'    => 'yesno',
765
    'valuetype'   => 'int',
766
    'default'     => 0
767
);
768
769
$modversion['config'][] = array(
770
    'name'        => 'disclaimer',
771
    'title'       => '_MI_XOOPSTUBE_DISCLAIMER',
772
    'description' => '_MI_XOOPSTUBE_DISCLAIMERDSC',
773
    'formtype'    => 'textsarea',
774
    'valuetype'   => 'text',
775
    'default'     => 'We have the right, but not the obligation to monitor and review submissions submitted by users, to this website. We shall not be responsible for any of the content of these messages. We further reserve the right, to delete, move or edit submissions that we, in its exclusive discretion, deems abusive, defamatory, obscene or in violation of any Copyright or Trademark laws or otherwise objectionable.'
776
);
777
778
$modversion['config'][] = array(
779
    'name'        => 'showvideodisclaimer',
780
    'title'       => '_MI_XOOPSTUBE_SHOWVIDEODISCL',
781
    'description' => '_MI_XOOPSTUBE_SHOWVIDEODISCLDSC',
782
    'formtype'    => 'yesno',
783
    'valuetype'   => 'int',
784
    'default'     => 0
785
);
786
787
$modversion['config'][] = array(
788
    'name'        => 'videodisclaimer',
789
    'title'       => '_MI_XOOPSTUBE_VIDEODISCLAIMER',
790
    'description' => '_MI_XOOPSTUBE_VIDEODISCLAIMERDSC',
791
    'formtype'    => 'textsarea',
792
    'valuetype'   => 'text',
793
    'default'     => 'The videos on this site are provided as is without warranty either expressed or implied. If you have a question concerning a particular piece video, feel free to contact the administrator of this website.<br><br>Contact us if you have questions concerning this disclaimer.'
794
);
795
796
$modversion['config'][] = array(
797
    'name'        => 'copyright',
798
    'title'       => '_MI_XOOPSTUBE_COPYRIGHT',
799
    'description' => '_MI_XOOPSTUBE_COPYRIGHTDSC',
800
    'formtype'    => 'yesno',
801
    'valuetype'   => 'int',
802
    'default'     => 1
803
);
804
805
// ------------------- Notification ------------------- //
806
$modversion['config'][] = array(
807
    'name'        => 'notifications',
808
    'title'       => '_MI_XOOPSTUBE_PREFERENCES_COMMENTS',
809
    'description' => '',
810
    'formtype'    => 'line_break',
811
    'valuetype'   => 'textbox',
812
    'default'     => 'odd'
813
);
814
815
$modversion['hasNotification']             = 1;
816
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
817
$modversion['notification']['lookup_func'] = 'xtubeNotifyIteminfo';
818
819
$modversion['notification']['category'][] = array(
820
    'name'           => 'global',
821
    'title'          => _MI_XOOPSTUBE_GLOBAL_NOTIFY,
822
    'description'    => _MI_XOOPSTUBE_GLOBAL_NOTIFYDSC,
823
    'subscribe_from' => array('index.php', 'viewcat.php', 'singlevideo.php')
824
);
825
826
$modversion['notification']['category'][] = array(
827
    'name'           => 'category',
828
    'title'          => _MI_XOOPSTUBE_CATEGORY_NOTIFY,
829
    'description'    => _MI_XOOPSTUBE_CATEGORY_NOTIFYDSC,
830
    'subscribe_from' => array('viewcat.php', 'singlevideo.php'),
831
    'item_name'      => 'cid',
832
    'allow_bookmark' => 1
833
);
834
835
$modversion['notification']['category'][] = array(
836
    'name'           => 'video',
837
    'title'          => _MI_XOOPSTUBE_VIDEO_NOTIFY,
838
    'description'    => _MI_XOOPSTUBE_FILE_NOTIFYDSC,
839
    'subscribe_from' => 'singlevideo.php',
840
    'item_name'      => 'lid',
841
    'allow_bookmark' => 1
842
);
843
844
$modversion['notification']['event'][] = array(
845
    'name'          => 'new_category',
846
    'category'      => 'global',
847
    'title'         => _MI_XOOPSTUBE_GLOBAL_NEWCATEGORY_NOTIFY,
848
    'caption'       => _MI_XOOPSTUBE_GLOBAL_NEWCATEGORY_NOTIFYCAP,
849
    'description'   => _MI_XOOPSTUBE_GLOBAL_NEWCATEGORY_NOTIFYDSC,
850
    'mail_template' => 'global_newcategory_notify',
851
    'mail_subject'  => _MI_XOOPSTUBE_GLOBAL_NEWCATEGORY_NOTIFYSBJ
852
);
853
854
$modversion['notification']['event'][] = array(
855
    'name'           => 'video_modify',
856
    'category'       => 'global',
857
    'admin_only'     => 1,
858
    'title'          => _MI_XOOPSTUBE_GLOBAL_VIDEOMODIFY_NOTIFY,
859
    'caption'        => _MI_XOOPSTUBE_GLOBAL_VIDEOMODIFY_NOTIFYCAP,
860
    'description'    => _MI_XOOPSTUBE_GLOBAL_VIDEOMODIFY_NOTIFYDSC,
861
    'mail_template'  => 'global_videomodify_notify',
862
    'mail_subject] ' => _MI_XOOPSTUBE_GLOBAL_VIDEOMODIFY_NOTIFYSBJ
863
);
864
865
$modversion['notification']['event'][] = array(
866
    'name'          => 'video_broken',
867
    'category'      => 'global',
868
    'admin_only'    => 1,
869
    'title'         => _MI_XOOPSTUBE_GLOBAL_VIDEOBROKEN_NOTIFY,
870
    'caption'       => _MI_XOOPSTUBE_GLOBAL_VIDEOBROKEN_NOTIFYCAP,
871
    'description'   => _MI_XOOPSTUBE_GLOBAL_VIDEOBROKEN_NOTIFYDSC,
872
    'mail_template' => 'global_videobroken_notify',
873
    'mail_subject'  => _MI_XOOPSTUBE_GLOBAL_VIDEOBROKEN_NOTIFYSBJ
874
);
875
876
$modversion['notification']['event'][] = array(
877
    'name'          => 'video_submit',
878
    'category'      => 'global',
879
    'admin_only'    => 1,
880
    'title'         => _MI_XOOPSTUBE_GLOBAL_VIDEOSUBMIT_NOTIFY,
881
    'caption'       => _MI_XOOPSTUBE_GLOBAL_VIDEOSUBMIT_NOTIFYCAP,
882
    'description'   => _MI_XOOPSTUBE_GLOBAL_VIDEOSUBMIT_NOTIFYDSC,
883
    'mail_template' => 'global_videosubmit_notify',
884
    'mail_subject'  => _MI_XOOPSTUBE_GLOBAL_VIDEOSUBMIT_NOTIFYSBJ
885
);
886
887
$modversion['notification']['event'][] = array(
888
    'name'          => 'new_video',
889
    'category'      => 'global',
890
    'title'         => _MI_XOOPSTUBE_GLOBAL_NEWVIDEO_NOTIFY,
891
    'caption'       => _MI_XOOPSTUBE_GLOBAL_NEWVIDEO_NOTIFYCAP,
892
    'description'   => _MI_XOOPSTUBE_GLOBAL_NEWVIDEO_NOTIFYDSC,
893
    'mail_template' => 'global_newfile_notify',
894
    'mail_subject'  => _MI_XOOPSTUBE_GLOBAL_NEWVIDEO_NOTIFYSBJ
895
);
896
897
$modversion['notification']['event'][] = array(
898
    'name'          => 'video_submit',
899
    'category'      => 'category',
900
    'admin_only'    => 1,
901
    'title'         => _MI_XOOPSTUBE_CATEGORY_FILESUBMIT_NOTIFY,
902
    'caption'       => _MI_XOOPSTUBE_CATEGORY_FILESUBMIT_NOTIFYCAP,
903
    'description'   => _MI_XOOPSTUBE_CATEGORY_FILESUBMIT_NOTIFYDSC,
904
    'mail_template' => 'category_videosubmit_notify',
905
    'mail_subject'  => _MI_XOOPSTUBE_CATEGORY_FILESUBMIT_NOTIFYSBJ
906
);
907
908
$modversion['notification']['event'][] = array(
909
    'name'          => 'new_video',
910
    'category'      => 'category',
911
    'title'         => _MI_XOOPSTUBE_CATEGORY_NEWVIDEO_NOTIFY,
912
    'caption'       => _MI_XOOPSTUBE_CATEGORY_NEWVIDEO_NOTIFYCAP,
913
    'description'   => _MI_XOOPSTUBE_CATEGORY_NEWVIDEO_NOTIFYDSC,
914
    'mail_template' => 'category_newfile_notify',
915
    'mail_subject'  => _MI_XOOPSTUBE_CATEGORY_NEWVIDEO_NOTIFYSBJ
916
);
917
918
$modversion['notification']['event'][] = array(
919
    'name'          => 'approve',
920
    'category'      => 'video',
921
    'invisible'     => 1,
922
    'title'         => _MI_XOOPSTUBE_VIDEO_APPROVE_NOTIFY,
923
    'caption'       => _MI_XOOPSTUBE_VIDEO_APPROVE_NOTIFYCAP,
924
    'description'   => _MI_XOOPSTUBE_VIDEO_APPROVE_NOTIFYDSC,
925
    'mail_template' => 'video_approve_notify',
926
    'mail_subject'  => _MI_XOOPSTUBE_VIDEO_APPROVE_NOTIFYSBJ
927
);
928
// On Update
929
//if (!empty($_POST['fct']) && !empty($_POST['op']) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok'
930
//    && $_POST['dirname'] == $modversion['dirname']
931
//) {
932
//    include __DIR__ . '/include/onupdate.inc.php';
933
//}
934
935