Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Nov 28, 2018
1 parent 7f022ab commit 0d8c673
Show file tree
Hide file tree
Showing 12 changed files with 2,152 additions and 1,023 deletions.
4 changes: 2 additions & 2 deletions app/app.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
define('G_APP_NAME', 'Chevereto Free');
define('G_APP_VERSION', '1.1.0');
define('G_APP_VERSION', '1.1.1');
define('G_APP_GITHUB_OWNER', 'Chevereto');
define('G_APP_GITHUB_REPO', 'Chevereto-Free');
define('G_APP_GITHUB_REPO_URL', 'https://github.com/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO);
define('CHEVERETO_INSTALLER_DOWNLOAD_URL', 'https://chevereto.com/download/file/installer');
define('CHEVERETO_INSTALLER_DOWNLOAD_URL', 'https://chevereto.com/download/file/installer');
13 changes: 7 additions & 6 deletions app/content/system/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<[email protected]>
<[email protected]>
Copyright (C) Rodolfo Berrios A. All rights reserved.
BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
http://chevereto.com/license
--------------------------------------------------------------------- */

if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $doctitle; ?></title>
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'peafowl.css'); ?>">
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'style.css'); ?>">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&subset=latin,greek,cyrillic">
<link rel="shortcut icon" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'favicon.png'); ?>">
<script>(function(w,d,u){w.readyQ=[];w.bindReadyQ=[];function p(x,y){if(x=="ready"){w.bindReadyQ.push(y);}else{w.readyQ.push(x);}};var a={ready:p,bind:p};w.$=w.jQuery=function(f){if(f===d||f===u){return a}else{p(f)}}})(window,document);</script>
</head>
Expand All @@ -48,8 +49,8 @@
PF.obj.l10n = <?php echo json_encode(CHV\get_translation_table()) ;?>;
</script>
<?php
if(method_exists('CHV\Settings','getChevereto')) {
echo '<script>var CHEVERETO = ' . json_encode(CHV\Settings::getChevereto()) . '</script>';
if (method_exists('CHV\Settings', 'getChevereto')) {
echo '<script>var CHEVERETO = ' . json_encode(CHV\Settings::getChevereto()) . '</script>';
}
?>
<script src="<?php echo CHV\Render\versionize_src(G\Render\get_app_lib_file_url('chevereto.js')); ?>"></script>
Expand Down
3 changes: 2 additions & 1 deletion app/install/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@
'upload_max_filesize_mb_guest' => 0.5,
'notify_user_signups' => 0,
'listing_viewer' => 1,
]
],
'1.1.1' => NULL,
];
// Settings that must be renamed from NAME to NEW NAME and DELETE old NAME
$settings_rename = [];
Expand Down
26 changes: 17 additions & 9 deletions app/routes/route.dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
'current' => $handler::getCond($route_prefix.'_'.$aux)
);
}
$route_menu['upgrade'] = [
'label' => '💎 Upgrade to premium',
'id' => 'upgrade'
];

$handler::setVar($route_prefix.'_menu', $route_menu);
$handler::setVar('tabs', $route_menu);
Expand Down Expand Up @@ -119,13 +123,16 @@

