Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.
Please keep in mind:
Support response
Support checklist
$type = 'images';
0 => array(
'list' => true,
'tools' => true,
'label' => _s('Most recent'),
'id' => 'list-most-recent',
'params' => 'list=images&sort=date_desc&page=1',
'current' => $_REQUEST['sort'] == 'date_desc' or !$_REQUEST['sort'] ? true : false,
),
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<?php G\Render\include_theme_header(); ?>
<?php CHV\Render\show_banner('explore_after_top'); ?>
<div class="content-width">
<?php
// Use CHV magic params
$list_params = CHV\Listing::getParams();
$type = 'albums';
try {
global $list;
$list = new CHV\Listing;
$list->setType($type); // images | users | albums
$list->setOffset($list_params['offset']);
$list->setLimit($list_params['limit']); // how many results?
$list->setItemsPerPage($list_params['items_per_page']); // must
$list->setSortType($list_params['sort'][0]); // date | size | views
$list->setSortOrder($list_params['sort'][1]); // asc | desc
$list->setRequester(CHV\Login::getUser());
$list->output_tpl = $type;
$list->exec();
} catch(Exception $e) {
G\exception_to_error($e);
}
?>
<div class="header header-tabs margin-bottom-10 follow-scroll">
<h1><strong><?php echo get_category() ? get_category()['name'] : _s('Albums'); ?></strong></h1>
<?php
global $tabs; // Define it as a global to bind it on the included tab.php
$tabs = array(
0 => array(
'list' => true,
'tools' => true,
'label' => _s('Most recent'),
'id' => 'list-most-recent',
'params' => 'list=albums&sort=date_desc&page=1',
'current' => $_REQUEST['sort'] == 'date_desc' or !$_REQUEST['sort'] ? true : false,
),
1 => array(
'list' => true,
'tools' => true,
'label' => _s('Oldest'),
'id' => 'list-most-oldest',
'params' => 'list=albums&sort=date_asc&page=1',
'current' => $_REQUEST['sort'] == 'date_asc',
)
);
$current = false;
foreach($tabs as $k => $v) {
if(get_category()) {
$tabs[$k]['params_hidden'] .= 'category_id=' . get_category()['id'];
}
if($v['current']) {
$current = true;
}
$tabs[$k]['type'] = 'albums';
$route_path = G\get_route_name();
if(get_category()) {
$route_path .= '/' . get_category()['url_key'];
}
$tabs[$k]['url'] = G\get_base_url($route_path . '/?' . $tabs[$k]['params']);
}
if(!$current) {
$tabs[0]['current'] = true;
}
?>
<?php G\Render\include_theme_file("snippets/tabs"); ?>
<?php
if(is_admin()) {
global $user_items_editor;
$user_items_editor = false;
G\Render\include_theme_file("snippets/user_items_editor");
?>
<div class="header-content-right phone-float-none">
<?php G\Render\include_theme_file("snippets/listing_tools_editor"); ?>
</div>
<?php
}
?>
</div>
<div id="content-listing-tabs" class="tabbed-listing">
<div id="tabbed-content-group">
<?php
G\Render\include_theme_file("snippets/listing");
?>
</div>
</div>
</div>
<?php G\Render\include_theme_footer(); ?>
<?php
/* --------------------------------------------------------------------
Chevereto
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<inbox@rodolfoberrios.com>
Copyright (C) Rodolfo Berrios A. All rights reserved.
BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
http://chevereto.com/license
--------------------------------------------------------------------- */
$route = function($handler) {
try {
if(!CHV\get_chv_setting('website_explore_page')) {
return $handler->issue404();
}
$handler::$vars['pre_doctitle'] = _s('Albums');
$handler::$vars['category'] = NULL;
if($handler->isRequestLevel(2)) return $handler->issue404(); // Allow only 3 levels
} catch(Exception $e) {
G\exception_to_error($e);
}
};
Ok let rock π
create albums.php in app/themes/Peafowl
Code:<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?> <?php G\Render\include_theme_header(); ?> <?php CHV\Render\show_banner('explore_after_top'); ?> <div class="content-width"> <?php // Use CHV magic params $list_params = CHV\Listing::getParams(); $type = 'albums'; try { global $list; $list = new CHV\Listing; $list->setType($type); // images | users | albums $list->setOffset($list_params['offset']); $list->setLimit($list_params['limit']); // how many results? $list->setItemsPerPage($list_params['items_per_page']); // must $list->setSortType($list_params['sort'][0]); // date | size | views $list->setSortOrder($list_params['sort'][1]); // asc | desc $list->setRequester(CHV\Login::getUser()); $list->output_tpl = $type; $list->exec(); } catch(Exception $e) { G\exception_to_error($e); } ?> <div class="header header-tabs margin-bottom-10 follow-scroll"> <h1><strong><?php echo get_category() ? get_category()['name'] : _s('Albums'); ?></strong></h1> <?php global $tabs; // Define it as a global to bind it on the included tab.php $tabs = array( 0 => array( 'list' => true, 'tools' => true, 'label' => _s('Most recent'), 'id' => 'list-most-recent', 'params' => 'list=albums&sort=date_desc&page=1', 'current' => $_REQUEST['sort'] == 'date_desc' or !$_REQUEST['sort'] ? true : false, ), 1 => array( 'list' => true, 'tools' => true, 'label' => _s('Oldest'), 'id' => 'list-most-oldest', 'params' => 'list=albums&sort=date_asc&page=1', 'current' => $_REQUEST['sort'] == 'date_asc', ) ); $current = false; foreach($tabs as $k => $v) { if(get_category()) { $tabs[$k]['params_hidden'] .= 'category_id=' . get_category()['id']; } if($v['current']) { $current = true; } $tabs[$k]['type'] = 'albums'; $route_path = G\get_route_name(); if(get_category()) { $route_path .= '/' . get_category()['url_key']; } $tabs[$k]['url'] = G\get_base_url($route_path . '/?' . $tabs[$k]['params']); } if(!$current) { $tabs[0]['current'] = true; } ?> <?php G\Render\include_theme_file("snippets/tabs"); ?> <?php if(is_admin()) { global $user_items_editor; $user_items_editor = false; G\Render\include_theme_file("snippets/user_items_editor"); ?> <div class="header-content-right phone-float-none"> <?php G\Render\include_theme_file("snippets/listing_tools_editor"); ?> </div> <?php } ?> </div> <div id="content-listing-tabs" class="tabbed-listing"> <div id="tabbed-content-group"> <?php G\Render\include_theme_file("snippets/listing"); ?> </div> </div> </div> <?php G\Render\include_theme_footer(); ?>
Create route.albums.php in app/routes/
Code:<?php /* -------------------------------------------------------------------- Chevereto http://chevereto.com/ @author Rodolfo Berrios A. <http://rodolfoberrios.com/> <inbox@rodolfoberrios.com> Copyright (C) Rodolfo Berrios A. All rights reserved. BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA http://chevereto.com/license --------------------------------------------------------------------- */ $route = function($handler) { try { if(!CHV\get_chv_setting('website_explore_page')) { return $handler->issue404(); } $handler::$vars['pre_doctitle'] = _s('Albums'); $handler::$vars['category'] = NULL; if($handler->isRequestLevel(2)) return $handler->issue404(); // Allow only 3 levels } catch(Exception $e) { G\exception_to_error($e); } };
And bala try with https://likz.me/albums π