Hereby, I solemnly declare "Administration area" the official designation for our backend. #39 shall be deemed to be settled :D

This commit is contained in:
azett 2020-01-03 19:23:30 +01:00
parent 0cceecaa02
commit e4f542d5cd
6 changed files with 249 additions and 275 deletions

View File

@ -1,9 +1,8 @@
<?php <?php
$lang ['admin'] ['panel'] ['main'] = 'Main';
$lang['admin']['panel']['main'] = 'Main'; $lang ['admin'] ['main'] ['default'] = array(
'head' => 'Welcome to the administration area!',
$lang['admin']['main']['default'] = array(
'head' => 'Welcome to the control panel!',
'descr' => 'Select an action', 'descr' => 'Select an action',
'op1' => 'New Entry', 'op1' => 'New Entry',
@ -17,7 +16,5 @@
'op5' => 'Configuration', 'op5' => 'Configuration',
'op5d' => 'Customize your flatpress', 'op5d' => 'Customize your flatpress',
'op6' => 'Maintenance', 'op6' => 'Maintenance',
'op6d' => 'Clean and restore flatpress', 'op6d' => 'Clean and restore flatpress'
);
);
?>

View File

@ -1,34 +1,32 @@
<?php <?php
$lang ['admin'] ['head'] = 'Administration area';
$lang['admin']['head'] = 'Administration area'; $lang ['admin'] ['panels'] = array(
$lang['admin']['panels'] = array(
'main' => 'Main', 'main' => 'Main',
'config' => 'Options', 'config' => 'Options',
//'users' => 'Users', // 'users' => 'Users',
'entry' => 'Entries', 'entry' => 'Entries',
'static' => 'Statics', 'static' => 'Statics',
'uploader' => 'Uploader', 'uploader' => 'Uploader',
'widgets' => 'Widgets', 'widgets' => 'Widgets',
//'add' => 'Add', // 'add' => 'Add',
//'edit' => 'Edit/Delete', // 'edit' => 'Edit/Delete',
'maintain' => 'Maintain', 'maintain' => 'Maintain',
'plugin' => 'Plugins', 'plugin' => 'Plugins',
'themes' => 'Themes', 'themes' => 'Themes'
//'updates' => 'Updates', // 'updates' => 'Updates',
); );
$lang ['admin'] ['general'] = array(
$lang['admin']['general'] = array( 'id' => 'Id', // for entry ids
'id' => 'Id', # for entry ids 'name' => 'Name', // for file names
'name' => 'Name', # for file names 'title' => 'Title', // for entry/posts/static titles
'title' => 'Title', # for entry/posts/static titles
'comments' => '#Comms', 'comments' => '#Comms',
'author' => 'Author', 'author' => 'Author',
'actdel' => 'Delete', 'actdel' => 'Delete',
'actedit' => 'Edit', 'actedit' => 'Edit',
'actenable' => 'Enable', 'actenable' => 'Enable',
'actdisable'=> 'Disable' 'actdisable' => 'Disable'
); );
?> ?>

View File

