Enable toggling of anime collection view

This commit is contained in:
Timothy Warren 2015-06-16 11:21:22 -04:00
parent 9afe5379aa
commit 3c5e766dc3
2 changed files with 26 additions and 5 deletions

View File

@ -1,11 +1,16 @@
<?php <?php
return (object)[ return (object)[
// Username for feeds // ----------------------------------------------------------------------------
// Username for anime and manga lists
// ----------------------------------------------------------------------------
'hummingbird_username' => 'timw4mail', 'hummingbird_username' => 'timw4mail',
// Included config files // ----------------------------------------------------------------------------
'routes' => require _dir(CONF_DIR, 'routes.php'), // General config
'database' => require _dir(CONF_DIR, 'database.php'), // ----------------------------------------------------------------------------
// do you wish to show the anime collection tab?
'show_anime_collection' => FALSE,
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Routing // Routing
@ -14,6 +19,7 @@ return (object)[
// options to an empty string. To route by host, set the _path suffixed options // options to an empty string. To route by host, set the _path suffixed options
// to an empty string // to an empty string
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
'anime_host' => 'anime.timshomepage.net', 'anime_host' => 'anime.timshomepage.net',
'manga_host' => 'manga.timshomepage.net', 'manga_host' => 'manga.timshomepage.net',
'anime_path' => '', 'anime_path' => '',
@ -26,7 +32,17 @@ return (object)[
// Default to list view? // Default to list view?
'default_to_list_view' => FALSE, 'default_to_list_view' => FALSE,
// ----------------------------------------------------------------------------
// Lower level configuration
//
// You shouldn't generally need to change anything below this line
// ----------------------------------------------------------------------------
// Cache paths // Cache paths
'data_cache_path' => _dir(APP_DIR, 'cache'), 'data_cache_path' => _dir(APP_DIR, 'cache'),
'img_cache_path' => _dir(ROOT_DIR, 'public/images'), 'img_cache_path' => _dir(ROOT_DIR, 'public/images'),
// Included config files
'routes' => require _dir(CONF_DIR, 'routes.php'),
'database' => require _dir(CONF_DIR, 'database.php'),
]; ];

View File

@ -46,9 +46,14 @@ class AnimeController extends BaseController {
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
if ($this->config->show_anime_collection === FALSE)
{
unset($this->nav_routes['Collection']);
}
$this->model = new AnimeModel(); $this->model = new AnimeModel();
$this->collection_model = new AnimeCollectionModel(); $this->collection_model = new AnimeCollectionModel();
$this->base_data = [ $this->base_data = [
'url_type' => 'anime', 'url_type' => 'anime',
'other_type' => 'manga', 'other_type' => 'manga',