Witam,
Nie wiem czy to dobry dział ale borykam się z pewnym problemem z wtyczką XML.
Otóż do pewnego modułu robię instalację za pomocą wtyczki XML ale mam problemy bo podczas wgrywania wtyczki nie tworzy mi pliku konfiguracyjnego natomiast po odinstalowaniu tej wtyczki z pliku .htaccess nie kasuje mi wszystkich zapisanych wartości.
Wtyczka wygląda tak:
http://wklejto.pl/880556
Podczas instalacji w tej wtyczce nie działa mi ta zmienna:
$forum_config = " <?PHP //System Configurations \$forum_config = http://www.php.net/array ( 'forum_title' => 'DLE Forum 2.7', 'forum_url' => '', 'meta_descr' => '', 'meta_keywords' => '', 'meta_topic' => '1', 'sep_subforum' => ',&nbsp;', 'fullforum' => '1', 'sep_moderators' => ',&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: http://{post_link}', '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);
$edit_files = http://www.php.net/array ( http://www.php.net/array ( 'open' => ROOT_DIR.'/.htaccess', 'key' => 'DLE-Forum', 'find' => 'DirectoryIndex index.php index.php?do=forum', 'replace' => 'DirectoryIndex index.php', ), http://www.php.net/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 = http://www.php.net/file_get_contents($file['open']); if (!http://www.php.net/preg_match('/$file[key]/', $file_edit)) { $new_file = http://www.php.net/str_replace($file['find'], $file['before'].(($file['replace']!="")?$file['replace']:$file['find'])."\n".$file['add'], $file_edit); $fd = @http://www.php.net/fopen($file['open'], "w+"); http://www.php.net/fwrite ( $fd, $new_file ); http://www.php.net/fclose($fd); chmod($file['open'], 0644); } };
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)