@ -1,8 +1,7 @@
<?php <?php
$lang = array();
$lang = array(); $lang ['main'] = array(
$lang['main'] = array(
'nextpage' => 'Next Page &raquo;', 'nextpage' => 'Next Page &raquo;',
'prevpage' => '&laquo; Previous Page', 'prevpage' => '&laquo; Previous Page',
@ -22,11 +21,10 @@
'nocomments' => 'Add a comment', 'nocomments' => 'Add a comment',
'comment' => '1 comment', 'comment' => '1 comment',
'comments' => 'comments', 'comments' => 'comments'
);
); $lang ['search'] = array(
$lang['search'] = array(
'head' => 'Search', 'head' => 'Search',
'fset1' => 'Insert search criteria', 'fset1' => 'Insert search criteria',
@ -35,8 +33,7 @@
'fulltext' => 'Full-text', 'fulltext' => 'Full-text',
'fset2' => 'Date', 'fset2' => 'Date',
'datedescr' => 'You can bind your search to a specific date. You may select an year, an year and a month, or a full date. '. 'datedescr' => 'You can bind your search to a specific date. You may select an year, an year and a month, or a full date. ' . 'Leave blank to search the entire database.',
'Leave blank to search the entire database.',
'fset3' => 'Search in categories', 'fset3' => 'Search in categories',
'catdescr' => 'Don\'t select any to search all', 'catdescr' => 'Don\'t select any to search all',
@ -46,47 +43,40 @@
'headres' => 'Search Results', 'headres' => 'Search Results',
'descrres' => 'Searching for <strong>%s</strong> returned the following results:', 'descrres' => 'Searching for <strong>%s</strong> returned the following results:',
'descrnores'=> 'Searching for <strong>%s</strong> returned no results.', 'descrnores' => 'Searching for <strong>%s</strong> returned no results.',
'moreopts' => 'More options', 'moreopts' => 'More options',
'searchag' => 'Search again'
);
'searchag' => 'Search again', $lang ['search'] ['error'] = array(
);
$lang['search']['error'] = array(
'keywords' => 'You must specify at least one keyword' 'keywords' => 'You must specify at least one keyword'
);
); $lang ['entry'] = array();
$lang ['entry'] ['flags'] = array();
$lang ['entry'] ['flags'] ['long'] = array(
$lang['entry'] = array();
$lang['entry']['flags'] = array();
$lang['entry']['flags']['long'] = array(
'draft' => '<strong>Draft entry</strong>: hidden, awaiting publication', 'draft' => '<strong>Draft entry</strong>: hidden, awaiting publication',
//'static' => '<strong>Static entry</strong>: normally hidden, to reach the entry put ?page=title-of-the-entry in url (experimental)', // 'static' => '<strong>Static entry</strong>: normally hidden, to reach the entry put ?page=title-of-the-entry in url (experimental)',
'commslock' => '<strong>Comments locked</strong>: comments disallowed for this entry' 'commslock' => '<strong>Comments locked</strong>: comments disallowed for this entry'
); );
$lang['entry']['flags']['short'] = array( $lang ['entry'] ['flags'] ['short'] = array(
'draft' => 'Draft', 'draft' => 'Draft',
//'static' => 'Static', // 'static' => 'Static',
'commslock' => 'Comments locked' 'commslock' => 'Comments locked'
); );
$lang['404error'] = array( $lang ['404error'] = array(
'subject' => 'Not Found', 'subject' => 'Not Found',
'content' => '<p>Sorry, we could not find the page you requested</p>' 'content' => '<p>Sorry, we could not find the page you requested</p>'
); );
// Login // Login
$lang['login'] = array( $lang ['login'] = array(
'head' => 'Login', 'head' => 'Login',
'fieldset1' => 'Insert your user name and password', 'fieldset1' => 'Insert your user name and password',
@ -95,25 +85,24 @@
'fieldset2' => 'Do login', 'fieldset2' => 'Do login',
'submit' => 'Login', 'submit' => 'Login',
'forgot' => 'Password lost' 'forgot' => 'Password lost'
); );
$lang['login']['success'] = array( $lang ['login'] ['success'] = array(
'success' => 'You are now logged in.', 'success' => 'You are now logged in.',
'logout' => 'You are now logged out.', 'logout' => 'You are now logged out.',
'redirect' => 'You will be redirected in 5 seconds.', 'redirect' => 'You will be redirected in 5 seconds.',
'opt1' => 'Back to index', 'opt1' => 'Back to index',
'opt2' => 'Go to Control Panel', 'opt2' => 'Go to Admin Area',
'opt3' => 'Add new entry' 'opt3' => 'Add new entry'
); );
$lang['login']['error'] = array( $lang ['login'] ['error'] = array(
'user' => 'You must enter a username.', 'user' => 'You must enter a username.',
'pass' => 'You must enter a password.', 'pass' => 'You must enter a password.',
'match' => 'Password incorrect.' 'match' => 'Password incorrect.'
); );
$lang ['comments'] = array(
$lang['comments'] = array(
'head' => 'Add comment', 'head' => 'Add comment',
'descr' => 'Fill out the form below to add your own comments', 'descr' => 'Fill out the form below to add your own comments',
'fieldset1' => 'User data', 'fieldset1' => 'User data',
@ -128,17 +117,17 @@
'reset' => 'Reset', 'reset' => 'Reset',
'success' => 'Your comment was added successfully', 'success' => 'Your comment was added successfully',
'nocomments' => 'This entry have not been commented yet', 'nocomments' => 'This entry have not been commented yet',
'commslock' => 'Comments have been disabled for this entry', 'commslock' => 'Comments have been disabled for this entry'
); );
$lang['comments']['error'] = array( $lang ['comments'] ['error'] = array(
'name' => 'You must enter a name', 'name' => 'You must enter a name',
'email' => 'You must enter a valid email', 'email' => 'You must enter a valid email',
'www' => 'You must enter a valid URL', 'www' => 'You must enter a valid URL',
'comment' => 'You must enter a comment', 'comment' => 'You must enter a comment'
); );
$lang['date']['month'] = array( $lang ['date'] ['month'] = array(
'January', 'January',
'February', 'February',
@ -152,10 +141,9 @@
'October', 'October',
'November', 'November',
'December' 'December'
);
); $lang ['date'] ['month_abbr'] = array(
$lang['date']['month_abbr'] = array(
'Jan', 'Jan',
'Feb', 'Feb',
@ -169,10 +157,9 @@
'Oct', 'Oct',
'Nov', 'Nov',
'Dec' 'Dec'
);
); $lang ['date'] ['weekday'] = array(
$lang['date']['weekday'] = array(
'Sunday', 'Sunday',
'Monday', 'Monday',
@ -180,11 +167,10 @@
'Wednesday', 'Wednesday',
'Thursday', 'Thursday',
'Friday', 'Friday',
'Saturday', 'Saturday'
);
); $lang ['date'] ['weekday_abbr'] = array(
$lang['date']['weekday_abbr'] = array(
'Sun', 'Sun',
'Mon', 'Mon',
@ -192,10 +178,7 @@
'Wed', 'Wed',
'Thu', 'Thu',
'Fri', 'Fri',
'Sat', 'Sat'
);
);
?> ?>

