diff --git a/admin/controllers/install-plugin.php b/admin/controllers/install-plugin.php index fd6b63bd..4fe2ca74 100644 --- a/admin/controllers/install-plugin.php +++ b/admin/controllers/install-plugin.php @@ -17,11 +17,12 @@ if($Login->role()!=='admin') { // POST Method // ============================================================================ -if( $_SERVER['REQUEST_METHOD'] == 'POST' ) -{ - setSettings($_POST); -} - // ============================================================================ // Main // ============================================================================ +$pluginClassName = $layout['parameters']; + +$Plugin = new $pluginClassName; +$Plugin->install(); + +Redirect::page('admin', 'plugins'); \ No newline at end of file diff --git a/admin/controllers/uninstall-plugin.php b/admin/controllers/uninstall-plugin.php new file mode 100644 index 00000000..e8763fe3 --- /dev/null +++ b/admin/controllers/uninstall-plugin.php @@ -0,0 +1,28 @@ +role()!=='admin') { + Alert::set('You do not have sufficient permissions to access this page, contact the administrator.'); + Redirect::page('admin', 'dashboard'); +} + +// ============================================================================ +// Functions +// ============================================================================ + +// ============================================================================ +// POST Method +// ============================================================================ + +// ============================================================================ +// Main +// ============================================================================ +$pluginClassName = $layout['parameters']; + +$Plugin = new $pluginClassName; +$Plugin->uninstall(); + +Redirect::page('admin', 'plugins'); \ No newline at end of file diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css index 7a55db08..2e1a9984 100644 --- a/admin/themes/default/css/default.css +++ b/admin/themes/default/css/default.css @@ -71,7 +71,6 @@ a:hover { /* ----------- CONTENT ----------- */ #content { - overflow: auto; margin: 20px; } @@ -98,6 +97,20 @@ p.advOptions { font-size: 0.8em; } +/* ----------- PLUGINS ----------- */ +div.pluginBox { + background: rgba(234, 234, 234, 0.18) none repeat scroll 0 0; + border-radius: 2px; + padding: 10px; + width: 70%; + box-shadow: 0 2px 5px 0 rgba(183, 183, 183, 0.26); + margin-bottom: 20px; +} + +div.pluginBox p { + margin-bottom: 10px; +} + /* ----------- SUB-NAVBAR ----------- */ .sublinks a { color: #2672ec; diff --git a/admin/views/plugins.php b/admin/views/plugins.php index d3ee027a..80cc57cd 100644 --- a/admin/views/plugins.php +++ b/admin/views/plugins.php @@ -1,9 +1,20 @@

Plugins

-

Not implemented...

'; + echo '

'.$Plugin->title().'

'; + echo '

'.$Plugin->description().'

'; + + if($Plugin->installed()) { + echo 'Uninstall plugin'; + } + else { + echo 'Install plugin'; + } + + echo ''; } ?> \ No newline at end of file diff --git a/kernel/abstract/plugin.class.php b/kernel/abstract/plugin.class.php index 06566229..0b625733 100644 --- a/kernel/abstract/plugin.class.php +++ b/kernel/abstract/plugin.class.php @@ -44,8 +44,25 @@ class Plugin { public function title() { - //var_dump($this->db); - return $this->db['title']; + if(isset($this->db['title'])) { + return $this->db['title']; + } + + return ''; + } + + public function description() + { + if(isset($this->db['description'])) { + return $this->db['description']; + } + + return ''; + } + + public function className() + { + return $this->className; } // Return TRUE if the installation success, otherwise FALSE. diff --git a/kernel/boot/rules/70.build_posts.php b/kernel/boot/rules/70.build_posts.php index 0b9d297e..da4e196b 100644 --- a/kernel/boot/rules/70.build_posts.php +++ b/kernel/boot/rules/70.build_posts.php @@ -110,6 +110,7 @@ else } else { + // Build post for the site, without the drafts posts build_posts_per_page($Url->pageNumber(), $Site->postsPerPage(), false); } } diff --git a/plugins/about/plugin.php b/plugins/about/plugin.php deleted file mode 100644 index 6fe52a5b..00000000 --- a/plugins/about/plugin.php +++ /dev/null @@ -1,16 +0,0 @@ -dbFields = array( - 'title'=>'', - 'description'=>'' - ); - } - - -} - -?> diff --git a/plugins/opengaph/plugin.php b/plugins/opengaph/plugin.php index e4653d5a..f74d6ea4 100644 --- a/plugins/opengaph/plugin.php +++ b/plugins/opengaph/plugin.php @@ -6,7 +6,7 @@ class pluginOpenGraph extends Plugin { { $this->dbFields = array( 'title'=>'Open Graph', - 'description'=>'' + 'description'=>'The Open Graph protocol enables any web page to become a rich object in a social graph.' ); } diff --git a/themes/pure/css/blog.css b/themes/pure/css/blog.css index 9d449864..17b225d9 100644 --- a/themes/pure/css/blog.css +++ b/themes/pure/css/blog.css @@ -55,7 +55,6 @@ pre, code { code { font-size: 13px !important; - padding: 5px !important; } #layout {