$system_values = [
'chv_version' => [
'label' => _s('Chevereto Free'),
'content' => (version_compare($chv_version['files'], $chv_version['db'], '<=') ? $chv_version['files'] : $chv_version['files'] . ' ('.$chv_version['db'].' DB) <a href="'.G\get_base_url('install').'">'._s('install update').'</a>') . ' – <a data-action="check-for-updates">' . _s("check for updates") . '</a>' . '<p><a class="btn btn-capsule btn-upgrade red" data-action="upgrade">Upgrade</a> Upgrade to paid edition to get more features and Tech support assistance.
</p>'
'label' => 'Chevereto (Free)',
'content' => (version_compare($chv_version['files'], $chv_version['db'], '<=') ? $chv_version['files'] : $chv_version['files'] . ' ('.$chv_version['db'].' DB) <a href="'.G\get_base_url('install').'">'._s('install update').'</a>') . ' – <a data-action="check-for-updates">' . _s("check for updates") . '</a>',
],
'donate' => [
'label' => 'Donate',
'content' => 'Chevereto Free cost you nothing to use, but that doesn\'t mean it costs nothing to make. Chevereto needs your support to grow and thrive.<p>If you feel that Chevereto Free suits you, please consider <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RCA2MU7DYMJJW&source=url" target="_blank">donating</a> or purchasing our <a href="https://chevereto.com/pricing" target="_blank">premium edition</a>. Every penny will help.</p>'
],
'support' => [
'label' => _s('Support'),
'content' => strtr('%s available.', ['%s' => '<a href="https://chevereto.com/community/forums/chevereto-free-support.90/" target="_blank">Community support</a>'])
'label' => 'Support',
'content' => _s('Need help? Go to %s and you will get help quickly.', ['%s' => '<a href="https://chevereto.com/support" target="_blank">'._s('Support').'</a>'])
],
'g_version' => [
'label' => 'G\\',
Expand Down Expand Up @@ -177,12 +184,13 @@
];

$chevereto_urls = [
_s('Community') => 'https://chevereto.com/community',
_s('Support') . ' (paid)' => 'https://chevereto.com/support',
_s('Support') => 'https://chevereto.com/support',
_s('Documentation') => 'https://chevereto.com/docs',
_s('Releases') . ' (paid)' => 'https://chevereto.com/releases',
_s('Releases') . ' (free)' => 'https://github.com/Chevereto/Chevereto-Free/releases',
_s('Changelog') => 'https://chevereto.com/changelog',
_s('Request new features') => 'https://chevereto.com/request-new-features',
_s('Bug tracking') => 'https://chevereto.com/bug-tracking',
_s('Community') => 'https://chevereto.com/community',
'Discord' => 'https://chevereto.com/go/discord',
'GitHub' => 'https://github.com/Chevereto',
];
$chevereto_links = [];
Expand Down
54 changes: 48 additions & 6 deletions app/themes/Peafowl/footer.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<?php if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<div id="powered-by" class="footer">Powered by <a href="https://chevereto.com" rel="generator">Chevereto</a> image hosting</div>

<?php if(!is_maintenance()) { G\Render\include_theme_file('snippets/embed_tpl'); } ?>
<?php if (!is_maintenance()) {
G\Render\include_theme_file('snippets/embed_tpl');
} ?>

<?php
if(is_upload_allowed()) {
G\Render\include_theme_file('snippets/anywhere_upload');
if (is_upload_allowed()) {
G\Render\include_theme_file('snippets/anywhere_upload');
}
?>

<?php
if(!CHV\Login::isLoggedUser()) {
G\Render\include_theme_file('snippets/modal_login');
if (!CHV\Login::isLoggedUser()) {
G\Render\include_theme_file('snippets/modal_login');
}
?>

Expand All @@ -27,5 +31,43 @@

<?php echo CHV\getSetting('analytics_code'); ?>

<?php
if (CHV\Login::isAdmin()) {
?>

<script>
$(document).ready(function() {
$(document).on("click", "[data-action=upgrade]", function() {
PF.fn.modal.call({
template: $("[data-modal=form-upgrade]").html(),
buttons: false,
button_submit: "Upgrade now",
ajax: {
data: {action: 'upgrade'},
deferred: {
success: function(XHR) {
window.location.href = XHR.responseJSON.redir.url;
},
error: function(XHR) {
PF.fn.growl.call(XHR.responseJSON.error.message);
}
}
},
});
});
});
</script>

<div data-modal="form-upgrade" class="hidden" data-is-xhr data-submit-fn="CHV.fn.submit_upgradeToPaid" data-ajax-deferred="CHV.fn.complete_upgradeToPaid">
<span class="modal-box-title">Upgrade to premium</span>
<div class="text-align-center margin-top-30 margin-bottom-30" style="font-size: 90px;">💎💖👏</div>
<p>Upgrading to Chevereto premium edition not only allows you to get more features and early access to all new additions and fixes. It also helps to keep development ongoing which is the most important asset of your purchase.</p>
<p>Chevereto <a href="https://chevereto.com/features" target="_blank">premium features</a> include support for multiple external storage servers, bulk content importer, manage banners, content likes, user followers, social login signup and more. Of course, we don't charge any time-based fees.</p>
<p>You will need a <a href="https://chevereto.com/panel/license" target="_blank">license key</a> for this process. If you don't have a license key, you can <a href="https://chevereto.com/pricing" target="_blank">purchase</a> it right now.</p>
<div class="btn-container text-align-center"><button class="btn btn-input green" data-action="submit" type="submit">Upgrade now</button> <span class="btn-alt"><?php _se('or'); ?><a class="cancel" data-action="cancel">maybe later</a></span></div>
</div>
<?php
} ?>

</body>
</html>
4 changes: 4 additions & 0 deletions app/themes/Peafowl/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@
<?php
} ?>
<li><a href="<?php echo G\get_base_url(sprintf("logout?auth_token=%s", get_auth_token())); ?>"><?php _se('Sign out'); ?></a></li>
<?php if (is_admin()) { ?>
<div class="or-separator margin-0" style="height: 1px;"></div>
<li><a data-action="upgrade">💎 Upgrade</a></li>
<?php } ?>
</ul>
</div>
</div>
Expand Down
68 changes: 36 additions & 32 deletions app/themes/Peafowl/snippets/listing_tools_editor.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<?php if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>

<?php
$list = function_exists('get_list') ? get_list() : G\get_global('list');
$tabs = (array) (G\get_global('tabs') ? G\get_global('tabs') : (function_exists('get_tabs') ? get_tabs() : NULL));
foreach($tabs as $tab) {
if($tab["list"] === false or $tab["tools"] === false) continue;
?>
<div data-content="list-selection" data-tab="<?php echo $tab["id"]; ?>" class="list-selection <?php $class = []; if(count($list->output) == 0) { $class[] = 'disabled'; } if(!$tab["current"]) { $class[] = 'hidden'; } echo implode(' ', $class); ?>">
$tabs = (array) (G\get_global('tabs') ? G\get_global('tabs') : (function_exists('get_tabs') ? get_tabs() : null));
foreach ($tabs as $tab) {
if ($tab["list"] === false or $tab["tools"] === false) {
continue;
} ?>
<div data-content="list-selection" data-tab="<?php echo $tab["id"]; ?>" class="header--centering list-selection <?php $class = [];
if (count($list->output) == 0) {
$class[] = 'disabled';
}
if (!$tab["current"]) {
$class[] = 'hidden';
}
echo implode(' ', $class); ?>">
<div class="display-inline-block margin-right-10"><a data-action="list-select-all" class="header-link" data-text-select-all="<?php _se('Select all'); ?>" data-text-clear-all="<?php _se('Clear selection'); ?>"><?php _se('Select all'); ?></a><span class="margin-left-10">&middot;</span></div>

<div data-content="pop-selection" class="disabled sort-listing pop-btn header-link display-inline-block">
Expand All @@ -15,54 +25,48 @@
<div class="pop-box-inner pop-box-menu">
<ul>
<?php
if($tab['type'] == 'images') {
?>
if ($tab['type'] == 'images') {
?>
<li><a data-action="get-embed-codes"><?php _se('Get embed codes'); ?></a></li>
<?php
}
?>
} ?>
<?php
if(in_array(G\get_route_name(), ['user', 'album']) and (array_key_exists('tools_available', $tab) ? in_array('album', $tab['tools_available']) : TRUE)) {
?>
if (in_array(G\get_route_name(), ['user', 'album']) and (array_key_exists('tools_available', $tab) ? in_array('album', $tab['tools_available']) : true)) {
?>
<li><a data-action="create-album"><?php _se('Create album'); ?></a></li>
<li><a data-action="move"><?php _se('Move to album'); ?></a></li>
<?php
}
?>
} ?>
<?php
if($tab['type'] == 'images') {
?>
if ($tab['type'] == 'images') {
?>
<?php
if((array_key_exists('tools_available', $tab) ? in_array('category', $tab['tools_available']) : TRUE) and get_categories()) {
?>
if ((array_key_exists('tools_available', $tab) ? in_array('category', $tab['tools_available']) : true) and get_categories()) {
?>
<li><a data-action="assign-category"><?php _se('Assign category'); ?></a></li>
<?php
}
?>
} ?>
<?php
if((array_key_exists('tools_available', $tab) ? in_array('flag', $tab['tools_available']) : TRUE)) {
?>
if ((array_key_exists('tools_available', $tab) ? in_array('flag', $tab['tools_available']) : true)) {
?>
<li><a data-action="flag-safe" class="hidden"><?php _se('Flag as safe'); ?></a></li>
<li><a data-action="flag-unsafe" class="hidden"><?php _se('Flag as unsafe'); ?></a></li>
<?php
}
?>
<?php
} ?>
<?php
}
?>
} ?>
<?php
if(is_allowed_to_delete_content() && (array_key_exists('tools_available', $tab) ? in_array('delete', $tab['tools_available']) : TRUE)) {
?>
if (is_allowed_to_delete_content() && (array_key_exists('tools_available', $tab) ? in_array('delete', $tab['tools_available']) : true)) {
?>
<li><a data-action="delete"><?php _se('Delete'); ?></a></li>
<?php
}
?>
} ?>
<li><a data-action="clear"><?php _se('Clear selection'); ?></a></li>
</ul>
</div>
</div>
</div>
</div>
<?php
}
}
?>
Loading

0 comments on commit 0d8c673

Please sign in to comment.