diff --git a/README.md b/README.md index 0561b59a..d047a1d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -booru +szurubooru ===== -????booru repository. Repository name is subject to changes. +Another danbooru clone. diff --git a/config.ini b/config.ini index ac1375c2..96e64001 100644 --- a/config.ini +++ b/config.ini @@ -4,6 +4,7 @@ prettyPrint=1 [main] dbPath=./db.sqlite +title=szurubooru [registration] emailActivation = 0 diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 7840fbce..b4dac46e 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -27,6 +27,7 @@ class Bootstrap R::setup('sqlite:' . $this->config->main->dbPath); session_start(); + $this->context->title = $this->config->main->title; $this->context->layoutName = isset($_GET['json']) ? 'layout-json' : 'layout-normal'; diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index d48e5815..cc0d9de5 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -12,6 +12,8 @@ class AuthController extends AbstractController */ public function loginAction() { + $this->context->subTitle = 'login form'; + //check if already logged in if ($this->context->loggedIn) { @@ -59,6 +61,8 @@ class AuthController extends AbstractController */ public function registerAction() { + $this->context->subTitle = 'registration form'; + //check if already logged in if ($this->context->loggedIn) { @@ -177,6 +181,8 @@ class AuthController extends AbstractController */ public function activationAction($token) { + $this->context->subTitle = 'account activation'; + //check if already logged in if ($this->context->loggedIn) { diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index 64fcaffb..f239a641 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -6,6 +6,7 @@ class CommentController extends AbstractController */ public function listAction() { + $this->context->subTitle = 'comments'; throw new Exception('Not implemented'); } } diff --git a/src/Controllers/IndexController.php b/src/Controllers/IndexController.php index cdde8945..e1c905a5 100644 --- a/src/Controllers/IndexController.php +++ b/src/Controllers/IndexController.php @@ -5,7 +5,8 @@ class IndexController extends AbstractController * @route / * @route /index */ - public static function indexAction() + public function indexAction() { + $this->context->subTitle = 'home'; } } diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index 1df2e850..44ed4c4b 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -8,6 +8,7 @@ class PostController extends AbstractController */ public function listAction($query = null) { + $this->context->subTitle = 'browsing posts'; throw new Exception('Not implemented'); } @@ -16,6 +17,7 @@ class PostController extends AbstractController */ public function uploadAction() { + $this->context->subTitle = 'upload'; throw new Exception('Not implemented'); } @@ -24,6 +26,7 @@ class PostController extends AbstractController */ public function showAction($id) { + $this->context->subTitle = 'showing @' . $id; throw new Exception('Not implemented'); } } diff --git a/src/Controllers/TagController.php b/src/Controllers/TagController.php index 4ed9f534..04024bd1 100644 --- a/src/Controllers/TagController.php +++ b/src/Controllers/TagController.php @@ -6,6 +6,7 @@ class TagController extends AbstractController */ public static function listAction() { + $this->context->subTitle = 'tags'; throw new Exception('Not implemented'); } } diff --git a/src/Controllers/UserController.php b/src/Controllers/UserController.php index 2d6a571a..394371f0 100644 --- a/src/Controllers/UserController.php +++ b/src/Controllers/UserController.php @@ -6,6 +6,7 @@ class UserController extends AbstractController */ public function listAction() { + $this->context->subTitle = 'users'; throw new Exception('Not implemented'); } @@ -15,6 +16,7 @@ class UserController extends AbstractController */ public function showAction($name) { + $this->context->subTitle = $name; throw new Exception('Not implemented'); } } diff --git a/src/Views/layout-normal.phtml b/src/Views/layout-normal.phtml index 6db664c7..fc1d74e2 100644 --- a/src/Views/layout-normal.phtml +++ b/src/Views/layout-normal.phtml @@ -2,7 +2,11 @@
-