Paginator
This commit is contained in:
parent
8e2b0f59ab
commit
5c8fcff96c
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,30 +16,31 @@ if($Login->role()!=='admin') {
|
||||||
function addUser($args)
|
function addUser($args)
|
||||||
{
|
{
|
||||||
global $dbUsers;
|
global $dbUsers;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
// Check if the username already exist in db.
|
// Check if the username already exist in db.
|
||||||
if( $dbUsers->userExists($args['username']) || Text::isEmpty($args['username']) )
|
if( $dbUsers->userExists($args['username']) || Text::isEmpty($args['username']) )
|
||||||
{
|
{
|
||||||
Alert::set('Username already exists or is empty');
|
Alert::set($Language->g('username-already-exists-or-is-empty'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate password.
|
// Validate password.
|
||||||
if( ($args['password'] != $args['confirm-password'] ) || Text::isEmpty($args['password']) )
|
if( ($args['password'] != $args['confirm-password'] ) || Text::isEmpty($args['password']) )
|
||||||
{
|
{
|
||||||
Alert::set('The password and confirmation password do not match');
|
Alert::set($Language->g('password-does-not-match-the-confirm-password'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the user.
|
// Add the user.
|
||||||
if( $dbUsers->add($args) )
|
if( $dbUsers->add($args) )
|
||||||
{
|
{
|
||||||
Alert::set('User has been added successfull');
|
Alert::set($Language->g('user-has-been-added-successfully'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to add a new user');
|
Alert::set($Language->g('an-error-occurred-while-trying-to-create-the-user-account'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ if($_Plugin->form()===false) {
|
||||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||||
{
|
{
|
||||||
$_Plugin->setDb($_POST);
|
$_Plugin->setDb($_POST);
|
||||||
Alert::set('Configuration has been saved successfully');
|
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
function editPage($args)
|
function editPage($args)
|
||||||
{
|
{
|
||||||
global $dbPages;
|
global $dbPages;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
// Page status, published or draft.
|
// Page status, published or draft.
|
||||||
if( isset($args['publish']) ) {
|
if( isset($args['publish']) ) {
|
||||||
|
@ -25,18 +26,19 @@ function editPage($args)
|
||||||
{
|
{
|
||||||
$dbPages->regenerate();
|
$dbPages->regenerate();
|
||||||
|
|
||||||
Alert::set('The page has been saved successfully');
|
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||||
Redirect::page('admin', 'edit-page/'.$args['key']);
|
Redirect::page('admin', 'edit-page/'.$args['key']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to edit the page');
|
Alert::set($Language->g('an-error-occurred-while-trying-to-edit-the-page'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletePage($key)
|
function deletePage($key)
|
||||||
{
|
{
|
||||||
global $dbPages;
|
global $dbPages;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
if( $dbPages->delete($key) )
|
if( $dbPages->delete($key) )
|
||||||
{
|
{
|
||||||
|
@ -45,7 +47,7 @@ function deletePage($key)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to delete the page');
|
Alert::set('an-error-occurred-while-trying-to-delete-the-page');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
function editPost($args)
|
function editPost($args)
|
||||||
{
|
{
|
||||||
global $dbPosts;
|
global $dbPosts;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
// Post status, published or draft.
|
// Post status, published or draft.
|
||||||
if( isset($args['publish']) ) {
|
if( isset($args['publish']) ) {
|
||||||
|
@ -19,12 +20,12 @@ function editPost($args)
|
||||||
// Edit the post.
|
// Edit the post.
|
||||||
if( $dbPosts->edit($args) )
|
if( $dbPosts->edit($args) )
|
||||||
{
|
{
|
||||||
Alert::set('The post has been saved successfull');
|
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||||
Redirect::page('admin', 'edit-post/'.$args['key']);
|
Redirect::page('admin', 'edit-post/'.$args['key']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to edit the post');
|
Alert::set($Language->g('an-error-occurred-while-trying-to-edit-the-post'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +40,7 @@ function deletePost($key)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to delete the post');
|
Alert::set('an-error-occurred-while-trying-to-delete-the-post');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
function editUser($args)
|
function editUser($args)
|
||||||
{
|
{
|
||||||
global $dbUsers;
|
global $dbUsers;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
if(isset($args['password']))
|
if(isset($args['password']))
|
||||||
{
|
{
|
||||||
|
@ -14,7 +15,7 @@ function editUser($args)
|
||||||
return $dbUsers->setPassword($args);
|
return $dbUsers->setPassword($args);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Alert::set('Passwords are differents');
|
Alert::set($Language->g('password-does-not-match-the-confirm-password'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +39,7 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
if( editUser($_POST) ) {
|
if( editUser($_POST) ) {
|
||||||
Alert::set('User saved successfuly');
|
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
function addPage($args)
|
function addPage($args)
|
||||||
{
|
{
|
||||||
global $dbPages;
|
global $dbPages;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
// Page status, published or draft.
|
// Page status, published or draft.
|
||||||
if( isset($args['publish']) ) {
|
if( isset($args['publish']) ) {
|
||||||
|
@ -24,7 +25,7 @@ function addPage($args)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to create the page');
|
Alert::set($Language->g('an-error-occurred-while-trying-to-create-the-page'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
function addPost($args)
|
function addPost($args)
|
||||||
{
|
{
|
||||||
global $dbPosts;
|
global $dbPosts;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
// Page status, published or draft.
|
// Page status, published or draft.
|
||||||
if( isset($args['publish']) ) {
|
if( isset($args['publish']) ) {
|
||||||
|
@ -24,7 +25,7 @@ function addPost($args)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert::set('Error occurred when trying to create the post');
|
Alert::set($Language->g('an-error-occurred-while-trying-to-create-the-post'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ if($Login->role()!=='admin') {
|
||||||
function setSettings($args)
|
function setSettings($args)
|
||||||
{
|
{
|
||||||
global $Site;
|
global $Site;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
if(!isset($args['advancedOptions'])) {
|
if(!isset($args['advancedOptions'])) {
|
||||||
$args['advancedOptions'] = 'false';
|
$args['advancedOptions'] = 'false';
|
||||||
|
@ -31,7 +32,7 @@ function setSettings($args)
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $Site->set($args) ) {
|
if( $Site->set($args) ) {
|
||||||
Alert::set('Settings has been saved successfully');
|
Alert::set($Language->g('the-changes-have-been-saved'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Alert::set('Error occurred when trying to saved the settings');
|
Alert::set('Error occurred when trying to saved the settings');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
if($Login->role()!=='admin') {
|
if($Login->role()!=='admin') {
|
||||||
Alert::set('You do not have sufficient permissions to access this page, contact the administrator.');
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||||
Redirect::page('admin', 'dashboard');
|
Redirect::page('admin', 'dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,39 @@ a.btn-red:hover {
|
||||||
color: rgba(255, 255, 255, 0.6) !important;
|
color: rgba(255, 255, 255, 0.6) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------- PAGINATOR ----------- */
|
||||||
|
|
||||||
|
#paginator ul {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator a {
|
||||||
|
color: #2672ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li {
|
||||||
|
display: inline;
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.left {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.list {
|
||||||
|
background: #e0e0e0;
|
||||||
|
color: #747474;
|
||||||
|
padding: 2px 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.right {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ----------- PLUGINS ----------- */
|
/* ----------- PLUGINS ----------- */
|
||||||
div.pluginBox {
|
div.pluginBox {
|
||||||
|
|
|
@ -3,15 +3,16 @@
|
||||||
function makeNavbar($type)
|
function makeNavbar($type)
|
||||||
{
|
{
|
||||||
global $layout;
|
global $layout;
|
||||||
|
global $Language;
|
||||||
|
|
||||||
$navbar['users'] = array(
|
$navbar['users'] = array(
|
||||||
'users'=>array('text'=>'Users'),
|
'users'=>array('text'=>$Language->g('Users')),
|
||||||
'add-user'=>array('text'=>'Add new user')
|
'add-user'=>array('text'=>$Language->g('Add a new user'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$navbar['manage'] = array(
|
$navbar['manage'] = array(
|
||||||
'manage-posts'=>array('text'=>'Manage posts'),
|
'manage-posts'=>array('text'=>$Language->g('Manage posts')),
|
||||||
'manage-pages'=>array('text'=>'Manage pages')
|
'manage-pages'=>array('text'=>$Language->g('Manage pages'))
|
||||||
);
|
);
|
||||||
|
|
||||||
echo '<nav class="navbar sublinks"><ul>';
|
echo '<nav class="navbar sublinks"><ul>';
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -45,7 +45,6 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Tip/Help ???</div>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@ -56,19 +55,19 @@
|
||||||
<span class="input-prepend"><?php echo $Site->url() ?><span id="jsparentExample"><?php echo $_Page->parentKey()?$_Page->parentKey().'/':''; ?></span></span>
|
<span class="input-prepend"><?php echo $Site->url() ?><span id="jsparentExample"><?php echo $_Page->parentKey()?$_Page->parentKey().'/':''; ?></span></span>
|
||||||
<input id="jsslug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
<input id="jsslug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.</span>
|
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Description') ?>
|
<?php $Language->p('Description') ?>
|
||||||
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Page->description() ?>">
|
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Page->description() ?>">
|
||||||
<span class="forms-desc">This field can help describe the content in a few words. No more than 150 characters.</span>
|
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Tags') ?>
|
<?php $Language->p('Tags') ?>
|
||||||
<input id="jstags" name="tags" type="text" class="width-50" value="<?php echo $_Page->tags() ?>">
|
<input id="jstags" name="tags" type="text" class="width-50" value="<?php echo $_Page->tags() ?>">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -33,19 +33,19 @@
|
||||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
|
||||||
<input id="jsslug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
<input id="jsslug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Description') ?>
|
<?php $Language->p('Description') ?>
|
||||||
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
|
<input id="jsdescription" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Tags') ?>
|
<?php $Language->p('Tags') ?>
|
||||||
<input id="jstags" name="tags" type="text" class="width-50" value="<?php echo $_Post->tags() ?>">
|
<input id="jstags" name="tags" type="text" class="width-50" value="<?php echo $_Post->tags() ?>">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="submit" class="btn btn-blue" value="Save" name="user-profile">
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-profile">
|
||||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
|
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="submit" class="btn btn-blue" value="Save" name="user-email">
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-email">
|
||||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
<input type="password" name="confirm-password" class="width-50">
|
<input type="password" name="confirm-password" class="width-50">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="submit" class="btn btn-blue" value="Save" name="user-password">
|
<input type="submit" class="btn btn-blue" value="<?php $Language->p('Save') ?>" name="user-password">
|
||||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn"><?php $Language->p('Cancel') ?></a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
|
@ -25,3 +25,19 @@
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div id="paginator">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
if(Paginator::get('showNewer')) {
|
||||||
|
echo '<li class="left"><a href="'.HTML_PATH_ADMIN_ROOT.'manage-posts?page='.Paginator::get('prevPage').'">« '.$Language->g('Prev page').'</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<li class="list">'.(Paginator::get('currentPage')+1).' / '.(Paginator::get('numberOfPages')+1).'</li>';
|
||||||
|
|
||||||
|
if(Paginator::get('showOlder')) {
|
||||||
|
echo '<li class="right"><a href="'.HTML_PATH_ADMIN_ROOT.'manage-posts?page='.Paginator::get('nextPage').'">'.$Language->g('Next page').' »</a></li>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -36,7 +36,6 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Tip/Help ???</div>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -45,19 +44,19 @@
|
||||||
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="jsparentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="jsparentExample"></span></span>
|
||||||
<input id="jsslug" name="slug" type="text">
|
<input id="jsslug" name="slug" type="text">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Description') ?>
|
<?php $Language->p('Description') ?>
|
||||||
<input id="jsdescription" name="description" type="text" class="width-50">
|
<input id="jsdescription" name="description" type="text" class="width-50">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Tags') ?>
|
<?php $Language->p('Tags') ?>
|
||||||
<input id="jstags" name="tags" type="text" class="width-50">
|
<input id="jstags" name="tags" type="text" class="width-50">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -31,19 +31,19 @@
|
||||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
|
||||||
<input id="jsslug" name="slug" type="text">
|
<input id="jsslug" name="slug" type="text">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc"><?php $Language->p('you-can-modify-the-url-which-identifies') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Description') ?>
|
<?php $Language->p('Description') ?>
|
||||||
<input id="jsdescription" name="description" type="text" class="width-50">
|
<input id="jsdescription" name="description" type="text" class="width-50">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc"><?php $Language->p('this-field-can-help-describe-the-content') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Tags') ?>
|
<?php $Language->p('Tags') ?>
|
||||||
<input id="jstags" name="tags" type="text" class="width-50">
|
<input id="jstags" name="tags" type="text" class="width-50">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc"><?php $Language->p('write-the-tags-separeted-by-comma') ?></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -164,5 +164,5 @@ $(document).ready(function() {
|
||||||
<!-- ===================================== -->
|
<!-- ===================================== -->
|
||||||
|
|
||||||
<div id="about">
|
<div id="about">
|
||||||
<p><i class="fa fa-pencil-square-o"></i> Bludit version <?php echo BLUDIT_VERSION.' ('.BLUDIT_RELEASE_DATE.')' ?></p>
|
<p><i class="fa fa-pencil-square-o"></i> <?php $Language->p('Bludit version') ?>: <?php echo BLUDIT_VERSION.' ('.BLUDIT_RELEASE_DATE.')' ?></p>
|
||||||
</div>
|
</div>
|
|
@ -28,7 +28,14 @@ class dbJSON
|
||||||
$implode = implode($lines);
|
$implode = implode($lines);
|
||||||
|
|
||||||
// Unserialize, JSON to Array.
|
// Unserialize, JSON to Array.
|
||||||
$this->db = $this->unserialize($implode);
|
$array = $this->unserialize($implode);
|
||||||
|
|
||||||
|
if(empty($array)) {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Invalid JSON file: '.$file.', cannot be decoded. Check the file content.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->db = $array;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,6 +145,7 @@ class Plugin {
|
||||||
// Create database
|
// Create database
|
||||||
$Tmp = new dbJSON($this->filenameDb);
|
$Tmp = new dbJSON($this->filenameDb);
|
||||||
$Tmp->db = $this->dbFields;
|
$Tmp->db = $this->dbFields;
|
||||||
|
$Tmp->db['position'] = 0;
|
||||||
$Tmp->save();
|
$Tmp->save();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -228,4 +229,14 @@ class Plugin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function beforeSiteLoad()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function afterSiteLoad()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -42,6 +42,7 @@ else
|
||||||
include(PATH_RULES.'70.build_pages.php');
|
include(PATH_RULES.'70.build_pages.php');
|
||||||
include(PATH_RULES.'80.plugins.php');
|
include(PATH_RULES.'80.plugins.php');
|
||||||
include(PATH_RULES.'99.header.php');
|
include(PATH_RULES.'99.header.php');
|
||||||
|
include(PATH_RULES.'99.paginator.php');
|
||||||
|
|
||||||
if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') )
|
if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') )
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,7 @@ include(PATH_HELPERS.'redirect.class.php');
|
||||||
include(PATH_HELPERS.'sanitize.class.php');
|
include(PATH_HELPERS.'sanitize.class.php');
|
||||||
include(PATH_HELPERS.'filesystem.class.php');
|
include(PATH_HELPERS.'filesystem.class.php');
|
||||||
include(PATH_HELPERS.'alert.class.php');
|
include(PATH_HELPERS.'alert.class.php');
|
||||||
|
include(PATH_HELPERS.'paginator.class.php');
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
Session::start();
|
Session::start();
|
||||||
|
|
|
@ -11,6 +11,8 @@ $plugins = array(
|
||||||
'onAdminHead'=>array(),
|
'onAdminHead'=>array(),
|
||||||
'onAdminBody'=>array(),
|
'onAdminBody'=>array(),
|
||||||
'onAdminSidebar'=>array(),
|
'onAdminSidebar'=>array(),
|
||||||
|
'beforeSiteLoad'=>array(),
|
||||||
|
'afterSiteLoad'=>array(),
|
||||||
'beforePostsLoad'=>array(),
|
'beforePostsLoad'=>array(),
|
||||||
'afterPostsLoad'=>array(),
|
'afterPostsLoad'=>array(),
|
||||||
'beforePagesLoad'=>array(),
|
'beforePagesLoad'=>array(),
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
|
// Current page number.
|
||||||
|
$currentPage = $Url->pageNumber();
|
||||||
|
Paginator::set('currentPage', $currentPage);
|
||||||
|
|
||||||
|
// Post per page.
|
||||||
|
$postPerPage = $Site->postsPerPage();
|
||||||
|
Paginator::set('postPerPage', $postPerPage);
|
||||||
|
|
||||||
|
// Number of pages.
|
||||||
|
if($Url->whereAmI()=='admin') {
|
||||||
|
$numberOfPosts = $dbPosts->numberPost(true); // published and drafts
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$numberOfPosts = $dbPosts->numberPost(false); // published
|
||||||
|
}
|
||||||
|
|
||||||
|
Paginator::set('numberOfPosts', $numberOfPosts);
|
||||||
|
|
||||||
|
$numberOfPages = (int) ceil($numberOfPosts / $postPerPage) -1;
|
||||||
|
Paginator::set('numberOfPages', $numberOfPages);
|
||||||
|
|
||||||
|
$showOlder = $numberOfPages > $currentPage;
|
||||||
|
Paginator::set('showOlder', $showOlder);
|
||||||
|
|
||||||
|
$showNewer = $currentPage > 0;
|
||||||
|
Paginator::set('showNewer', $showNewer);
|
||||||
|
|
||||||
|
$show = $showNewer && $showOlder;
|
||||||
|
Paginator::set('show', true);
|
||||||
|
|
||||||
|
$nextPage = max(0, $currentPage+1);
|
||||||
|
Paginator::set('nextPage', $nextPage);
|
||||||
|
|
||||||
|
$prevPage = min($numberOfPages, $currentPage-1);
|
||||||
|
Paginator::set('prevPage', $prevPage);
|
|
@ -5,6 +5,10 @@ include(PATH_RULES.'70.build_posts.php');
|
||||||
include(PATH_RULES.'70.build_pages.php');
|
include(PATH_RULES.'70.build_pages.php');
|
||||||
include(PATH_RULES.'80.plugins.php');
|
include(PATH_RULES.'80.plugins.php');
|
||||||
include(PATH_RULES.'99.header.php');
|
include(PATH_RULES.'99.header.php');
|
||||||
|
include(PATH_RULES.'99.paginator.php');
|
||||||
|
|
||||||
|
// Plugins before site loaded
|
||||||
|
Theme::plugins('beforeSiteLoad');
|
||||||
|
|
||||||
// Theme init.php
|
// Theme init.php
|
||||||
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') )
|
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') )
|
||||||
|
@ -13,3 +17,6 @@ if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') )
|
||||||
// Theme HTML
|
// Theme HTML
|
||||||
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') )
|
if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') )
|
||||||
include(PATH_THEMES.$Site->theme().DS.'index.php');
|
include(PATH_THEMES.$Site->theme().DS.'index.php');
|
||||||
|
|
||||||
|
// Plugins after site loaded
|
||||||
|
Theme::plugins('afterSiteLoad');
|
|
@ -14,9 +14,25 @@ class dbPosts extends dbJSON
|
||||||
'unixTimeModified'=>array('inFile'=>false, 'value'=>0)
|
'unixTimeModified'=>array('inFile'=>false, 'value'=>0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private $numberPosts = array(
|
||||||
|
'total'=>0,
|
||||||
|
'withoutDrafts'=>0
|
||||||
|
);
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct(PATH_DATABASES.'posts.php');
|
parent::__construct(PATH_DATABASES.'posts.php');
|
||||||
|
|
||||||
|
$this->numberPosts['total'] = count($this->db);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function numberPost($total=false)
|
||||||
|
{
|
||||||
|
if($total) {
|
||||||
|
return $this->numberPosts['total'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->numberPosts['withoutDrafts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return an array with the database for a page, FALSE otherwise.
|
// Return an array with the database for a page, FALSE otherwise.
|
||||||
|
@ -236,21 +252,22 @@ class dbPosts extends dbJSON
|
||||||
|
|
||||||
public function getPage($pageNumber, $postPerPage, $draftPosts=false)
|
public function getPage($pageNumber, $postPerPage, $draftPosts=false)
|
||||||
{
|
{
|
||||||
$init = (int) $postPerPage * $pageNumber;
|
|
||||||
$end = (int) min( ($init + $postPerPage - 1), count($this->db) - 1 );
|
|
||||||
|
|
||||||
$outrange = $init<0 ? true : $init > $end;
|
|
||||||
|
|
||||||
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
|
// DEBUG: Ver una mejor manera de eliminar draft post antes de ordenarlos
|
||||||
// DEBUG: Se eliminan antes de ordenarlos porque sino los draft cuentan como publicados en el PostPerPage.
|
// DEBUG: Se eliminan antes de ordenarlos porque sino los draft cuentan como publicados en el PostPerPage.
|
||||||
if(!$draftPosts){
|
if(!$draftPosts) {
|
||||||
$this->removeUnpublished();
|
$this->removeUnpublished();
|
||||||
|
$this->numberPosts['withoutDrafts'] = count($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$init = (int) $postPerPage * $pageNumber;
|
||||||
|
$end = (int) min( ($init + $postPerPage - 1), count($this->db) - 1 );
|
||||||
|
$outrange = $init<0 ? true : $init > $end;
|
||||||
|
|
||||||
|
// Sort posts
|
||||||
$tmp = $this->sortByDate();
|
$tmp = $this->sortByDate();
|
||||||
|
|
||||||
if(!$outrange) {
|
if(!$outrange) {
|
||||||
return array_slice($tmp, $init, $end+1, true);
|
return array_slice($tmp, $init, $postPerPage, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array();
|
return array();
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
|
class Paginator {
|
||||||
|
|
||||||
|
public static $pager = array(
|
||||||
|
'numberOfPostsAndDraft'=>0,
|
||||||
|
'numberOfPosts'=>0,
|
||||||
|
'numberOfPages'=>0,
|
||||||
|
'nextPage'=>0,
|
||||||
|
'prevPage'=>0,
|
||||||
|
'currentPage'=>0,
|
||||||
|
'showOlder'=>false,
|
||||||
|
'showNewer'=>false,
|
||||||
|
'show'=>false
|
||||||
|
);
|
||||||
|
|
||||||
|
public static function set($key, $value)
|
||||||
|
{
|
||||||
|
self::$pager[$key] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get($key)
|
||||||
|
{
|
||||||
|
return self::$pager[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function html($textPrevPage=false, $textNextPage=false, $showPageNumber=false)
|
||||||
|
{
|
||||||
|
global $Language;
|
||||||
|
|
||||||
|
$html = '<div id="paginator">';
|
||||||
|
$html .= '<ul>';
|
||||||
|
|
||||||
|
if(self::get('showNewer'))
|
||||||
|
{
|
||||||
|
if($textPrevPage===false) {
|
||||||
|
$textPrevPage = '« '.$Language->g('Prev page');
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '<li class="left">';
|
||||||
|
$html .= '<a href="'.HTML_PATH_ROOT.'?page='.self::get('prevPage').'">'.$textPrevPage.'</a>';
|
||||||
|
$html .= '</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($showPageNumber) {
|
||||||
|
$html .= '<li class="list">'.(self::get('currentPage')+1).' / '.(self::get('numberOfPages')+1).'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(self::get('showOlder'))
|
||||||
|
{
|
||||||
|
if($textNextPage===false) {
|
||||||
|
$textNextPage = $Language->g('Next page').' »';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '<li class="right">';
|
||||||
|
$html .= '<a href="'.HTML_PATH_ROOT.'?page='.self::get('nextPage').'">'.$textNextPage.'</a>';
|
||||||
|
$html .= '</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '</ul>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -15,6 +15,7 @@
|
||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"dashboard": "Dashboard",
|
"dashboard": "Dashboard",
|
||||||
"role": "Role",
|
"role": "Role",
|
||||||
|
"post": "Post",
|
||||||
"posts": "Posts",
|
"posts": "Posts",
|
||||||
"users": "Users",
|
"users": "Users",
|
||||||
"administrator": "Administrator",
|
"administrator": "Administrator",
|
||||||
|
@ -49,6 +50,8 @@
|
||||||
"dasbhoard": "Dasbhoard",
|
"dasbhoard": "Dasbhoard",
|
||||||
"manage": "Manage",
|
"manage": "Manage",
|
||||||
"themes": "Themes",
|
"themes": "Themes",
|
||||||
|
"prev-page": "Prev page",
|
||||||
|
"next-page": "Next page",
|
||||||
"configure-plugin": "Configure plugin",
|
"configure-plugin": "Configure plugin",
|
||||||
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
|
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
|
||||||
"site-title": "Site title",
|
"site-title": "Site title",
|
||||||
|
@ -59,6 +62,7 @@
|
||||||
"site-url": "Site url",
|
"site-url": "Site url",
|
||||||
"writting-settings": "Writting settings",
|
"writting-settings": "Writting settings",
|
||||||
"url-filters": "URL filters",
|
"url-filters": "URL filters",
|
||||||
|
"page": "Page",
|
||||||
"pages": "Pages",
|
"pages": "Pages",
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"welcome-back": "Welcome back",
|
"welcome-back": "Welcome back",
|
||||||
|
@ -82,11 +86,26 @@
|
||||||
"publish-now": "Publish now",
|
"publish-now": "Publish now",
|
||||||
"first-name": "First name",
|
"first-name": "First name",
|
||||||
"last-name": "Last name",
|
"last-name": "Last name",
|
||||||
|
"bludit-version": "Bludit version",
|
||||||
|
"powered-by": "Powered by",
|
||||||
|
"recent-posts": "Recent Posts",
|
||||||
"manage-pages": "Manage pages",
|
"manage-pages": "Manage pages",
|
||||||
"advanced-options": "Advanced options",
|
"advanced-options": "Advanced options",
|
||||||
"database-regenerated": "Database regenerated",
|
"database-regenerated": "Database regenerated",
|
||||||
|
"the-changes-have-been-saved": "The changes have been saved",
|
||||||
"html-markdown-code-supported": "HTML and Markdown code supported.",
|
"html-markdown-code-supported": "HTML and Markdown code supported.",
|
||||||
"enable-more-features-at": "Enable more features at",
|
"enable-more-features-at": "Enable more features at",
|
||||||
|
"username-already-exists-or-is-empty": "Username already exists or is empty",
|
||||||
|
"password-does-not-match-the-confirm-password":"Password does not match the confirm password",
|
||||||
|
"user-has-been-added-successfully": "User has been added successfully",
|
||||||
|
"an-error-occurred-while-trying-to-create-the-user-account": "An error occurred while trying to create the user account",
|
||||||
|
"an-error-occurred-while-trying-to-delete-the-page": "An error occurred while trying to delete the page",
|
||||||
|
"an-error-occurred-while-trying-to-delete-the-post": "An error occurred while trying to delete the post",
|
||||||
|
"an-error-occurred-while-trying-to-create-the-page": "An error occurred while trying to create the page",
|
||||||
|
"an-error-occurred-while-trying-to-create-the-post": "An error occurred while trying to create the post",
|
||||||
|
"an-error-occurred-while-trying-to-edit-the-post": "An error occurred while trying to edit the post",
|
||||||
|
"an-error-occurred-while-trying-to-edit-the-page": "An error occurred while trying to edit the page",
|
||||||
|
"you-do-not-have-sufficient-permissions": "You do not have sufficient permissions to access this page, contact the administrator.",
|
||||||
"settings-advanced-writting-settings": "Settings->Advanced->Writting Settings",
|
"settings-advanced-writting-settings": "Settings->Advanced->Writting Settings",
|
||||||
"new-posts-and-pages-synchronized": "New posts and pages synchronized.",
|
"new-posts-and-pages-synchronized": "New posts and pages synchronized.",
|
||||||
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
|
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
|
||||||
|
@ -101,9 +120,7 @@
|
||||||
"select-your-sites-language": "Select your site's language.",
|
"select-your-sites-language": "Select your site's language.",
|
||||||
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
|
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
|
||||||
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.",
|
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.",
|
||||||
"email": "Email",
|
"you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.",
|
||||||
"email": "Email",
|
"this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.",
|
||||||
"email": "Email",
|
"write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3"
|
||||||
"email": "Email",
|
|
||||||
"email": "Email"
|
|
||||||
}
|
}
|
|
@ -7,7 +7,5 @@
|
||||||
"author": "Diego",
|
"author": "Diego",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": ""
|
"website": ""
|
||||||
},
|
}
|
||||||
|
|
||||||
"test":"test"
|
|
||||||
}
|
}
|
|
@ -75,11 +75,49 @@ div.footer {
|
||||||
margin: 30px 0;
|
margin: 30px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------
|
||||||
|
Paginator
|
||||||
|
------------------------ */
|
||||||
|
#paginator {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator a {
|
||||||
|
color: #2672ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator ul {
|
||||||
|
clear: both;
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.left {
|
||||||
|
float: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.list {
|
||||||
|
background: #e0e0e0;
|
||||||
|
color: #747474;
|
||||||
|
padding: 2px 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#paginator li.right {
|
||||||
|
float: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------
|
/* ------------------------
|
||||||
Pages and Posts
|
Pages and Posts
|
||||||
------------------------ */
|
------------------------ */
|
||||||
.page,
|
.page,
|
||||||
.post {
|
.post {
|
||||||
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-title,
|
.page-title,
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<p><?php echo $Site->footer(); ?> | Powered by <a target="_blank" href="http://www.bludit.com">Bludit</a></p>
|
<p><?php echo $Site->footer(); ?> | <?php echo $Language->get('Powered by') ?> <a target="_blank" href="http://www.bludit.com">Bludit</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<h1 class="subhead">Recent Posts</h1>
|
<h1 class="subhead"><?php echo $Language->get('Recent posts') ?></h1>
|
||||||
|
|
||||||
<?php foreach ($posts as $Post): ?>
|
<?php foreach ($posts as $Post): ?>
|
||||||
|
|
||||||
|
@ -39,3 +39,7 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo Paginator::html();
|
||||||
|
?>
|
|
@ -1,4 +1,4 @@
|
||||||
<h1 class="subhead">Page</h1>
|
<h1 class="subhead"><?php echo $Language->get('Page') ?></h1>
|
||||||
|
|
||||||
<section class="page">
|
<section class="page">
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<h1 class="subhead">Post</h1>
|
<h1 class="subhead"><?php echo $Language->get('Post') ?></h1>
|
||||||
|
|
||||||
<section class="post">
|
<section class="post">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue