mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-14 20:19:43 +01:00
fixes
This commit is contained in:
10
do.php
10
do.php
@@ -535,7 +535,7 @@ else if (ig('down') || ig('downf') ||
|
||||
|
||||
if(defined('TrottleLimit'))
|
||||
{
|
||||
sleep(1);
|
||||
usleep(1000000 * 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,8 +555,14 @@ else if (ig('down') || ig('downf') ||
|
||||
//
|
||||
else
|
||||
{
|
||||
$error = true;
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('err_navig_download_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
kleeja_err($lang['ERROR_NAVIGATATION']);
|
||||
|
||||
if($error)
|
||||
{
|
||||
kleeja_err($lang['ERROR_NAVIGATATION']);
|
||||
}
|
||||
}
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('end_download_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
@@ -944,8 +944,8 @@ function configField($name, $type = 'text', $select_options = array())
|
||||
case 'select':
|
||||
$return_value = '<select id="' . $name . '" name="' . $name . '">' . "\n";
|
||||
foreach ($select_options as $title => $value) {
|
||||
$return_value .= '<option <IF NAME="con.' . $name . '==' . $value . '">selected="selected"</IF> value="0">' . $title . '</option>' . "\n";
|
||||
}
|
||||
$return_value .= '<option <IF NAME="con.' . $name . '==' . $value . '">selected="selected"</IF> value="'.$value.'">' . $title . '</option>' . "\n";
|
||||
}
|
||||
|
||||
return $return_value . '</select>' . "\n";
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ $kleeja_plugin['advanced_extras']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
@@ -97,20 +97,20 @@ $kleeja_plugin['advanced_extras']['uninstall'] = function ($plg_id) {
|
||||
foreach (array('ar', 'en') as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
|
||||
global $SQL , $dbprefix;
|
||||
$update_query = array(
|
||||
'UPDATE' => "{$dbprefix}stats",
|
||||
'SET' => "ex_footer = '' , ex_header = '' "
|
||||
);
|
||||
|
||||
$SQL->build($update_query);
|
||||
global $SQL , $dbprefix;
|
||||
$update_query = array(
|
||||
'UPDATE' => "{$dbprefix}stats",
|
||||
'SET' => "ex_footer = '' , ex_header = '' "
|
||||
);
|
||||
|
||||
if($SQL->affected())
|
||||
{
|
||||
//delete cache ..
|
||||
delete_cache('data_extra');
|
||||
}
|
||||
$SQL->build($update_query);
|
||||
|
||||
if($SQL->affected())
|
||||
{
|
||||
//delete cache ..
|
||||
delete_cache('data_extra');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ $kleeja_plugin['kj_amp_seo']['information'] = array(
|
||||
# min version of kleeja that's required 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
@@ -156,7 +156,10 @@ $kleeja_plugin['kj_amp_seo']['uninstall'] = function ($plg_id) {
|
||||
));
|
||||
|
||||
|
||||
delete_olang(null, null, $plg_id);
|
||||
//delete language variables
|
||||
foreach (['ar', 'en'] as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -230,7 +233,9 @@ $kleeja_plugin['kj_amp_seo']['functions'] = array(
|
||||
header('x-frame-options: SAMEORIGIN');
|
||||
header('x-xss-protection: 1; mode=block');
|
||||
|
||||
exit($tpl->display('amp', __DIR__));
|
||||
echo $tpl->display('amp', __DIR__);
|
||||
|
||||
return ['show' => false];
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ $kleeja_plugin['kj_ban_admin']['information'] = array(
|
||||
# Min version of Kleeja that's required 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['kj_download_speed_limit']['information'] = array(
|
||||
# min version of kleeja that's required to run this plugin
|
||||
'plugin_kleeja_version_min' => '2.3',
|
||||
# max version of kleeja that support this plugin, use 0 for unlimited
|
||||
'plugin_kleeja_version_max' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
@@ -102,7 +102,10 @@ $kleeja_plugin['kj_download_speed_limit']['uninstall'] = function ($plg_id) {
|
||||
));
|
||||
|
||||
|
||||
delete_olang(null, null, $plg_id);
|
||||
//delete language variables
|
||||
foreach (['ar', 'en'] as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ $kleeja_plugin['kj_ftp']['information'] = array(
|
||||
# min version of kleeja that's required 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
@@ -172,9 +172,10 @@ $kleeja_plugin['kj_ftp']['uninstall'] = function ($plg_id) {
|
||||
// 'kj_ftp_home_meta_keywords'
|
||||
// ));
|
||||
|
||||
|
||||
delete_olang(null, null, $plg_id);
|
||||
|
||||
//delete language variables
|
||||
foreach (['ar', 'en'] as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['kj_meta_seo']['information'] = array(
|
||||
# min version of kleeja that's required 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
@@ -171,7 +171,10 @@ $kleeja_plugin['kj_meta_seo']['uninstall'] = function ($plg_id) {
|
||||
));
|
||||
|
||||
|
||||
delete_olang(null, null, $plg_id);
|
||||
//delete language variables
|
||||
foreach (['ar', 'en'] as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ $kleeja_plugin['kj_recaptcha']['information'] = array(
|
||||
# min version of kleeja that's required 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
|
||||
BIN
plugins/kj_x_sendfile/icon.png
Normal file
BIN
plugins/kj_x_sendfile/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
63
plugins/kj_x_sendfile/index.html
Executable file
63
plugins/kj_x_sendfile/index.html
Executable file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
|
||||
<title>Powered by Kleeja</title>
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #CECFCE;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size: 100%;
|
||||
color: #69788E;
|
||||
margin: 10px 30px;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: #CECFCE;
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
||||
font-size: 1.70em;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content_box {
|
||||
border: 1px dashed #CECFCE;
|
||||
background: #FFFFFF;
|
||||
padding: 10px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body title="كليجا"><br />
|
||||
<div class="content_box">
|
||||
<h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1>
|
||||
</div>
|
||||
<br />
|
||||
<div class="content_box"><span style="font-size: 140%">Powered by <a target="_blank" href="http://www.kleeja.com">Kleeja</a></span>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
160
plugins/kj_x_sendfile/init.php
Normal file
160
plugins/kj_x_sendfile/init.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
# Kleeja Plugin
|
||||
# kj_x_sendfile
|
||||
# Version: 1.0
|
||||
# Developer: Kleeja team
|
||||
|
||||
# Prevent illegal run
|
||||
if (!defined('IN_PLUGINS_SYSTEM'))
|
||||
{
|
||||
exit();
|
||||
}
|
||||
|
||||
//
|
||||
// this plugin is under heavy testing,
|
||||
// you should also test it and send your test results to us. (github.com/awssat/kleeja)
|
||||
//
|
||||
|
||||
|
||||
|
||||
# Plugin Basic Information
|
||||
$kleeja_plugin['kj_x_sendfile']['information'] = array(
|
||||
# The casucal name of this plugin, anything can a human being understands
|
||||
'plugin_title' => array(
|
||||
'en' => 'Kleeja X SendFile',
|
||||
'ar' => 'كليجا إكس سيند فايل'
|
||||
),
|
||||
# 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' => array(
|
||||
'en' => 'Enable x-sendfile or X-Accel-Redirect for both Apache or Nginx for better performance.',
|
||||
'ar' => 'كليجا إكس سيند فايل'
|
||||
),
|
||||
# Min version of Kleeja that's requiered to run this plugin
|
||||
'plugin_kleeja_version_min' => '3.0',
|
||||
# Max version of Kleeja that support this plugin, use 0 for unlimited
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# 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']['en'] = "
|
||||
Thanks for using our klj_x_sendfile plugin.
|
||||
\n To report bugs reach us on: \nhttps://github.com/awssat/kleeja/issues
|
||||
\n\n
|
||||
You can find configurations on settings->kleeja x sendfile.
|
||||
|
||||
\n\n
|
||||
This plugin require that xsendfile is enabled on either Apache or Nginx:\n
|
||||
- Apache: https://tn123.org/mod_xsendfile/ \n
|
||||
- Nginx: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/
|
||||
|
||||
\n\n
|
||||
Do NOT use this plugin if you are not certain of your server configuration.
|
||||
";
|
||||
$kleeja_plugin['kj_x_sendfile']['first_run']['ar'] = "
|
||||
شكراً لإستخدام إضافة كليجا إكس سيند فايل. للإبلاغ عن الأخطاء : \n
|
||||
https://github.com/awssat/kleeja/issues
|
||||
\n\n
|
||||
You can find configurations on settings->kleeja x sendfile.
|
||||
|
||||
\n\n
|
||||
لاحظ أن هذه الإضافة تتطلب وجود sendfile مفعل على إما خادم انجين اكس او اباتشي:\n
|
||||
- Apache: https://tn123.org/mod_xsendfile/ \n
|
||||
- Nginx: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/
|
||||
|
||||
\n\n
|
||||
لا تستخدم هذه الإضافة إذا كنت غير متأكد من إعدادات خادمك وتوفر المتطلبات.
|
||||
";
|
||||
|
||||
# Plugin Installation function
|
||||
$kleeja_plugin['kj_x_sendfile']['install'] = function($plg_id)
|
||||
{
|
||||
//new options
|
||||
$options = array(
|
||||
'kj_x_sendfile_enable' =>
|
||||
array(
|
||||
'value'=> '0',
|
||||
'html' => configField('kj_x_sendfile_enable', 'yesno'),
|
||||
'plg_id' => $plg_id,
|
||||
'type' => 'kj_x_sendfile',
|
||||
),
|
||||
'kj_x_sendfile_type' =>
|
||||
array(
|
||||
'value'=> 'apache',
|
||||
'html' => configField('kj_x_sendfile_type', 'select', ['Apache' => 'apache', 'Nginx' => 'nginx']),
|
||||
'plg_id' => $plg_id,
|
||||
'type' => 'kj_x_sendfile',
|
||||
),
|
||||
);
|
||||
|
||||
add_config_r($options);
|
||||
|
||||
//new language variables
|
||||
add_olang(array(
|
||||
'KJ_X_SENDFILE_ENABLE' => 'تفعيل هيدر x-Sendfile/X-Accel-Redirect',
|
||||
'KJ_X_SENDFILE_TYPE' => 'نوع الخادم',
|
||||
'CONFIG_KLJ_MENUS_KJ_X_SENDFILE' => 'كليجا إكس سيند فايل',
|
||||
),
|
||||
'ar',
|
||||
$plg_id);
|
||||
|
||||
add_olang(array(
|
||||
'KJ_X_SENDFILE_ENABLE' => 'Enable x-Sendfile/X-Accel-Redirect',
|
||||
'KJ_X_SENDFILE_TYPE' => 'Current Server for your hosting',
|
||||
'CONFIG_KLJ_MENUS_KJ_X_SENDFILE' => 'Kleeja X Sendfile',
|
||||
),
|
||||
'en',
|
||||
$plg_id);
|
||||
};
|
||||
|
||||
|
||||
//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($plg_id)
|
||||
{
|
||||
//delete options
|
||||
delete_config(array(
|
||||
'kj_x_sendfile_enable',
|
||||
'kj_x_sendfile_type'
|
||||
));
|
||||
|
||||
//delete language variables
|
||||
foreach (['ar', 'en'] as $language) {
|
||||
delete_olang(null, $language, $plg_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Plugin functions
|
||||
$kleeja_plugin['kj_x_sendfile']['functions'] = array(
|
||||
|
||||
'do_page_before_headers_set' => function($args){
|
||||
global $config;
|
||||
|
||||
if($config['kj_x_sendfile_enable'] == 0)
|
||||
return;
|
||||
|
||||
if($config['kj_x_sendfile_type'] == 'apache')
|
||||
header('X-Sendfile: ' . $args['path_file']);
|
||||
else
|
||||
header('X-Accel-Redirect: ' . ltrim($args['path_file'], '.'));
|
||||
}
|
||||
);
|
||||
@@ -29,15 +29,15 @@ $kleeja_plugin['klj_adfly']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# 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['klj_adfly']['first_run']['ar'] = "
|
||||
شكراً لاستخدامك إضافة adf.ly ، قم بمراسلتنا بالأخطاء عند ظهورها على البريد: <br>
|
||||
info@kleeja.com
|
||||
شكراً لاستخدامك إضافة adf.ly ، قم بإعلامنا بالأخطاء عند ظهورها على: <br>
|
||||
https://github.com/awssat/kleeja/issues
|
||||
<hr>
|
||||
<br>
|
||||
<h3>لاحظ:</h3>
|
||||
@@ -50,9 +50,9 @@ info@kleeja.com
|
||||
";
|
||||
|
||||
$kleeja_plugin['klj_adfly']['first_run']['en'] = "
|
||||
Thanks for using adf.ly plugin, to report bugs contact us:
|
||||
Thanks for using adf.ly plugin, to report bugs:
|
||||
<br>
|
||||
info@kleeja.com
|
||||
https://github.com/awssat/kleeja/issues
|
||||
<hr>
|
||||
<br>
|
||||
<h3>Note:</h3>
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['language_switch']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['pdf_viewer']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 10
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['rebrandly']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['traidnt_arbah']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 0
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ $kleeja_plugin['video_player']['information'] = array(
|
||||
# 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' => '3.0',
|
||||
'plugin_kleeja_version_max' => '3.9',
|
||||
# Should this plugin run before others?, 0 is normal, and higher number has high priority
|
||||
'plugin_priority' => 10
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user