Completed
Branch master (ddc2b8)
by Michael
02:46
created

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