wklejto.pl

Dodane przez: ~alkesz1718 (2021-01-18 01:20) -> xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
318.
319.
320.
321.
322.
323.
324.
325.
326.
327.
328.
329.
330.
331.
332.
333.
334.
335.
336.
337.
338.
339.
340.
341.
342.
343.
344.
345.
346.
347.
348.
349.
350.
351.
352.
353.
354.
355.
356.
357.
358.
359.
360.
361.
362.
363.
364.
365.
366.
367.
368.
369.
370.
371.
372.
373.
374.
375.
376.
377.
378.
379.
380.
381.
382.
383.
384.
385.
386.
387.
388.
389.
390.
391.
392.
393.
394.
395.
396.
397.
398.
399.
400.
401.
402.
403.
404.
405.
406.
407.
408.
409.
410.
411.
412.
413.
414.
415.
416.
417.
418.
419.
420.
421.
422.
423.
424.
425.
426.
427.
428.
429.
430.
431.
432.
433.
434.
435.
436.
437.
438.
439.
440.
441.
442.
443.
444.
445.
446.
447.
448.
449.
450.
451.
452.
453.
454.
455.
456.
457.
458.
459.
460.
461.
462.
463.
464.
465.
466.
467.
468.
469.
470.
471.
472.
473.
474.
475.
476.
477.
478.
479.
480.
481.
482.
483.
484.
485.
486.
487.
488.
489.
490.
491.
492.
493.
494.
495.
496.
497.
498.
499.
500.
501.
502.
503.
504.
505.
506.
507.
508.
509.
510.
511.
512.
513.
514.
515.
516.
517.
518.
519.
520.
521.
522.
523.
524.
525.
526.
527.
528.
529.
530.
531.
532.
533.
534.
535.
536.
537.
538.
539.
540.
541.
542.
543.
544.
545.
546.
547.
548.
549.
550.
551.
552.
553.
554.
555.
556.
557.
558.
559.
560.
561.
562.
563.
564.
565.
566.
567.
568.
569.
570.
571.
572.
573.
574.
575.
576.
577.
578.
579.
580.
581.
582.
583.
584.
585.
586.
587.
588.
589.
590.
591.
592.
593.
594.
595.
596.
597.
598.
599.
600.
601.
602.
603.
604.
605.
606.
607.
608.
609.
610.
611.
612.
613.
614.
615.
616.
617.
618.
619.
620.
621.
622.
623.
624.
625.
626.
627.
628.
629.
630.
631.
632.
633.
634.
635.
636.
637.
638.
639.
640.
641.
642.
643.
644.
645.
646.
647.
648.
649.
650.
651.
652.
653.
654.
655.
656.
657.
658.
659.
660.
661.
662.
663.
664.
665.
666.
667.
668.
669.
670.
671.
672.
673.
674.
675.
676.
677.
678.
679.
680.
681.
682.
683.
684.
685.
686.
687.
688.
689.
690.
691.
692.
693.
694.
695.
696.
697.
698.
699.
700.
701.
702.
703.
704.
705.
706.
707.
708.
709.
710.
711.
712.
713.
714.
715.
716.
717.
718.
719.
720.
721.
722.
723.
724.
725.
726.
727.
728.
729.
730.
731.
732.
733.
734.
735.
736.
737.
738.
739.
740.
741.
742.
743.
744.
745.
746.
747.
748.
749.
750.
751.
752.
753.
754.
755.
756.
757.
758.
759.
760.
761.
762.
763.
764.
765.
766.
767.
768.
769.
770.
771.
772.
773.
774.
775.
776.
777.
778.
779.
780.
781.
782.
783.
784.
785.
786.
787.
788.
789.
790.
791.
792.
793.
794.
795.
796.
797.
798.
799.
800.
801.
802.
803.
804.
805.
806.
807.
808.
809.
810.
811.
812.
813.
814.
815.
816.
817.
818.
819.
820.
821.
822.
823.
824.
825.
826.
827.
828.
829.
830.
831.
832.
833.
834.
835.
836.
837.
838.
839.
840.
841.
842.
843.
844.
845.
846.
847.
848.
849.
850.
851.
852.
853.
854.
855.
856.
857.
858.
859.
860.
861.
862.
863.
864.
865.
866.
867.
868.
<?xml version="1.0" encoding="utf-8"?>
<dleplugin>
        <name>Forum 2.7.1 Rev.1</name>
        <description>Forum configuration</description>
        <icon>engine/skins/images/forum.png</icon>
        <version>1.0</version>
        <dleversion>13.3</dleversion>
        <versioncompare>greater</versioncompare>
        <upgradeurl></upgradeurl>
        <filedelete>0</filedelete>
        <needplugin></needplugin>
        <mnotice>0</mnotice>
        <mysqlinstall><![CDATA[CREATE TABLE {prefix}_forum_forums (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `parentid` int(11) NOT NULL default '0',
    `is_category` TINYINT(1) NOT NULL default '0',
    `alt_name` varchar(50) NOT NULL default '',
    `topics` mediumint(6) NOT NULL default '0',
    `posts` mediumint(6) NOT NULL default '0',
    `name` varchar(128) NOT NULL default '',
    `description` text NOT NULL,
    `position` tinyint(3) NOT NULL default '0',
    `status` tinyint(1) NOT NULL default '1',
    `access_read` varchar(150) NOT NULL default '',
    `access_write` varchar(150) NOT NULL default '',
    `access_mod` varchar(150) NOT NULL default '',
    `access_topic` varchar(150) NOT NULL default '',
    `access_upload` varchar(150) NOT NULL default '',
    `access_download` varchar(150) NOT NULL default '',
    `f_last_tid` smallint(5) NOT NULL default '0',
    `f_last_title` varchar(70) NOT NULL default '',
    `f_last_date` datetime NOT NULL default '0000-00-00 00:00:00',
    `f_last_poster_name` varchar(40) NOT NULL default '',
    `password` varchar(32) NOT NULL default '',
    `rules_title` varchar(128) NOT NULL default '',
    `rules` text NOT NULL,
    `icon` varchar(40) NOT NULL default '',
    `moderators` varchar(150) NOT NULL default '',
    `postcount` tinyint(1) NOT NULL default '1',
    `fixpost` tinyint(1) NOT NULL default '0',
    `last_post_id` int(11) NOT NULL default '0',
    `banner` text NOT NULL,
    `q_reply` tinyint(1) NOT NULL default '1',
    `i_edit` tinyint(1) NOT NULL default '0',
    `redirect` varchar(250) NOT NULL default '',
    PRIMARY KEY  (`id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_topics (
        `tid` int(11) NOT NULL AUTO_INCREMENT,
        `forum_id` int(11) NOT NULL default '0',
    `alt_name` varchar(200) NOT NULL default '',
        `title` varchar(70) NOT NULL default '',
        `topic_descr` varchar(70) NOT NULL default '',
        `icon` varchar(20) default '0',
        `post` int(11) NOT NULL default '0',
        `views` int(11) NOT NULL default '0',
        `author_topic` varchar(40) NOT NULL default '',
        `start_date` datetime NOT NULL default '0000-00-00 00:00:00',
        `last_date` datetime NOT NULL default '0000-00-00 00:00:00',
        `last_poster_name` varchar(40) NOT NULL default '',
        `topic_status` int(1) NOT NULL default '0',
        `hidden` int(1) NOT NULL default '0',
        `fixed` int(1) NOT NULL default '1',
        `poll_title` varchar(200) NOT NULL default '',
        `frage` varchar(200) NOT NULL default '',
        `poll_body` text NOT NULL,
        `poll_count` mediumint(8) NOT NULL default '0',
        `answer` varchar(150) NOT NULL default '',
        `multiple` tinyint(1) NOT NULL default '0',
        `meta_descr` varchar(200) default NULL,
        `meta_keywords` text,
        `first_post` int(11) NOT NULL default '0',
    `last_post_id` int(11) NOT NULL default '0',
        PRIMARY KEY  (`tid`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
 
CREATE TABLE {prefix}_forum_posts (
        `pid` int(11) NOT NULL AUTO_INCREMENT,
        `topic_id` int(11) NOT NULL default '0',
        `post_date` datetime NOT NULL default '0000-00-00 00:00:00',
        `post_author` varchar(40) NOT NULL default '',
        `post_text` text NOT NULL,
        `post_ip` varchar(16) NOT NULL default '',
        `is_register` tinyint(1) NOT NULL default '0',
        `e_mail` varchar(40) NOT NULL default '',
        `edit_user` varchar(40) NOT NULL default '0',
        `edit_time` int(10) NOT NULL default '0',
        `hidden` tinyint(1) NOT NULL default '0',
        `wysiwyg` tinyint(1) default '0',
        `is_count` tinyint(1) NOT NULL default '1',
        PRIMARY KEY  (`pid`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
 
CREATE TABLE {prefix}_forum_email (
        `id` int(11) NOT NULL default '0',
        `name` varchar(40) NOT NULL default '',
        `template` text NOT NULL,
        PRIMARY KEY  (`id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_files (
        `file_id` int(11) NOT NULL AUTO_INCREMENT,
        `file_type` varchar(10) NOT NULL default '',
        `forum_id` int(11) NOT NULL default '0',
        `topic_id` int(11) NOT NULL default '0',
        `post_id` int(11) NOT NULL default '0',
        `file_attach` tinyint(1) NOT NULL default '0',
        `file_name` varchar(250) NOT NULL default '',
        `onserver` varchar(250) NOT NULL default '',
        `file_author` varchar(40) NOT NULL default '',
        `file_date` int(10) NOT NULL default '0',
        `file_size` int(11) NOT NULL default '0',
        `dcount` int(11) NOT NULL default '0',
        PRIMARY KEY  (`file_id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_groups (
        `group_id` int(11) NOT NULL default '0',
        `group_colour` varchar(40) NOT NULL default '',
        `offline` tinyint(1) NOT NULL default '0',
        `post_edit` tinyint(1) NOT NULL default '0',
        `post_del` tinyint(1) NOT NULL default '0',
        `topic_set` tinyint(1) NOT NULL default '0',
        `topic_edit` tinyint(1) NOT NULL default '0',
        `topic_del` tinyint(1) NOT NULL default '0',
        `vote` tinyint(1) NOT NULL default '0',
        `flood` char(1) NOT NULL default '0',
        `html` tinyint(1) NOT NULL default '0',
        `filter` tinyint(1) NOT NULL default '0',
    `youtube` tinyint(1) NOT NULL default '0',
    `flash` tinyint(1) NOT NULL default '0',
        KEY `group_id` (`group_id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_poll_log (
        `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `topic_id` int(10) unsigned NOT NULL default '0',
        `member` varchar(30) NOT NULL default '',
        PRIMARY KEY  (`id`),
        KEY `news_id` (`topic_id`,`member`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_reputation_log (
        `rid` int(11) NOT NULL AUTO_INCREMENT,
        `mid` varchar(8) NOT NULL default '0',
        `author` varchar(40) NOT NULL,
        `action` char(1) NOT NULL,
        `cause` text NOT NULL,
        `date` int(10) NOT NULL default '0',
        PRIMARY KEY  (`rid`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_sessions (
        `id` varchar(60) NOT NULL default '0',
        `member_name` varchar(64) NOT NULL default '',
        `user_group` int(11) NOT NULL default '5',
        `member_id` mediumint(8) NOT NULL default '0',
        `ip` varchar(16) NOT NULL default '',
        `browser` varchar(200) NOT NULL default '',
        `running_time` int(10) NOT NULL default '0',
        `location` varchar(40) NOT NULL default '',
        `act_index` int(10) NOT NULL default '0',
        `act_forum` int(10) NOT NULL default '0',
        `act_topic` int(10) NOT NULL default '0',
        PRIMARY KEY  (`id`),
        KEY `act_topic` (`act_topic`),
        KEY `act_forum` (`act_forum`),
        KEY `act_index` (`act_index`),
        KEY `running_time` (`running_time`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_subscription (
        `sid` int(11) NOT NULL AUTO_INCREMENT,
        `user_id` mediumint(8) NOT NULL default '0',
        `topic_id` int(10) NOT NULL default '0',
        PRIMARY KEY  (`sid`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_titles (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `posts` int(11) NOT NULL default '0',
        `title` varchar(128) NOT NULL default '',
        `pips` varchar(128) NOT NULL default '',
        KEY `id` (`id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_views (
        `topic_id` int(11) NOT NULL default '0',
        `forum_id` int(11) NOT NULL default '0',
        `user_id` mediumint(8) NOT NULL default '0',
        `time` int(11) default NULL
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_warn_log (
        `wid` int(11) NOT NULL AUTO_INCREMENT,
        `mid` varchar(8) NOT NULL default '0',
        `author` varchar(40) NOT NULL,
        `action` char(1) NOT NULL,
        `cause` text NOT NULL,
        `date` int(10) NOT NULL default '0',
        PRIMARY KEY  (`wid`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
        
CREATE TABLE {prefix}_forum_moderators (
        `mid` mediumint(8) NOT NULL AUTO_INCREMENT,
        `forum_id` int(11) NOT NULL default '0',
        `member_name` varchar(32) NOT NULL default '',
        `member_id` mediumint(8) NOT NULL default '0',
        `edit_post` tinyint(1) default NULL,
        `edit_topic` tinyint(1) default NULL,
        `delete_post` tinyint(1) default NULL,
        `delete_topic` tinyint(1) default NULL,
        `open_topic` tinyint(1) default NULL,
        `close_topic` tinyint(1) default NULL,
        `mass_prune` tinyint(1) default NULL,
        `move_topic` tinyint(1) default NULL,
        `pin_topic` tinyint(1) default NULL,
        `unpin_topic` tinyint(1) default NULL,
        `allow_warn` tinyint(1) default NULL,
        `is_group` tinyint(1) default '0',
        `group_id` smallint(3) default NULL,
    `combining_post` tinyint(1) default NULL,
    `move_post` tinyint(1) default NULL,
    `banned` tinyint(1) default NULL,
    `read_mode` tinyint(1) default NULL,
        PRIMARY KEY  (`mid`),
        KEY `forum_id` (`forum_id`),
        KEY `group_id` (`group_id`),
        KEY `member_id` (`member_id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
                
CREATE TABLE {prefix}_forum_faq (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `type` set('categ','item') NOT NULL DEFAULT 'item',
  `question` text NOT NULL,
  `answer` text NOT NULL,
  `flag` set('0','1','2','3') NOT NULL DEFAULT '1',
  `categ` int(10) NOT NULL DEFAULT '0',
  `order` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
  ) ENGINE={engine} DEFAULT CHARSET={charset};
  
INSERT INTO {prefix}_forum_groups VALUES (1, 'red', 1, 1, 1, 1, 1, 1, 1, '0', 0, 0, 1, 1);
        
INSERT INTO {prefix}_forum_groups VALUES (2, 'blue', 0, 1, 1, 1, 1, 1, 1, '0', 0, 0, 0, 0);
        
INSERT INTO {prefix}_forum_groups VALUES (3, '', 0, 1, 1, 1, 0, 0, 1, '1', 0, 1, 0, 0);
        
INSERT INTO {prefix}_forum_groups VALUES (4, '', 0, 1, 1, 0, 0, 0, 1, '1', 0, 1, 0, 0);
        
INSERT INTO {prefix}_forum_groups VALUES (5, '', 0, 0, 0, 0, 0, 0, 0, '0', 0, 0, 0, 0);
        
INSERT INTO {prefix}_forum_moderators VALUES (1, 0, '', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1);
        
INSERT INTO {prefix}_forum_moderators VALUES (2, 0, '', 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 0, 0, 0);
        
INSERT INTO {prefix}_forum_moderators VALUES (3, 0, '', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0);
        
INSERT INTO {prefix}_forum_moderators VALUES (4, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0);
        
INSERT INTO {prefix}_forum_moderators VALUES (5, 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0);  
 
ALTER TABLE {prefix}_users ADD `forum_post` SMALLINT( 5 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_warn` SMALLINT( 5 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_update` VARCHAR( 20 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_rank` VARCHAR( 40 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_pips` SMALLINT( 2 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_reputation` SMALLINT( 5 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_last` VARCHAR( 20 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_users ADD `forum_time` VARCHAR( 20 ) DEFAULT '0' NOT NULL;
    
ALTER TABLE {prefix}_users ADD `forum_read` VARCHAR( 20 ) NOT NULL;
        
ALTER TABLE {prefix}_post ADD `news_tid` SMALLINT( 5 ) DEFAULT '0' NOT NULL;
        
ALTER TABLE {prefix}_category ADD `forum_id` SMALLINT( 5 ) DEFAULT '0' NOT NULL;]]></mysqlinstall>
        <mysqlupgrade><![CDATA[]]></mysqlupgrade>
        <mysqlenable><![CDATA[]]></mysqlenable>
        <mysqldisable><![CDATA[]]></mysqldisable>
        <mysqldelete><![CDATA[DELETE FROM `{prefix}_admin_sections` WHERE `name`='forum';
ALTER TABLE `{prefix}_users` DROP `forum_post`, DROP `forum_warn`, DROP `forum_update`, DROP `forum_rank`, DROP `forum_pips`, DROP `forum_reputation`, DROP `forum_last`, DROP `forum_time`, DROP `forum_read`;
ALTER TABLE `{prefix}_post` DROP `news_tid`;
ALTER TABLE `{prefix}_category` DROP `forum_id`; 
DROP TABLE IF EXISTS {prefix}_forum_forums;
DROP TABLE IF EXISTS {prefix}_forum_topics;
DROP TABLE IF EXISTS {prefix}_forum_posts;
DROP TABLE IF EXISTS {prefix}_forum_email;
DROP TABLE IF EXISTS {prefix}_forum_files;
DROP TABLE IF EXISTS {prefix}_forum_groups;
DROP TABLE IF EXISTS {prefix}_forum_poll_log;
DROP TABLE IF EXISTS {prefix}_forum_reputation_log;
DROP TABLE IF EXISTS {prefix}_forum_sessions;
DROP TABLE IF EXISTS {prefix}_forum_subscription;
DROP TABLE IF EXISTS {prefix}_forum_titles;
DROP TABLE IF EXISTS {prefix}_forum_views;
DROP TABLE IF EXISTS {prefix}_forum_warn_log;
DROP TABLE IF EXISTS {prefix}_forum_moderators;
DROP TABLE IF EXISTS {prefix}_forum_faq;]]></mysqldelete>
        <phpinstall><![CDATA[define('ROOT_DIR', dirname (__FILE__));
 
require_once(ROOT_DIR.'/engine/data/config.php');
require_once(ROOT_DIR.'/engine/forum/language/'.$config['langs'].'/install.lng');
require_once(ROOT_DIR.'/engine/inc/include/functions.inc.php'); 
 
$edit_files = array
        (               array
                (
                        'open' => ROOT_DIR.'/.htaccess',
                        'key'  => 'DLE-Forum',
                        'find' => 'DirectoryIndex index.php',
                        'replace'  => 'DirectoryIndex index.php index.php?do=forum',
                ),
                
                array
                (
                        'open' => ROOT_DIR.'/.htaccess',
                        'key'  => 'DLE-Forum',
                        'find' => 'RewriteEngine On',
                        'add'  => '
                        # DLE Forum
RewriteRule ^forum(/?)+$ index.php?do=forum [L]
RewriteRule ^forum/category_([0-9]+)(/?)+$ index.php?do=forum&category=$1 [L]
RewriteRule ^forum/forum_([0-9]+)(/?)+$ index.php?do=forum&showforum=$1 [L]
RewriteRule ^forum/forum_([0-9]+)/([0-9]+)(/?)+$ index.php?do=forum&showforum=$1&cstart=$2 [L]
RewriteRule ^forum/topic_([0-9]+)(/?)+$ index.php?do=forum&showtopic=$1 [L]
RewriteRule ^forum/topic_([0-9]+)/last(/?)+$ index.php?do=forum&showtopic=$1&lastpost=1 [L]
RewriteRule ^forum/topic_([0-9]+)/lastpost(/?)+$ index.php?do=forum&showtopic=$1&lastpost=$2#post-$3 [L]
RewriteRule ^forum/topic_([0-9]+)/([0-9]+)(/?)+$ index.php?do=forum&showtopic=$1&cstart=$2 [L]
RewriteRule ^forum/topic_([0-9]+)/reply(/?)+$ index.php?do=forum&act=_topic&code=reply&tid=$1 [L]
RewriteRule ^forum/forum_([0-9]+)/add(/?)+$ index.php?do=forum&act=add_topic&forum_id=$1 [L]
RewriteRule ^forum/search(/?)+$ index.php?do=forum&act=search [L]
RewriteRule ^forum/search/([0-9]+)-([^/]+)/([0-9]+)(/?)+$ index.php?do=forum&act=search&count_all=$1&search_text=$2&cstart=$3 [L]
RewriteRule ^forum/subscription(/?)+$ index.php?do=forum&act=subscription [L]
RewriteRule ^forum/getnew(/?)+$ index.php?do=forum&act=getnew [L]
RewriteRule ^forum/getnew/([0-9]+)(/?)+$ index.php?do=forum&act=getnew&cstart=$1 [L]
RewriteRule ^forum/warn/([^/]*)(/?)+$ index.php?do=forum&act=warn&user=$1 [L]
RewriteRule ^forum/warn/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&act=warn&user=$1&cstart=$2 [L]
RewriteRule ^forum/reputation/([^/]*)(/?)+$ index.php?do=forum&act=reputation&user=$1 [L]
RewriteRule ^forum/reputation/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&act=reputation&user=$1&cstart=$2 [L]
RewriteRule ^forum/textversion.html$ index.php?do=forum&act=textversion [L]
RewriteRule ^forum/whoonline(/?)+$ index.php?do=forum&act=whoonline [L]
RewriteRule ^forum/faq(/?)+$ index.php?do=forum&act=faq [L]
',
                ),
        );
 
foreach ($edit_files as $file)
                                {
                                        $file_edit = file_get_contents($file['open']);
                                        
                                        if (!preg_match('/$file[key]/', $file_edit))
                                        {
                                                $new_file = str_replace($file['find'], $file['before'].(($file['replace']!="")?$file['replace']:$file['find'])."\n".$file['add'], $file_edit);
                                                
                                                $fd = @fopen($file['open'], "w+");
                                                fwrite($fd, $new_file);
                                                fclose($fd);
                                                chmod($file['open'], 0644);
                                        }
                                }
 
$url = $config['http_home_url'];
 
$_TIME = time() + ($config['date_adjust'] * 60);
 
$topic_date = date ("Y-m-d H:i:s", $_TIME);     
 
        
        if( version_compare($check_db->mysql_version, '5.6.4', '>=') ) {
                $storage_engine = "MyISAM";
        } else $storage_engine = "InnoDB";
 
$tableSchema = array();
 
$admin_sections = $db->safesql($f_install['mtinstall_05']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_admin_sections (name, title, descr, icon, allow_groups) VALUES('forum', 'Dle-Forum 2.7', '{$admin_sections}', 'dle_forum.png', '1');";
 
$faq_categ1 = $db->safesql($f_install['faq_categ1']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (1, 'categ', '{$faq_categ1}', '', '1', 0, 1);";
$faq_categ2 = $db->safesql($f_install['faq_categ2']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (2, 'categ', '{$faq_categ2}', '', '1', 0, 2);";
$faq_categ3 = $db->safesql($f_install['faq_categ3']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (3, 'categ', '{$faq_categ3}', '', '1', 0, 3);";
$faq_categ4 = $db->safesql($f_install['faq_categ4']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (4, 'categ', '{$faq_categ4}', '', '1', 0, 4);";
$faq_item1 = $db->safesql($f_install['faq_item1']);
$faq_item2 = $db->safesql($f_install['faq_item2']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (5, 'item', '» {$faq_item1}', '{$faq_item2}', '3', 1, 1);";
$faq_item3 = $db->safesql($f_install['faq_item3']);
$faq_item4 = $db->safesql($f_install['faq_item4']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (6, 'item', '» {$faq_item3}', '{$faq_item4}', '1', 1, 2);";
$faq_item5 = $db->safesql($f_install['faq_item5']);
$faq_item6 = $db->safesql($f_install['faq_item6']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (7, 'item', '» {$faq_item5}', '{$faq_item6}', '1', 1, 3);";
$faq_item7 = $db->safesql($f_install['faq_item7']);
$faq_item8 = $db->safesql($f_install['faq_item8']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (8, 'item', '» {$faq_item7}', '{$faq_item8}', '1', 2, 4);";
$faq_item9 = $db->safesql($f_install['faq_item9']);
$faq_item10 = $db->safesql($f_install['faq_item10']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (9, 'item', '» {$faq_item9}', '{$faq_item10}', '1', 1, 5);";
$faq_item11 = $db->safesql($f_install['faq_item11']);
$faq_item12 = $db->safesql($f_install['faq_item12']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (10, 'item', '» {$faq_item11}', '{$faq_item12}', '1', 1, 6);";
$faq_item13 = $db->safesql($f_install['faq_item13']);
$faq_item14 = $db->safesql($f_install['faq_item14']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (11, 'item', '» {$faq_item13}', '{$faq_item14}', '1', 1, 7);";
$faq_item15 = $db->safesql($f_install['faq_item15']);
$faq_item16 = $db->safesql($f_install['faq_item16']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (12, 'item', '» {$faq_item15}', '{$faq_item16}', '1', 2, 1);";
$faq_item17 = $db->safesql($f_install['faq_item17']);
$faq_item18 = $db->safesql($f_install['faq_item18']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (13, 'item', '» {$faq_item17}', '{$faq_item18}', '1', 2, 2);";
$faq_item19 = $db->safesql($f_install['faq_item19']);
$faq_item20 = $db->safesql($f_install['faq_item20']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (14, 'item', '» {$faq_item19}', '{$faq_item20}', '1', 2, 4);";
$faq_item21 = $db->safesql($f_install['faq_item21']);
$faq_item22 = $db->safesql($f_install['faq_item22']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (15, 'item', '» {$faq_item21}', '{$faq_item22}', '1', 2, 1);";
$faq_item23 = $db->safesql($f_install['faq_item23']);
$faq_item24 = $db->safesql($f_install['faq_item24']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (16, 'item', '» {$faq_item23}', '{$faq_item24}', '2', 3, 4);";
$faq_item25 = $db->safesql($f_install['faq_item25']);
$faq_item26 = $db->safesql($f_install['faq_item26']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (17, 'item', '» {$faq_item25}', '{$faq_item26}', '3', 3, 5);";
$faq_item27 = $db->safesql($f_install['faq_item27']);
$faq_item28 = $db->safesql($f_install['faq_item28']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (18, 'item', '» {$faq_item27}', '{$faq_item28}', '1', 3, 1);";
$faq_item29 = $db->safesql($f_install['faq_item29']);
$faq_item30 = $db->safesql($f_install['faq_item30']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (19, 'item', '» {$faq_item29}', '{$faq_item30}', '1', 3, 2);";
$faq_item31 = $db->safesql($f_install['faq_item31']);
$faq_item32 = $db->safesql($f_install['faq_item32']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (20, 'item', '» {$faq_item31}', '{$faq_item32}', '3', 3, 3);";
$faq_item33 = $db->safesql($f_install['faq_item33']);
$faq_item34 = $db->safesql($f_install['faq_item34']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (21, 'item', '» {$faq_item33}', '{$faq_item34}', '1', 4, 1);";
$faq_item35 = $db->safesql($f_install['faq_item35']);
$faq_item36 = $db->safesql($f_install['faq_item36']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (22, 'item', '» {$faq_item35}', '{$faq_item36}', '1', 4, 2);";
$faq_item37 = $db->safesql($f_install['faq_item37']);
$faq_item38 = $db->safesql($f_install['faq_item38']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (23, 'item', '» {$faq_item37}', '{$faq_item38}', '2', 4, 3);";
$faq_item39 = $db->safesql($f_install['faq_item39']);
$faq_item40 = $db->safesql($f_install['faq_item40']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (24, 'item', '» {$faq_item39}', '{$faq_item40}', '1', 4, 4);";
$faq_item41 = $db->safesql($f_install['faq_item41']);
$faq_item42 = $db->safesql($f_install['faq_item42']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (25, 'item', '»  {$faq_item41}', '{$faq_item42}', '1', 4, 5);";
$faq_item43 = $db->safesql($f_install['faq_item43']);
$faq_item44 = $db->safesql($f_install['faq_item44']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (26, 'item', '» {$faq_item43}', '{$faq_item44}', '1', 4, 6);";
$faq_item45 = $db->safesql($f_install['faq_item45']);
$faq_item46 = $db->safesql($f_install['faq_item46']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (27, 'item', '» {$faq_item45}', '{$faq_item46}', '1', 4, 7);";
$faq_item47 = $db->safesql($f_install['faq_item47']);
$faq_item48 = $db->safesql($f_install['faq_item48']);
$tableSchema[] = "INSERT INTO " . PREFIX . "_forum_faq (`id`, `type`, `question`, `answer`, `flag`, `categ`, `order`) VALUES (28, 'item', '» {$faq_item47}', '{$faq_item48}', '3', 4, 8);";
 
        $tableSchema[] = "ALTER TABLE " . PREFIX . "_forum_topics ADD FULLTEXT title_fulltext_search (title)";
        
        $tableSchema[] = "ALTER TABLE " . PREFIX . "_forum_posts ADD FULLTEXT post_text_fulltext_search (post_text)";
        
        $tableSchema[] = "ALTER TABLE " . PREFIX . "_forum_posts ADD poster_id INT(11) NOT NULL DEFAULT '0' AFTER post_author;";
                        
        // Mail tpl //
        $forum_email = $db->safesql($f_install['mtinstall_06']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_email VALUES (1, 'subscription_text', '{$forum_email}')";
        
        $forum_email2 = $db->safesql($f_install['mtinstall_07']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_email VALUES (2, 'frend_text', '{$forum_email2}')";
        
        $forum_email3 = $db->safesql($f_install['mtinstall_08']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_email VALUES (3, 'report_text', '{$forum_email3}')";
        
        $forum_email4 = $db->safesql($f_install['mtinstall_09']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_email VALUES (4, 'new_topic', '{$forum_email4}')";
        
    //
    
        $insert_forum = $db->safesql($f_install['mtinstall_10']);
    $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_forums (`id`, `parentid`, `is_category`, `alt_name`, `topics`, `posts`, `name`, `description`, `position`, `status`, `access_read`, `access_write`, `access_mod`, `access_topic`, `access_upload`, `access_download`, `f_last_tid`, `f_last_title`, `f_last_date`, `f_last_poster_name`, `password`, `rules_title`, `rules`, `icon`, `moderators`, `postcount`, `fixpost`, `last_post_id`, `banner`, `q_reply`, `i_edit`, `redirect`) VALUES (1, -1, 1, '', 0, 0, '{$insert_forum}', '', 1, 1, '', '', '', '', '', '', 0, '', '0000-00-00 00:00:00', '', '', '', '', '', '', 1, 0, 0, '', 1, 0, '')";
        
        $insert_forum2 = $db->safesql($f_install['mtinstall_11']);
        $insert_forum2_1 = $db->safesql($f_install['mtinstall_12']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_forums (`id`, `parentid`, `is_category`, `alt_name`, `topics`, `posts`, `name`, `description`, `position`, `status`, `access_read`, `access_write`, `access_mod`, `access_topic`, `access_upload`, `access_download`, `f_last_tid`, `f_last_title`, `f_last_date`, `f_last_poster_name`, `password`, `rules_title`, `rules`, `icon`, `moderators`, `postcount`, `fixpost`, `last_post_id`, `banner`, `q_reply`, `i_edit`, `redirect`) VALUES (2, 1, 0, '', 1, 0, '{$insert_forum2}', '{$insert_forum2_1}', 1, 1, '1:2:3:4:5', '1:2:3:4', '1:2', '1:2:3:4', '1:2:3', '1:2:3:4', 1, 'Bienvenue sur votre forum', '{$topic_date}', 'Admin', '', '', '', '', '', 1, 0, 0, '', 1, 1, '')";
    
        $insert_forum3 = $db->safesql($f_install['mtinstall_13']);
    $insert_forum3_1 = $db->safesql($f_install['mtinstall_14']);
    $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_topics (`tid`, `forum_id`, `alt_name`, `title`, `topic_descr`, `icon`, `post`, `views`, `author_topic`, `start_date`, `last_date`, `last_poster_name`, `topic_status`, `hidden`, `fixed`, `poll_title`, `frage`, `poll_body`, `poll_count`, `answer`, `multiple`, `meta_descr`, `meta_keywords`, `first_post`, `last_post_id`) VALUES (1, 2, '', '{$insert_forum3_1}', '', '0', 0, 0, 'Admin', '{$topic_date}', '{$topic_date}', 'Admin', 0, 0, 1, '', '', '', 0, '', 0, '{$insert_forum3}', 'votre, forum, configurer, maintenant, panel, Cordialement, pouvez, d039administration, installé, voyez, c039est, l039avez, Bienvenue, succés', 1, 1)";
        
        $insert_forum4 = $db->safesql($f_install['mtinstall_15']);
    $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_posts (`pid`, `topic_id`, `post_date`, `post_author`, `post_text`, `post_ip`, `is_register`, `e_mail`, `edit_user`, `edit_time`, `hidden`, `wysiwyg`, `is_count`) VALUES (1, 1, '{$post_date}', 'Admin', '{$insert_forum4}', '::1', 1, '', '0', 0, 0, 0, 1);";
        
        $forum_titles = $db->safesql($f_install['mtforum_00']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_titles VALUES (1, 0, '{$forum_titles}', '1')";
        
        $forum_titles1 = $db->safesql($f_install['mtforum_01']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_titles VALUES (2, 10, '{$forum_titles1}', '2')";
        
        $forum_titles2 = $db->safesql($f_install['mtforum_02']);
        $tableSchema[] = "INSERT INTO " . PREFIX . "_forum_titles VALUES (3, 30, '{$forum_titles2}', '3')";
 
      foreach($tableSchema as $table) {
 
        $db->query($table);
 
      };
 
$forum_config = "
<?PHP 
 
//System Configurations
 
\$forum_config = array (
 
'forum_title' => 'DLE Forum 2.7',
 
'forum_url' => '',
 
'meta_descr' => '',
 
'meta_keywords' => '',
 
'meta_topic' => '1',
 
'sep_subforum' => ',&amp;nbsp;',
 
'fullforum' => '1',
 
'sep_moderators' => ',&amp;nbsp;',
 
'last_abc' => '20',
 
'mod_rewrite' => '1',
 
'wysiwyg' => '0',
 
'offline' => '0',
 
'timestamp' => 'j F Y H:i',
 
'sessions_log' => '1',
 
'session_time' => '15',
 
'stats' => '1',
 
'online' => '1',
 
'forum_bar' => '1',
 
'topic_inpage' => '25',
 
'topic_hot' => '30',
 
'post_inpage' => '20',
 
'post_hide' => '10',
 
'topic_abc' => '0',
 
'post_maxlen' => '10000',
 
'auto_wrap' => '80',
 
'post_update' => '1',
 
'last_plink' => '1',
 
'hide_forum' => '0',
 
'topic_sort' => '1',
 
'topic_email' => '1',
 
'forum_pr_imp' => 'Important:',
 
'forum_pr_vote' => 'Sondage:',
 
'forum_pr_modr' => 'Moderateur:',
 
'forum_pr_sub' => 'Sous-forum:',
 
'mod_report' => '0',
 
'flood_time' => '15',
 
'warn' => '1',
 
'warn_max' => '5',
 
'warn_day' => '3',
 
'warn_show' => '1',
 
'warn_show_all' => '0',
 
'warn_sh_pg' => '0',
 
'subscription' => '1',
 
'mod_icq' => '1',
 
'mod_rank' => '1',
 
'reputation' => '1',
 
'ses_forum' => '1',
 
'ses_topic' => '1',
 
'bot_agent' => '1',
 
'discuss' => '1',
 
'discuss_title' => '1',
 
'discuss_title_tpl' => 'Article: {post_title}',
 
'tools_disc_post' => '1',
 
'discuss_post_tpl' => 'Les discussions sur ce sujet: [url={post_link}]{post_title}[/url]',
 
'set_topic_post' => '1',
 
'set_post_num_up' => '0',
 
'set_post_num_day' => '1',
 
'topic_new_day' => '5',
 
'set_sub_last_up' => '1',
 
'upload_type' => 'zip,rar,exe,doc,pdf',
 
'img_upload' => '1',
 
'img_size' => '1024',
 
'thumb_size' => '150',
 
'jpeg_quality' => '85',
 
'tag_img_width' => '0',
 
'warn_group' => '1',
 
'search_captcha' => '5',
 
'topic_captcha' => '5',
 
'post_captcha' => '5',
 
'tools_upload' => '1',
 
'tools_poll' => '1:2',
 
'warn_show_group' => '1:2:3',
 
'rep_edit_group' => '1',
 
'forum_faq' => '1',
 
'version_id' => '2.7.1',
 
);
 
?>
";
 
$con_file = fopen('engine/data/forum_config.php', 'w+');
fwrite($con_file, $forum_config);
fclose($con_file);]]></phpinstall>
        <phpupgrade><![CDATA[]]></phpupgrade>
        <phpenable><![CDATA[]]></phpenable>
        <phpdisable><![CDATA[]]></phpdisable>
        <phpdelete><![CDATA[define('ROOT_DIR', dirname (__FILE__));
 
require_once(ROOT_DIR.'/engine/data/config.php');
require_once(ROOT_DIR.'/engine/forum/language/'.$config['langs'].'/install.lng');
require_once(ROOT_DIR.'/engine/inc/include/functions.inc.php'); 
 
$edit_files = array
        (               array
                (
                        'open' => ROOT_DIR.'/.htaccess',
                        'key'  => 'DLE-Forum',
                        'find' => 'DirectoryIndex index.php index.php?do=forum',
                        'replace'  => 'DirectoryIndex index.php',
                ),              
                
                array
                (
                        'open' => ROOT_DIR.'/.htaccess',
                        'key'  => 'DLE-Forum',
                        'find' => 'RewriteEngine On
 
                        # DLE Forum
RewriteRule ^forum(/?)+$ index.php?do=forum [L]
RewriteRule ^forum/category_([0-9]+)(/?)+$ index.php?do=forum&category=$1 [L]
RewriteRule ^forum/forum_([0-9]+)(/?)+$ index.php?do=forum&showforum=$1 [L]
RewriteRule ^forum/forum_([0-9]+)/([0-9]+)(/?)+$ index.php?do=forum&showforum=$1&cstart=$2 [L]
RewriteRule ^forum/topic_([0-9]+)(/?)+$ index.php?do=forum&showtopic=$1 [L]
RewriteRule ^forum/topic_([0-9]+)/last(/?)+$ index.php?do=forum&showtopic=$1&lastpost=1 [L]
RewriteRule ^forum/topic_([0-9]+)/lastpost(/?)+$ index.php?do=forum&showtopic=$1&lastpost=$2#post-$3 [L]
RewriteRule ^forum/topic_([0-9]+)/([0-9]+)(/?)+$ index.php?do=forum&showtopic=$1&cstart=$2 [L]
RewriteRule ^forum/topic_([0-9]+)/reply(/?)+$ index.php?do=forum&act=_topic&code=reply&tid=$1 [L]
RewriteRule ^forum/forum_([0-9]+)/add(/?)+$ index.php?do=forum&act=add_topic&forum_id=$1 [L]
RewriteRule ^forum/search(/?)+$ index.php?do=forum&act=search [L]
RewriteRule ^forum/search/([0-9]+)-([^/]+)/([0-9]+)(/?)+$ index.php?do=forum&act=search&count_all=$1&search_text=$2&cstart=$3 [L]
RewriteRule ^forum/subscription(/?)+$ index.php?do=forum&act=subscription [L]
RewriteRule ^forum/getnew(/?)+$ index.php?do=forum&act=getnew [L]
RewriteRule ^forum/getnew/([0-9]+)(/?)+$ index.php?do=forum&act=getnew&cstart=$1 [L]
RewriteRule ^forum/warn/([^/]*)(/?)+$ index.php?do=forum&act=warn&user=$1 [L]
RewriteRule ^forum/warn/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&act=warn&user=$1&cstart=$2 [L]
RewriteRule ^forum/reputation/([^/]*)(/?)+$ index.php?do=forum&act=reputation&user=$1 [L]
RewriteRule ^forum/reputation/([^/]*)/([0-9]+)(/?)+$ index.php?do=forum&act=reputation&user=$1&cstart=$2 [L]
RewriteRule ^forum/textversion.html$ index.php?do=forum&act=textversion [L]
RewriteRule ^forum/whoonline(/?)+$ index.php?do=forum&act=whoonline [L]
RewriteRule ^forum/faq(/?)+$ index.php?do=forum&act=faq [L]',
                        'replace'  => 'RewriteEngine On',
                ),
        );
 
foreach ($edit_files as $file)
                                {
                                        $file_edit = file_get_contents($file['open']);
                                        
                                        if (!preg_match('/$file[key]/', $file_edit))
                                        {
                                                $new_file = str_replace($file['find'], $file['before'].(($file['replace']!="")?$file['replace']:$file['find'])."\n".$file['add'], $file_edit);
                                                
                                                $fd = @fopen($file['open'], "w+");
                                                fwrite ( $fd, $new_file );
                                                fclose($fd);
                                                chmod($file['open'], 0644);
                                        }
                                };
 
$dir_forum = ROOT_DIR . '/engine/forum';
$dir_forum1 = ROOT_DIR . '/uploads/forum';
$dir_forum2 = ROOT_DIR . '/engine/inc/forum.php';
$dir_forum3 = ROOT_DIR . '/engine/skins/images/dle_forum.png';
$dir_forum4 = ROOT_DIR . '/engine/data/forum_config.php';
$dir_forum5 = ROOT_DIR . '/templates/'.$config['skin'].'/forum';
$dir_forum6 = ROOT_DIR . '/templates/'.$config['skin'].'/forum_last.tpl';
 
function RDir( $path ) {
 if ( file_exists( $path ) AND is_dir( $path ) ) {
    $dir = opendir($path);
    while ( false !== ( $element = readdir( $dir ) ) ) {
      if ( $element != '.' AND $element != '..' )  {
        $tmp = $path . '/' . $element;
        chmod( $tmp, 0777 );
        if ( is_dir( $tmp ) ) {
         RDir( $tmp );
        } else {
          unlink( $tmp );
       }
     }
   }
    closedir($dir);
   if ( file_exists( $path ) ) {
     rmdir( $path );
   }
 }
}
 
RDir($dir_forum);
RDir($dir_forum1);
unlink($dir_forum2);
unlink($dir_forum3);
unlink($dir_forum4);
RDir($dir_forum5);
unlink($dir_forum6);]]></phpdelete>
        <notice><![CDATA[]]></notice>
        <file name="engine/engine.php">
                <operation action="after">
                        <searchcode><![CDATA[switch ( $do ) {]]></searchcode>
                        <replacecode><![CDATA[case "forum" :
                        include ENGINE_DIR.'/forum/main.php';
                        break;]]></replacecode>
                </operation>
        </file>
        <file name="engine/modules/main.php">
                <operation action="after">
                        <searchcode><![CDATA[} else $replace_url = false;]]></searchcode>
                        <replacecode><![CDATA[require_once ROOT_DIR.'/engine/forum/sources/modules/show.last.php';]]></replacecode>
                </operation>
                <operation action="replace">
                        <searchcode><![CDATA[$tpl->load_template ( 'main.tpl' );]]></searchcode>
                        <replacecode><![CDATA[if ( $forum_config["fullforum"] == 1 ) {
if ( $dle_module == "forum" ) {
require_once ROOT_DIR.'/engine/forum/sources/modules/forum-login.php';  
$tpl->load_template ( 'forum/fullforum.tpl' );
$tpl->set('{forum-login}', $tpl->result['forum_login']);
 
$tpl->set( '{site-link}', $config['http_home_url'] );
} else {
$tpl->load_template ( 'main.tpl' );
}
}else{
        
$tpl->load_template ( 'main.tpl' );
}]]></replacecode>
                </operation>
                <operation action="after">
                        <searchcode><![CDATA[$tpl->set ( '{speedbar}', $tpl->result['speedbar'] );]]></searchcode>
                        <replacecode><![CDATA[$tpl->set('{forum}', $tpl->result['forum_table']);]]></replacecode>
                </operation>
        </file>
        <file name="engine/modules/profile.php">
                <operation action="after">
                        <searchcode><![CDATA[$tpl->set( '{lastdate}', langdate( "j F Y H:i", $row['lastdate'] ) );]]></searchcode>
                        <replacecode><![CDATA[/* Infos utilisateurs forum */ 
        if( $config['allow_alt_url'] == "yes" ){ 
                $tpl->set('{forum_post_link}', "<a href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/posts/\">Tous les messages de l'utilisateur</a>"); 
        }else{ 
                $tpl->set('{forum_post_link}', "<a href=\"".$config['http_home_url']."index.php?do=forum&act=user_posts&name=".urlencode($row['name'])."\">Tous les messages de l'utilisateur</a>"); 
            $rowz = $db->super_query("SELECT COUNT(*) as counta FROM dle_forum_topics WHERE author_topic='{$row['name']}'"); 
                $forum_topics = $rowz['counta']; $tpl->set('{forum_topics}', $forum_topics); 
                $tpl->set( '{forum_post}', stripslashes( $row['forum_post'] ) );
    }
        /* End Infos utilisateurs forum */]]></replacecode>
                </operation>
                <operation action="before">
                        <searchcode><![CDATA[if( $row['banned'] == 'yes' ) $user_group[$row['user_group']]['group_name'] = $lang['user_ban'];]]></searchcode>
                        <replacecode><![CDATA[/* Infos utilisateurs forum */ 
        if( $config['allow_alt_url'] == "yes" ){ 
                $tpl->set('{forum_post_link}', "<a href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/posts/\">Tous les messages de l'utilisateur</a>"); 
        }else{ 
                $tpl->set('{forum_post_link}', "<a href=\"".$config['http_home_url']."index.php?do=forum&act=user_posts&name=".urlencode($row['name'])."\">Tous les messages de l'utilisateur</a>"); 
            $rowz = $db->super_query("SELECT COUNT(*) as counta FROM dle_forum_topics WHERE author_topic='{$row['name']}'"); 
                $forum_topics = $rowz['counta']; $tpl->set('{forum_topics}', $forum_topics); 
                $tpl->set( '{forum_post}', stripslashes( $row['forum_post'] ) );
    }
        /* End Infos utilisateurs forum */]]></replacecode>
                </operation>
        </file>
        <file name="engine/skins/default.skin.php">
                <operation action="after">
                        <searchcode><![CDATA[$year = date('Y', time());]]></searchcode>
                        <replacecode><![CDATA[require ENGINE_DIR.'/forum/language/'.$config['langs'].'/admin.lng';]]></replacecode>
                </operation>
                <operation action="before">
                        <searchcode><![CDATA[array (
                'name' => $lang['opt_all'], 
                'url' => "?mod=options&action=syscon", 
                'mod' => "options", 
                'access' => "admin" 
                ),]]></searchcode>
                        <replacecode><![CDATA[array (
                'name' => $f_lg['m_tools'], 
                'url' => "?mod=forum&action=tools", 
                'mod' => "tools", 
                'access' => "admin" 
                ),]]></replacecode>
                </operation>
        </file>
</dleplugin>
Wygenerowano w 0.003s, przy pomocy GeSHi 1.0.8
'
Podziel się na Facebook Podziel się na BLIP Podziel się na Twitter Podziel się na Buzz Podziel się na Flaker Dodaj zakładkę Google Podziel się na Delicious Wykop to!

Nowy Komentarz:

Komentarze:

Brak Komentarzy!