View File

@ -1,14 +1,10 @@
<?php <?php
$lang ['plugin'] ['adminarea'] = array(
$lang['plugin']['adminarea'] = array( 'subject' => 'Admin',
'subject' => 'Admin area',
'welcome' => 'Welcome home, ', 'welcome' => 'Welcome home, ',
'admin_panel' => 'Admin panel', 'admin_panel' => 'Admin area',
'add_entry' => 'Add entry', 'add_entry' => 'Add entry',
'add_static' => 'Add static', 'add_static' => 'Add static',
'logout' => 'Logout' 'logout' => 'Logout'
);
);
?>

View File

@ -1,13 +1,13 @@
<?php <?php
/*
Plugin Name: AdminArea
Plugin URI: http://www.nowhereland.it/
Description: AdminArea plugin. Part of the standard distribution ;)
Author: NoWhereMan
Version: 1.0
Author URI: http://www.nowhereland.it/
*/
/*
* Plugin Name: AdminArea
* Plugin URI: http://www.nowhereland.it/
* Description: AdminArea plugin. Part of the standard distribution ;)
* Author: NoWhereMan
* Version: 1.0
* Author URI: http://www.nowhereland.it/
*/
function plugin_adminarea_widget() { function plugin_adminarea_widget() {
// load plugin strings // load plugin strings
@ -16,20 +16,20 @@ function plugin_adminarea_widget() {
$baseurl = BLOG_BASEURL; $baseurl = BLOG_BASEURL;
if ($user = user_loggedin()) { if ($user = user_loggedin()) {
$userid = $user['userid']; $userid = $user ['userid'];
$string = <<<END $string = <<<END
<p>{$lang['plugin']['adminarea']['welcome']} <strong>{$userid}</strong> !</p> <p>{$lang['plugin']['adminarea']['welcome']} <strong>{$userid}</strong>!</p>
<ul> <ul>
<li><a href="{$baseurl}admin.php">{$lang['plugin']['adminarea']['admin_panel']}</a></li> <li><a href="{$baseurl}admin.php">{$lang['plugin']['adminarea']['admin_panel']}</a></li>
<li><a href="{$baseurl}admin.php?p=entry&amp;action=write">{$lang['plugin']['adminarea']['add_entry']}</a></li> <li><a href="{$baseurl}admin.php?p=entry&amp;action=write">{$lang['plugin']['adminarea']['add_entry']}</a></li>
<li><a href="{$baseurl}login.php?do=logout">{$lang['plugin']['adminarea']['logout']}</a></li> <li><a href="{$baseurl}login.php?do=logout">{$lang['plugin']['adminarea']['logout']}</a></li>
</ul> </ul>
END; END;
} else } else
$string = '<ul><li><a href="'.$baseurl.'login.php">Login</a></li></ul>'; $string = '<ul><li><a href="' . $baseurl . 'login.php">Login</a></li></ul>';
$entry['subject'] = $lang['plugin']['adminarea']['subject']; $entry ['subject'] = $lang ['plugin'] ['adminarea'] ['subject'];
$entry['content'] = $string; $entry ['content'] = $string;
return $entry; return $entry;
} }

View File

@ -153,7 +153,7 @@ Want to see more?
[h4]And what now?[/h4] [h4]And what now?[/h4]
Now you can [url=login.php]Login[/url] to get to the [url=admin.php]Control Panel[/url] and start posting! Now you can [url=login.php]Login[/url] to get to the [url=admin.php]Administration Area[/url] and start posting!
Have fun! :) Have fun! :)