diff --git a/plugins/kj_x_sendfile/index.html b/plugins/kj_x_sendfile/index.html new file mode 100755 index 0000000..c4c6701 --- /dev/null +++ b/plugins/kj_x_sendfile/index.html @@ -0,0 +1 @@ +Powered by Kleeja

403 - Access forbidden!


Powered by Kleeja
\ No newline at end of file diff --git a/plugins/kj_x_sendfile/init.php b/plugins/kj_x_sendfile/init.php new file mode 100644 index 0000000..eee3c61 --- /dev/null +++ b/plugins/kj_x_sendfile/init.php @@ -0,0 +1,136 @@ + __('Kleeja X SendFile', 'klj_x_sendfile'), + # Who wrote this plugin? + 'plugin_developer' => 'Kleeja.com', + # This plugin version + 'plugin_version' => '1.0', + # Explain what is this plugin, why should I use it? + 'plugin_description' => __('Enable x-sendfile or X-Accel-Redirect for both Apache or Nginx for better performance.', 'klj_x_sendfile'), + + # Min version of Kleeja that's requiered to run this plugin + 'plugin_kleeja_version_min' => '2.0', + # Max version of Kleeja that support this plugin, use 0 for unlimited + 'plugin_kleeja_version_max' => '0', + # Should this plugin run before others?, 0 is normal, and higher number has high priority + 'plugin_priority' => 0 +); + +//after installation message, you can remove it, it's not requiered +$kleeja_plugin['kj_x_sendfile']['first_run'] = __("Thanks for using our klj_x_sendfile plugin. To report bugs contact us on: \ninfo@kleeja.com"); + +# Plugin Installation function +$kleeja_plugin['kj_x_sendfile']['install'] = function() +{ + //new options + $options = array( + 'kj_x_sendfile_enable' => + array( + 'title' => 'Enable kj_x_sendfile', + 'value'=> '0', + 'plg_name' => 'kj_x_sendfile', + 'field' => 'yesno', + ), + 'kj_x_sendfile_type' => + array( + 'title' => 'Current Server for your hosting', + 'value'=> 'apache', + 'plg_name' => 'kj_x_sendfile', + 'field' => 'select', + ), + ); + + add_config($options); +}; + + +//Plugin update function, called if plugin is already installed but version is different than current +$kleeja_plugin['kj_x_sendfile']['update'] = function($old_version, $new_version) +{ + // if(version_compare($old_version, '0.5', '<')){ + // //... update to 0.5 + // } + // + // if(version_compare($old_version, '0.6', '<')){ + // //... update to 0.6 + // } +}; + + +# Plugin Uninstallation, function to be called at unistalling +$kleeja_plugin['kj_x_sendfile']['uninstall'] = function() +{ + //delete options + delete_config(array( + 'kj_x_sendfile_enable', + 'kj_x_sendfile_type' + )); + +}; + + + +# Plugin functions +$kleeja_plugin['kj_x_sendfile']['functions'] = array( + + //select options for kj_x_sendfile_type + 'option_select_values_func' => function($args){ + if($args[0] == 'kj_x_sendfile_type') + { + $args[2] = '' . "\n" . + ''; + } + + //$args[2] is return by reference + }, + + 'after_endforeach_admin_page' => function(){ + add_to_adm_menu('kj_x_sendfile', __('kljXsendfile Settings', 'klj_x_sendfile')); + }, + 'do_page_before_headers_set' => function(){ + global $path_file, $config; + + if($config['kj_x_sendfile_enable'] == 0) + return; + + if($config['kj_x_sendfile_type'] == 'apache') + header('X-Sendfile: '. $path_file); + else + header('X-Accel-Redirect: ' . $path_file); + + // die(); + }, + + 'do_page_headers_set' => function(){ + //die(); + }, + 'adm_xoptions_titles' => function($args){ + $args[0] = array_merge($args[0], array( + 'kj_x_sendfile_enable' => __('Enable x-Sendfile/X-Accel-Redirect: header', 'klj_x_sendfile'), + 'kj_x_sendfile_type' => __('Current Server type for your hosting', 'klj_x_sendfile'), + )); + }, + 'end_common' => function(){ + get_lang('klj_x_sendfile', dirname(__FILE__) . '/languages', true); + } +); diff --git a/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/index.html b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/index.html new file mode 100755 index 0000000..c4c6701 --- /dev/null +++ b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/index.html @@ -0,0 +1 @@ +Powered by Kleeja

403 - Access forbidden!


Powered by Kleeja
\ No newline at end of file diff --git a/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.mo b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.mo new file mode 100644 index 0000000..f11d64b Binary files /dev/null and b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.mo differ diff --git a/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.po b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.po new file mode 100644 index 0000000..0f39206 --- /dev/null +++ b/plugins/kj_x_sendfile/languages/ar/LC_MESSAGES/klj_x_sendfile.po @@ -0,0 +1,53 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Kleeja Team +# This file is distributed under the same license as the klj_x_sendfile package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: klj_x_sendfile 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-16 00:25+0300\n" +"PO-Revision-Date: 2017-04-16 00:27+0300\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 2.0.1\n" + +#: init.php:24 +msgid "Kleeja X SendFile" +msgstr "إضافة إكس سيدفايل" + +#: init.php:30 +msgid "" +"Enable x-sendfile or X-Accel-Redirect for both Apache or Nginx for better " +"performance." +msgstr "" +"قم بتفعيل الخاصية x-sendfile أو X-Accel-Redirect الموجودة على خوادم " +"أباتشي أو انجن اكس لأداء أفضل في التحمل." + +#: init.php:41 +msgid "" +"Thanks for using our klj_x_sendfile plugin. To report bugs contact us " +"on: \n" +"info@kleeja.com" +msgstr "" +"شكرا لإستخدام إضافتنا klj_x_sendfile . عند وجود أي أخطاء قم بإبلاغنا " +"على : \n" +"‬\n" +"‏‫info@kleeja.com" + +#: init.php:109 +msgid "kljXsendfile Settings" +msgstr "إعدادات kljXsendfile" + +#: init.php:130 +msgid "Enable x-Sendfile/X-Accel-Redirect: header" +msgstr "تفعيل خاصية x-Sendfile/X-Accel-Redirect" + +#: init.php:131 +msgid "Current Server type for your hosting" +msgstr "نوع السيرفر الخاص بإستضافتك" diff --git a/plugins/kj_x_sendfile/languages/ar/index.html b/plugins/kj_x_sendfile/languages/ar/index.html new file mode 100755 index 0000000..c4c6701 --- /dev/null +++ b/plugins/kj_x_sendfile/languages/ar/index.html @@ -0,0 +1 @@ +Powered by Kleeja

403 - Access forbidden!


Powered by Kleeja
\ No newline at end of file diff --git a/plugins/kj_x_sendfile/languages/index.html b/plugins/kj_x_sendfile/languages/index.html new file mode 100755 index 0000000..c4c6701 --- /dev/null +++ b/plugins/kj_x_sendfile/languages/index.html @@ -0,0 +1 @@ +Powered by Kleeja

403 - Access forbidden!


Powered by Kleeja
\ No newline at end of file