1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-04 20:27:40 +02:00

Merge remote-tracking branch 'origin/dev'

This commit is contained in:
Awilum
2012-11-29 18:33:16 +02:00
140 changed files with 3133 additions and 1076 deletions

35
.gitignore vendored Normal file
View File

@@ -0,0 +1,35 @@
# ignore os/app generated files
Thumbs.db
.DS_Store
*.esproj
*.project
*.sublime-project
*.sublime-workspace
# ignore user .htaccess
/.htaccess
# ignore user sitemap
/sitemap.xml
# ignore user defines
/monstra/boot/defines.php
# ignore debug and custom themes
/public/themes/*
/admin/themes/*
!/public/themes/default
!/admin/themes/default
# ignore user plugins
/plugins/*
!/plugins/box
!/plugins/captcha
!/plugins/markitup
!/plugins/sandbox
# ignore user files and folders
/backups/*
/public/*
/storage/*
/tmp/*

View File

@@ -1,9 +1,39 @@
Monstra CMS
=============
# Monstra CMS
Monstra - Fast and small content management system written in PHP!
Fast and small content management system written in PHP!
## System Requirements
- UNIX/Linux host
- PHP 5.2.0 or higher
- SimpleXML Module
- Apache Mod Rewrite
- Multibyte String
## Steps to Install
1. [Download the latest version.](http://monstra.org/download)
2. Unzip the contents to a new folder on your local computer.
3. Upload that whole folder with an FTP client to your host.
4. You may also need to recursively CHMOD the folder /storage/, /tmp/, /backups/ and /public/ to 755(or 777) if your host doesn't set it implicitly.
5. Also you may also need to recursively CHMOD the /install.php, /.htaccess and /sitemap.xml to 755(or 777) if your host doesn't set it implicitly.
6. Type http://example.org/install.php in the browser.
## Contributing
1. Help on the [Forum.](http://forum.monstra.org)
2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/about/sponsors)
3. Develop a new plugin.
4. Create a new theme.
5. Find and [report issues.](https://github.com/Awilum/monstra-cms/issues)
6. Link back to [Monstra](http://monstra.org).
## Links
- [Site](http://monstra.org)
- [Forum](http://forum.monstra.org)
- [Documentation](http://monstra.org/documentation)
- [Github Repository](https://github.com/Awilum/monstra-cms)
Site: http://monstra.org
Forum: http://forum.monstra.org
Copyright (C) 2012 Romanenko Sergey / Awilum [awilum@msn.com]

View File

@@ -35,9 +35,6 @@
// Admin login
if (Request::post('login_submit')) {
// Sleep MONSTRA_LOGIN_SLEEP seconds for blocking Brute Force Attacks
sleep(MONSTRA_LOGIN_SLEEP);
$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('login')) {

View File

@@ -91,6 +91,18 @@ h6 {
text-transform: uppercase;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=url]:focus,
input[type=phone]:focus,
input[type=password]:focus,
select:focus,
textarea:focus {
border-color: #999;
box-shadow: none;
}
/**************************************
2. HEADER
*************************************/
@@ -113,8 +125,8 @@ h6 {
.monstra-header h3 a, .monstra-header .brand {
float: left;
display: block;
padding-top:6px;
padding-left:1px;
padding-top:15px;
padding-left:10px;
margin-left: 0px;
color: #fdfdfd;
font-family: arial;
@@ -240,21 +252,22 @@ h6 {
/*************************************
5. AUTHORIZATION
*************************************/
.authorization-block {
margin: 0 auto;
float: none!important;
}
.authorization-block-footer {
margin: 0 auto;
float: none!important;
margin-top:10px;
margin-bottom:10px;
}
.login-body {
background:#F2F2F2;
background-color: #f5f5f5;
}
.form-signin {
max-width: 290px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 5px rgba(0,0,0,.15);
box-shadow: 0 1px 5px rgba(0,0,0,.15);
}
/*************************************
@@ -450,4 +463,16 @@ td, th {
.error-none {display:none;}
.error-field {border:1px solid red!important;}
.container-fluid {padding-left:0px;}
img {max-width:none;}
img {max-width:none;}
a.btn-expand{
color: #333;
text-decoration: none;
padding-left:4px;
padding-right:4px;
}
footer a , footer{
color:#333;
font-size:10px;
}

View File

@@ -33,7 +33,7 @@
<div class="monstra-header">
<div class="monstra-header-inner">
<div class="container-fluid">
<a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo-black.png" height="44" width="191"></a>
<a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo.png" height="27" width="171"></a>
<p class="pull-right">
<?php Navigation::draw('top', Navigation::TOP); ?>
</p>
@@ -95,7 +95,13 @@
<!-- Block_footer -->
<footer>
<p align="right"><span class="badge"><span class="small-white-text">© 2012 <a href="http://monstra.org" class="small-white-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo MONSTRA_VERSION; ?></span></span></p>
<p align="right">
<span style="border-top:1px solid #E0E0E0; padding-top:10px;">
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
© 2012 <a href="http://monstra.org" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Core::VERSION; ?>
</span>
</p>
</footer>
<!-- /Block_footer -->

View File

@@ -50,71 +50,66 @@
</head>
<body class="login-body">
<div class="row">
<div class="well span3 authorization-block">
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo-black.png" height="44" width="191"></a></div>
<div class="administration-area">
<hr>
<div>
<h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br />
<form method="post">
<label><?php echo __('Username', 'users'); ?></label>
<input class="span3" name="login" type="text" />
<div class="container form-signin">
<label><?php echo __('Password', 'users'); ?></label>
<input class="span3" name="password" type="password" />
<br />
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Enter', 'users'); ?>" />
</form>
</div>
</div>
<div class="reset-password-area">
<hr>
<div>
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<form method="post">
<label><?php echo __('Username', 'users'); ?></label>
<input name="login" class="span3" type="text" value="<?php echo $user_login; ?>" />
<?php if (Option::get('captcha_installed') == 'true') { ?>
<label><?php echo __('Captcha'); ?><label>
<input type="text" name="answer" class="span3">
<?php CryptCaptcha::draw(); ?>
<?php } ?>
<br>
<?php
if (count($errors) > 0) {
foreach($errors as $error) {
Alert::error($error);
}
}
?>
<input type="submit" name="reset_password_submit" class="btn" value="<?php echo __('Send New Password', 'users')?>" />
</form>
</div>
</div>
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo.png" height="27" width="171"></a></div>
<div class="administration-area">
<hr>
<div>
<div style="text-align:center;">
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
</div>
<h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br />
<form method="post">
<label><?php echo __('Username', 'users'); ?></label>
<input class="input-xlarge" name="login" type="text" />
<label><?php echo __('Password', 'users'); ?></label>
<input class="input-xlarge" name="password" type="password" />
<br />
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Enter', 'users'); ?>" />
</form>
</div>
</div>
<div class="reset-password-area">
<hr>
<div>
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<form method="post">
<label><?php echo __('Username', 'users'); ?></label>
<input name="login" class="input-xlarge" type="text" value="<?php echo $user_login; ?>" />
<?php if (Option::get('captcha_installed') == 'true') { ?>
<label><?php echo __('Captcha'); ?><label>
<input type="text" name="answer" class="span3">
<?php CryptCaptcha::draw(); ?>
<?php } ?>
<br>
<?php
if (count($errors) > 0) {
foreach($errors as $error) {
Alert::error($error);
}
}
?>
<input type="submit" name="reset_password_submit" class="btn" value="<?php echo __('Send New Password', 'users')?>" />
</form>
</div>
</div>
<hr>
<div>
<div style="text-align:center;">
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
</div>
</div>
</div>
<div class="row">
<div class="span4 authorization-block-footer">
<div style="text-align:center">
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo MONSTRA_VERSION; ?></span>
</div>
</div>
<div style="text-align:center">
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Core::VERSION; ?></span>
</div>
</body>

117
boot/defines.php Normal file
View File

@@ -0,0 +1,117 @@
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
/**
* Monstra CMS Defines
*/
/**
* The filesystem path to the 'monstra' folder
*/
define('MONSTRA', ROOT . DS . 'monstra');
/**
* The filesystem path to the site 'themes' folder
*/
define('THEMES_SITE', ROOT . DS . 'public' . DS . 'themes');
/**
* The filesystem path to the admin 'themes' folder
*/
define('THEMES_ADMIN', ROOT . DS . 'admin' . DS . 'themes');
/**
* The filesystem path to the 'plugins' folder
*/
define('PLUGINS', ROOT . DS . 'plugins');
/**
* The filesystem path to the 'box' folder which is contained within
* the 'plugins' folder
*/
define('PLUGINS_BOX', PLUGINS . DS . 'box');
/**
* The filesystem path to the 'helpers' folder which is contained within
* the 'monstra' folder
*/
define('HELPERS', MONSTRA . DS . 'helpers');
/**
* The filesystem path to the 'engine' folder which is contained within
* the 'monstra' folder
*/
define('ENGINE', MONSTRA . DS . 'engine');
/**
* The filesystem path to the 'boot' folder which is contained within
* the 'monstra' folder
*/
define('BOOT', MONSTRA . DS . 'boot');
/**
* The filesystem path to the 'storage' folder
*/
define('STORAGE', ROOT . DS . 'storage');
/**
* The filesystem path to the 'xmldb' folder
*/
define('XMLDB', STORAGE . DS . 'database');
/**
* The filesystem path to the 'cache' folder
*/
define('CACHE', ROOT . DS . 'tmp' . DS . 'cache');
/**
* The filesystem path to the 'minify' folder
*/
define('MINIFY', ROOT . DS . 'tmp' . DS . 'minify');
/**
* The filesystem path to the 'logs' folder
*/
define('LOGS', ROOT . DS . 'tmp' . DS . 'logs');
/**
* The filesystem path to the 'assets' folder
*/
define('ASSETS', ROOT . DS . 'public' . DS . 'assets');
/**
* The filesystem path to the 'uploads' folder
*/
define('UPLOADS', ROOT . DS . 'public' . DS . 'uploads');
/**
* Set password salt
*/
define('MONSTRA_PASSWORD_SALT', 'YOUR_SALT_HERE');
/**
* Set date format
*/
define('MONSTRA_DATE_FORMAT', 'Y-m-d / H:i:s');
/**
* Set eval php
*/
define('MONSTRA_EVAL_PHP', false);
/**
* Check Monstra CMS version
*/
define('CHECK_MONSTRA_VERSION', true);
/**
* Set gzip output
*/
define('MONSTRA_GZIP', false);
/**
* Monstra database settings
*/
//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');
//define('MONSTRA_DB_USER', 'root');
//define('MONSTRA_DB_PASSWORD', 'password');

View File

@@ -1,3 +1,60 @@
Monstra 2.1.0, xxxx-xx-xx
------------------------
- Localization: PT-BR, UK translations added.
- Default theme: hook "theme_header" added.
- System Plugin: new action "admin_system_extra_index_template_actions" added.
- Shortcodes API: new delete() clear() exists() methods added.
- Options API: new exists() method added.
- Core: new constant VERSION - added.
- Core: added ability to load: defines, actions, filters, shortcodes for current environment.
- Defines: deprecated constants: MONSTRA_GZIP_STYLES, MONSTRA_VERSION, MONSTRA_VERSION_ID, MONSTRA_SITEURL, MONSTRA_MOBILE deleted.
- Box Plugins: used Core::VERSION to compare Monstra CMS version.
- Installer: use version_compare() function to compare php versions.
- Installer: Get system timezone with date_default_timezone_get() function.
- Admin Default Theme: general improvements.
- Users Plugin: user profile editing fixed.
- Shortcodes API: bug with similar shortcode names fixed.
- Site: template() method improvements. Added ability to get template from specific theme.
- Menu Plugin: added ability to select children pages.
- Snippets Plugin: added ability to add parameters for snippets.
- Themes Plugin: added ability to add parameters for chunks.
- Pages Plugin: pages expand/collapse feature added.
- Pages Plugin: pages "access" feature added.
- Pages Plugin: tab "seo" changed to "metadata"
- Pages Table: "expand, "access" fields added.
- Information Plugin: new "Directory Permissions" tab added.
- Twitter Bootstrap updated to Version 2.2.1
- MarkitUp! updated to Version 1.1.13
- Sitemap Plugin: links title issue fixed.
- Core: Init Site module on frontend only.
- Core: IDIORM optimization.
- Site Class: code optimization.
- Sitemap Plugin: bug with priority fixed.
- File .gitignore added.
- Monstra logo updated.
- README: general updates
- Pages Plugin: "delete" action fixes.
- Plugins Manager: add ability to Cleanup minify with new plugin installation or plugin uninstallation.
- MarkitUp Plugin: unnecessary files removed.
- XMLDB: select() method fixes.
- XMLDB: new method existsField() added.
- Information Plugin: shows "PHP Built On", "Web Server", "WebServer to PHP Interface" information.
- Installer: general fixes.
- Blocks Plugin: view embed codes feature added.
- Snippets Plugin: view embed codes feature added.
- Text Helper: method strpSlashes() fixed.
- Text Helper: new method increment() added.
- Pages Plugin: method robots() fixes.
- Pages Plugin: improved page author detection.
- Pages Plugin: add, edit, delete, clone actions improvements.
- Users Plugin: apply "content" filter for "about_me" field.
- Plugin API: Stylesheet and Javascript load() methods - fixed.
- Pages Plugin: Page editing date issue - fixed.
- Localization: EN, RU, IT, LT, DE translations fixed.
- Imformation Plugin: config file(defines.php) checking removed.
- Box Plugins: general code refactoring.
Monstra 2.0.1, 2012-10-18
------------------------
- Localization: DE, LT, IT translations added

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -45,7 +45,7 @@
// Set maintenance mode for all except admin and editor
if ((Session::exists('user_role')) and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) {
// Mosntra show this page :)
// Monstra show this page :)
} else {
die (Text::toHtml(Option::get('maintenance_message')));
}
@@ -59,7 +59,7 @@
// Frontend pre render
Action::run('frontend_post_render');
// Flush (send) the output buffer and turn off output buffering
ob_end_flush();

View File

@@ -1,28 +1,21 @@
<?php
/**
* Monstra :: Installator
* Monstra :: Installator
*/
// Main engine defines
// Main engine defines
if ( ! defined('DS')) define('DS', DIRECTORY_SEPARATOR);
if ( ! defined('ROOT')) define('ROOT', rtrim(dirname(__FILE__), '\\/'));
if ( ! defined('BACKEND')) define('BACKEND', false);
if ( ! defined('MONSTRA_ACCESS')) define('MONSTRA_ACCESS', true);
// Set default timezone
$system_timezone = 'Kwajalein';
$system_timezone = date_default_timezone_get();
// Load bootstrap file
require_once(ROOT . DS . 'monstra' . DS . 'bootstrap.php');
// Setting error display depending on debug mode or not
// Get php version id
if ( ! defined('PHP_VERSION_ID')){
$version = PHP_VERSION;
define('PHP_VERSION_ID', ($version{0} * 10000 + $version{2} * 100 + $version{4}));
}
// Get array with the names of all modules compiled and loaded
$php_modules = get_loaded_extensions();
@@ -38,9 +31,12 @@
// Directories to check
$dir_array = array('public', 'storage', 'backups', 'tmp');
// Languages array
$languages_array = array('en', 'ru', 'lt', 'it', 'de', 'pt-br', 'uk');
// Select Monstra language
if (Request::get('language')) {
if (in_array(Request::get('language'), array('en', 'ru', 'lt', 'it', 'de'))) {
if (in_array(Request::get('language'), $languages_array)) {
if (Option::update('language', Request::get('language'))) {
Request::redirect($site_url);
}
@@ -160,16 +156,18 @@
color: #F74C18;
}
.sep {
color:#ccc;
}
.language-link {
color:#7A7A7C;
}
.language-link+.language-link:before {
color: #ccc;
content: ' | ';
}
.language-link:hover {
color:#000;
text-decoration: none;
}
.language-link-current {
@@ -182,7 +180,8 @@
<body class="install-body">
<!-- Block_wrapper -->
<?php
if (PHP_VERSION_ID < 50200) {
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
$errors['php'] = 'error';
} else {
$errors['php'] = '';
@@ -234,16 +233,14 @@
<!-- Block_wrapper -->
<div class="row">
<div class="span4 install-languages">
<a class="language-link<?php if (Option::get('language') == 'en') echo ' language-link-current';?>" href="<?php echo $site_url.'?language=en'; ?>">en</a> <span class="sep">|</span>
<a class="language-link<?php if (Option::get('language') == 'it') echo ' language-link-current';?>" href="<?php echo $site_url.'?language=it'; ?>">it</a> <span class="sep">|</span>
<a class="language-link<?php if (Option::get('language') == 'lt') echo ' language-link-current';?>" href="<?php echo $site_url.'?language=lt'; ?>">lt</a> <span class="sep">|</span>
<a class="language-link<?php if (Option::get('language') == 'de') echo ' language-link-current';?>" href="<?php echo $site_url.'?language=de'; ?>">de</a> <span class="sep">|</span>
<a class="language-link<?php if (Option::get('language') == 'ru') echo ' language-link-current';?>" href="<?php echo $site_url.'?language=ru'; ?>">ru</a>
<?php foreach($languages_array as $lang_code){?>
<a class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" href="<?php echo $site_url.'?language=' . $lang_code; ?>"><?php echo $lang_code?></a>
<?php } ?>
</div>
</div>
<div class="row">
<div class="well span4 install-block">
<div style="text-align:center;"><a class="brand" href="#"><img src="<?php echo $site_url; ?>public/assets/img/monstra-logo-black.png"></a></div>
<div style="text-align:center;"><a class="brand" href="#"><img src="<?php echo $site_url; ?>public/assets/img/monstra-logo.png" height="27" width="171"></a></div>
<hr>
<div>
<form action="install.php" method="post">
@@ -372,7 +369,7 @@
<ul>
<?php
if (PHP_VERSION_ID < 50200) {
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
echo '<span class="error"><li>'.__('PHP 5.2 or greater is required', 'system').'</li></span>';
} else {
echo '<span class="ok"><li>'.__('PHP Version', 'system').' '.PHP_VERSION.'</li></span>';
@@ -409,9 +406,9 @@
}
if (is_writable(__FILE__)){
echo '<span class="ok"><li>'.__('Install script writable', 'system').'</li></span>';
echo '<span class="ok"><li>'.__('Install script writable', 'system').'</li></span>';
} else {
echo '<span class="error"><li>'.__('Install script not writable', 'system').'</li></span>';
echo '<span class="error"><li>'.__('Install script not writable', 'system').'</li></span>';
}
if (is_writable('sitemap.xml')){
@@ -443,11 +440,11 @@
<div class="row">
<div class="span4 install-block-footer">
<div style="text-align:center">
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo MONSTRA_VERSION; ?></span>
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Core::VERSION; ?></span>
</div>
</div>
</div>
<!-- /Block_wrapper -->
</body>
</html>
</html>

View File

@@ -28,30 +28,30 @@ The precise terms and conditions for copying, distribution and modification foll
TERMS AND CONDITIONS
0. Definitions.
<EFBFBD>This License<73> refers to version 3 of the GNU General Public License.
<EFBFBD>This License<73> refers to version 3 of the GNU General Public License.
<EFBFBD>Copyright<EFBFBD> also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
<EFBFBD>Copyright<EFBFBD> also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
<EFBFBD>The Program<61> refers to any copyrightable work licensed under this License. Each licensee is addressed as <20>you<6F>. <20>Licensees<65> and <20>recipients<74> may be individuals or organizations.
<EFBFBD>The Program<61> refers to any copyrightable work licensed under this License. Each licensee is addressed as <20>you<6F>. <20>Licensees<65> and <20>recipients<74> may be individuals or organizations.
To <20>modify<66> a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a <20>modified version<6F> of the earlier work or a work <20>based on<6F> the earlier work.
To <20>modify<66> a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a <20>modified version<6F> of the earlier work or a work <20>based on<6F> the earlier work.
A <20>covered work<72> means either the unmodified Program or a work based on the Program.
A <20>covered work<72> means either the unmodified Program or a work based on the Program.
To <20>propagate<74> a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To <20>propagate<74> a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To <20>convey<65> a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
To <20>convey<65> a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays <20>Appropriate Legal Notices<65> to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
An interactive user interface displays <20>Appropriate Legal Notices<65> to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The <20>source code<64> for a work means the preferred form of the work for making modifications to it. <20>Object code<64> means any non-source form of a work.
The <20>source code<64> for a work means the preferred form of the work for making modifications to it. <20>Object code<64> means any non-source form of a work.
A <20>Standard Interface<63> means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
A <20>Standard Interface<63> means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The <20>System Libraries<65> of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A <20>Major Component<6E>, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The <20>System Libraries<65> of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A <20>Major Component<6E>, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The <20>Corresponding Source<63> for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The <20>Corresponding Source<63> for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
@@ -78,10 +78,10 @@ You may charge any price or no price for each copy that you convey, and you may
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to <20>keep intact all notices<65>.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to <20>keep intact all notices<65>.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an <20>aggregate<74> if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an <20>aggregate<74> if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
@@ -93,9 +93,9 @@ d) Convey the object code by offering access from a designated place (gratis or
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A <20>User Product<63> is either (1) a <20>consumer product<63>, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, <20>normally used<65> refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
A <20>User Product<63> is either (1) a <20>consumer product<63>, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, <20>normally used<65> refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
<EFBFBD>Installation Information<6F> for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
<EFBFBD>Installation Information<6F> for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
@@ -104,7 +104,7 @@ The requirement to provide Installation Information does not include a requireme
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
<EFBFBD>Additional permissions<6E> are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
<EFBFBD>Additional permissions<6E> are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
@@ -116,7 +116,7 @@ c) Prohibiting misrepresentation of the origin of that material, or requiring th
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered <20>further restrictions<6E> within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
All other non-permissive additional terms are considered <20>further restrictions<6E> within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
@@ -137,24 +137,24 @@ You are not required to accept this License in order to receive or run a copy of
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An <20>entity transaction<6F> is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
An <20>entity transaction<6F> is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A <20>contributor<6F> is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's <20>contributor version<6F>.
A <20>contributor<6F> is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's <20>contributor version<6F>.
A contributor's <20>essential patent claims<6D> are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, <20>control<6F> includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
A contributor's <20>essential patent claims<6D> are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, <20>control<6F> includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a <20>patent license<73> is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To <20>grant<6E> such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
In the following three paragraphs, a <20>patent license<73> is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To <20>grant<6E> such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. <20>Knowingly relying<6E> means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. <20>Knowingly relying<6E> means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is <20>discriminatory<72> if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
A patent license is <20>discriminatory<72> if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
@@ -167,14 +167,14 @@ Notwithstanding any other provision of this License, you have permission to link
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License <20>or any later version<6F> applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License <20>or any later version<6F> applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM <20>AS IS<49> WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM <20>AS IS<49> WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
@@ -187,7 +187,7 @@ END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the <20>copyright<68> line and a pointer to where the full notice is found.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the <20>copyright<68> line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
@@ -204,6 +204,7 @@ To do so, attach the following notices to the program. It is safest to attach th
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
@@ -213,8 +214,8 @@ If the program does terminal interaction, make it output a short notice like thi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an <20>about box<6F>.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an <20>about box<6F>.
You should also get your employer (if you work as a programmer) or school, if any, to sign a <20>copyright disclaimer<65> for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
You should also get your employer (if you work as a programmer) or school, if any, to sign a <20>copyright disclaimer<65> for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -4,4 +4,4 @@
* Set meta generator
*/
Action::add('theme_header', 'setMetaGenerator');
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.MONSTRA_VERSION.'" />'; }
function setMetaGenerator() { echo '<meta name="generator" content="Powered by Monstra '.Core::VERSION.'" />'; }

View File

@@ -5,32 +5,6 @@
* Monstra CMS Defines
*/
/**
* Set gzip output
*/
define('MONSTRA_GZIP', false);
/**
* Set gzip styles
*/
define('MONSTRA_GZIP_STYLES', false);
/**
* Set Monstra version
*/
define('MONSTRA_VERSION', '2.0.1');
/**
* Set Monstra version id
*/
define('MONSTRA_VERSION_ID', 20001);
/**
* Set Monstra site url
*/
define('MONSTRA_SITEURL', 'http://monstra.org');
/**
* The filesystem path to the 'monstra' folder
*/
@@ -109,11 +83,6 @@
* The filesystem path to the 'uploads' folder
*/
define('UPLOADS', ROOT . DS . 'public' . DS . 'uploads');
/**
* Set login sleep value
*/
define('MONSTRA_LOGIN_SLEEP', 1);
/**
* Set password salt
@@ -136,13 +105,13 @@
define('CHECK_MONSTRA_VERSION', true);
/**
* Monstra CMS mobile detection
* Set gzip output
*/
define('MONSTRA_MOBILE', true);
define('MONSTRA_GZIP', false);
/**
* Monstra database settings
*/
define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');
define('MONSTRA_DB_USER', 'root');
define('MONSTRA_DB_PASSWORD', 'password');
//define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306');
//define('MONSTRA_DB_USER', 'root');
//define('MONSTRA_DB_PASSWORD', 'password');

View File

@@ -0,0 +1,8 @@
<?php
/**
* Add new shortcode {siteurl}
*/
Shortcode::add('siteurl', 'returnSiteUrl');
function returnSiteUrl() { return Option::get('siteurl'); }

View File

@@ -19,18 +19,12 @@
Core::$environment = Core::PRODUCTION;
/**
* Include defines
*/
include ROOT . DS . 'monstra' . DS . 'boot' . DS . 'defines.php';
/**
* Monstra requires PHP 5.2.0 or greater
*/
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
exit("Monstra requires PHP 5.2.0 or greater.");
}
exit("Monstra requires PHP 5.2.0 or greater.");
}
/**
@@ -43,38 +37,6 @@
}
/**
* Compress HTML with gzip
*/
if (MONSTRA_GZIP) {
if ( ! ob_start("ob_gzhandler")) ob_start();
} else {
ob_start();
}
/**
* Send default header and set internal encoding
*/
header('Content-Type: text/html; charset=UTF-8');
function_exists('mb_language') AND mb_language('uni');
function_exists('mb_regex_encoding') AND mb_regex_encoding('UTF-8');
function_exists('mb_internal_encoding') AND mb_internal_encoding('UTF-8');
/**
* Gets the current configuration setting of magic_quotes_gpc
* and kill magic quotes
*/
if (get_magic_quotes_gpc()) {
function stripslashesGPC(&$value) { $value = stripslashes($value); }
array_walk_recursive($_GET, 'stripslashesGPC');
array_walk_recursive($_POST, 'stripslashesGPC');
array_walk_recursive($_COOKIE, 'stripslashesGPC');
array_walk_recursive($_REQUEST, 'stripslashesGPC');
}
/**
* Initialize core
*/

View File

@@ -42,6 +42,12 @@
const DEVELOPMENT = 4;
/**
* The version of Monstra
*/
const VERSION = '2.1.0';
/**
* Monstra environment
*
@@ -65,6 +71,38 @@
*/
protected function __construct() {
// Load core defines
Core::loadDefines();
/**
* Compress HTML with gzip
*/
if (MONSTRA_GZIP) {
if ( ! ob_start("ob_gzhandler")) ob_start();
} else {
ob_start();
}
/**
* Send default header and set internal encoding
*/
header('Content-Type: text/html; charset=UTF-8');
function_exists('mb_language') AND mb_language('uni');
function_exists('mb_regex_encoding') AND mb_regex_encoding('UTF-8');
function_exists('mb_internal_encoding') AND mb_internal_encoding('UTF-8');
/**
* Gets the current configuration setting of magic_quotes_gpc
* and kill magic quotes
*/
if (get_magic_quotes_gpc()) {
function stripslashesGPC(&$value) { $value = stripslashes($value); }
array_walk_recursive($_GET, 'stripslashesGPC');
array_walk_recursive($_POST, 'stripslashesGPC');
array_walk_recursive($_COOKIE, 'stripslashesGPC');
array_walk_recursive($_REQUEST, 'stripslashesGPC');
}
// Error handling for Developers only.
if (Core::$environment != Core::PRODUCTION) {
@@ -85,9 +123,11 @@
Session::start();
// Init ORM
ORM::configure(MONSTRA_DB_DSN);
ORM::configure('username', MONSTRA_DB_USER);
ORM::configure('password', MONSTRA_DB_PASSWORD);
if (defined('MONSTRA_DB_DSN')) {
ORM::configure(MONSTRA_DB_DSN);
ORM::configure('username', MONSTRA_DB_USER);
ORM::configure('password', MONSTRA_DB_PASSWORD);
}
// Auto cleanup if MONSTRA_DEBUG is true
if (Core::$environment == Core::DEVELOPMENT) {
@@ -121,11 +161,8 @@
// Load Shortcodes API module
require_once(ENGINE . DS . 'shortcodes.php');
// Load default filters
require_once(BOOT . DS . 'filters.php');
// Load default hooks
require_once(BOOT . DS . 'hooks.php');
// Load default
Core::loadPluggable();
// Init I18n
I18n::init(Option::get('language'));
@@ -140,7 +177,7 @@
require_once(ENGINE . DS . 'site.php');
// Init site module
Site::init();
if( ! BACKEND) Site::init();
}
@@ -155,6 +192,81 @@
}
/**
* Load Defines
*/
protected static function loadDefines() {
$environments = array(1 => 'production',
2 => 'staging',
3 => 'testing',
4 => 'development');
$root_defines = ROOT . DS . 'boot' . DS . 'defines.php';
$environment_defines = ROOT . DS . 'boot' . DS . $environments[Core::$environment] . DS . 'defines.php';
$monstra_defines = ROOT . DS . 'monstra' . DS . 'boot' . DS . 'defines.php';
if (file_exists($root_defines)) {
include $root_defines;
} elseif(file_exists($environment_defines)) {
include $environment_defines;
} elseif(file_exists($monstra_defines)) {
include $monstra_defines;
} else {
throw new RuntimeException("The defines file does not exist.");
}
}
/**
* Load Pluggable
*/
protected static function loadPluggable() {
$environments = array(1 => 'production',
2 => 'staging',
3 => 'testing',
4 => 'development');
$root_pluggable = ROOT . DS . 'boot';
$environment_pluggable = ROOT . DS . 'boot' . DS . $environments[Core::$environment];
$monstra_pluggable = ROOT . DS . 'monstra' . DS . 'boot';
if (file_exists($root_pluggable . DS . 'filters.php')) {
include $root_pluggable . DS . 'filters.php';
} elseif(file_exists($environment_pluggable . DS . 'filters.php')) {
include $environment_pluggable . DS . 'filters.php';
} elseif(file_exists($monstra_pluggable . DS . 'filters.php')) {
include $monstra_pluggable . DS . 'filters.php';
} else {
throw new RuntimeException("The pluggable file does not exist.");
}
if (file_exists($root_pluggable . DS . 'actions.php')) {
include $root_pluggable . DS . 'actions.php';
} elseif(file_exists($environment_pluggable . DS . 'actions.php')) {
include $environment_pluggable . DS . 'actions.php';
} elseif(file_exists($monstra_pluggable . DS . 'actions.php')) {
include $monstra_pluggable . DS . 'actions.php';
} else {
throw new RuntimeException("The pluggable file does not exist.");
}
if (file_exists($root_pluggable . DS . 'shortcodes.php')) {
include $root_pluggable . DS . 'shortcodes.php';
} elseif(file_exists($environment_pluggable . DS . 'shortcodes.php')) {
include $environment_pluggable . DS . 'shortcodes.php';
} elseif(file_exists($monstra_pluggable . DS . 'shortcodes.php')) {
include $monstra_pluggable . DS . 'shortcodes.php';
} else {
throw new RuntimeException("The pluggable file does not exist.");
}
}
/**
* Exception Handler
*
@@ -359,6 +471,7 @@
highlight_string('<?php ' . str_replace('/*', '#$@r4!/*', $string), true));
}
/**
* Convert errors not caught by the errorHandler to ErrorExceptions.

View File

@@ -164,4 +164,26 @@
return Option::$options->deleteWhere('[name="'.$option.'"]');
}
/**
* Check if option exist
*
* <code>
* if (Option::exists('pages_limit')) {
* // do something...
* }
* </code>
*
* @param string $option Name of option to check.
* @return boolean
*/
public static function exists($option) {
// Redefine vars
$option = (string) $option;
// Check if option exists
return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false;
}
}

View File

@@ -951,50 +951,56 @@
// Sort stylesheets by priority
$stylesheets = Arr::subvalSort(Stylesheet::$stylesheets, 'priority');
// Build backend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) {
if ( ! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) {
$backend_regenerate = true;
break;
}
}
}
if (BACKEND) {
// Regenerate site stylesheet
if ($backend_regenerate) {
foreach ($stylesheets as $stylesheet) {
// Build backend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) {
$backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
if ( ! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) {
$backend_regenerate = true;
break;
}
}
}
$backend_buffer = Stylesheet::parseVariables($backend_buffer);
file_put_contents($backend_site_css_path, Minify::css($backend_buffer));
$backend_regenerate = false;
}
// Build frontend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) {
if ( ! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) {
$frontend_regenerate = true;
break;
// Regenerate site stylesheet
if ($backend_regenerate) {
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) {
$backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
}
}
}
$backend_buffer = Stylesheet::parseVariables($backend_buffer);
file_put_contents($backend_site_css_path, Minify::css($backend_buffer));
$backend_regenerate = false;
}
// Regenerate site stylesheet
if ($frontend_regenerate) {
foreach ($stylesheets as $stylesheet) {
} else {
// Build frontend site stylesheets
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) {
$frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
if ( ! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) {
$frontend_regenerate = true;
break;
}
}
}
$frontend_buffer = Stylesheet::parseVariables($frontend_buffer);
file_put_contents($frontend_site_css_path, Minify::css($frontend_buffer));
$frontend_regenerate = false;
}
// Regenerate site stylesheet
if ($frontend_regenerate) {
foreach ($stylesheets as $stylesheet) {
if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) {
$frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']);
}
}
$frontend_buffer = Stylesheet::parseVariables($frontend_buffer);
file_put_contents($frontend_site_css_path, Minify::css($frontend_buffer));
$frontend_regenerate = false;
}
}
// Render
if (BACKEND) {
@@ -1089,47 +1095,53 @@
// Sort javascripts by priority
$javascripts = Arr::subvalSort(Javascript::$javascripts, 'priority');
// Build backend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) {
if ( ! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) {
$backend_regenerate = true;
break;
}
}
}
// Regenerate site javascript
if ($backend_regenerate) {
foreach ($javascripts as $javascript) {
if (BACKEND) {
// Build backend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) {
$backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
}
if ( ! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) {
$backend_regenerate = true;
break;
}
}
}
file_put_contents($backend_site_js_path, $backend_buffer);
$backend_regenerate = false;
}
// Build frontend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
if ( ! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) {
$frontend_regenerate = true;
break;
}
}
}
// Regenerate site javascript
if ($frontend_regenerate) {
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
$frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
// Regenerate site javascript
if ($backend_regenerate) {
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) {
$backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
}
}
file_put_contents($backend_site_js_path, $backend_buffer);
$backend_regenerate = false;
}
file_put_contents($frontend_site_js_path, $frontend_buffer);
$frontend_regenerate = false;
} else {
// Build frontend site javascript
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
if ( ! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) {
$frontend_regenerate = true;
break;
}
}
}
// Regenerate site javascript
if ($frontend_regenerate) {
foreach ($javascripts as $javascript) {
if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) {
$frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']);
}
}
file_put_contents($frontend_site_js_path, $frontend_buffer);
$frontend_regenerate = false;
}
}
// Render

View File

@@ -56,7 +56,7 @@
/**
* Add shortcode
* Add new shortcode
*
* <code>
* function returnSiteUrl() {
@@ -79,6 +79,59 @@
if (is_callable($callback_function)) Shortcode::$shortcode_tags[$shortcode] = $callback_function;
}
/**
* Remove a specific registered shortcode.
*
* <code>
* Shortcode::delete('shortcode_name');
* </code>
*
* @param string $shortcode Shortcode tag.
*/
public static function delete($shortcode) {
// Redefine vars
$shortcode = (string) $shortcode;
// Delete shortcode
if (Shortcode::exists($shortcode)) unset(Shortcode::$shortcode_tags[$shortcode]);
}
/**
* Remove all registered shortcodes.
*
* <code>
* Shortcode::clear();
* </code>
*
*/
public static function clear() {
Shortcode::$shortcode_tags = array();
}
/**
* Check if a shortcode has been registered.
*
* <code>
* if (Shortcode::exists('shortcode_name')) {
* // do something...
* }
* </code>
*
* @param string $shortcode Shortcode tag.
*/
public static function exists($shortcode) {
// Redefine vars
$shortcode = (string) $shortcode;
// Check shortcode
return array_key_exists($shortcode, Shortcode::$shortcode_tags);
}
/**
* Parse a string, and replace any registered shortcodes within it with the result of the mapped callback.
@@ -95,8 +148,8 @@
if ( ! Shortcode::$shortcode_tags) return $content;
$shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags)));
$pattern = "/(.?)\{($shortcodes)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s";
$pattern = "/(.?)\{([$shortcodes]+)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s";
return preg_replace_callback($pattern, 'Shortcode::_handle', $content);
}
@@ -127,7 +180,8 @@
}
}
return $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix;
// Check if this shortcode realy exists then call user function else return empty string
return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : '';
}
}

View File

@@ -96,12 +96,8 @@
*
* @return string
*/
public static function title() {
// Get title
$title = call_user_func(ucfirst(Uri::command()).'::title');
return $title;
public static function title() {
return call_user_func(ucfirst(Uri::command()).'::title');
}
@@ -114,16 +110,8 @@
*
* @return string
*/
public static function description() {
// Get description
$description = call_user_func(ucfirst(Uri::command()).'::description');
if (trim($description) !== '') {
return Html::toText($description);
} else {
return Html::toText(Option::get('description'));
}
public static function description() {
return (trim(call_user_func(ucfirst(Uri::command()).'::description')) == '') ? Html::toText(Option::get('description')) : Html::toText($description);
}
@@ -137,16 +125,7 @@
* @return string
*/
public static function keywords() {
// Get keywords
$keywords = call_user_func(ucfirst(Uri::command()).'::keywords');
if (trim($keywords) !== '') {
return Html::toText($keywords);
} else {
return Html::toText(Option::get('keywords'));
}
return (trim(call_user_func(ucfirst(Uri::command()).'::keywords')) == '') ? Html::toText(Option::get('keywords')) : Html::toText($description);
}
@@ -173,12 +152,8 @@
*
* @return string
*/
public static function content() {
// Get content
$content = call_user_func(ucfirst(Uri::command()).'::content');
return Filter::apply('content', $content);
public static function content() {
return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content'));
}
@@ -189,12 +164,13 @@
* echo Site::template();
* </code>
*
* @param string $theme Theme name
* @return mixed
*/
public static function template() {
public static function template($theme = null) {
// Get current theme
$current_theme = Option::get('theme_site_name');
// Get specific theme or current theme
$current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ;
// Get template
$template = call_user_func(ucfirst(Uri::command()).'::template');
@@ -246,12 +222,7 @@
* @return string
*/
public static function powered() {
return __('Powered by', 'system').' <a href="' . MONSTRA_SITEURL . '" target="_blank">Monstra</a> ' . MONSTRA_VERSION;
return __('Powered by', 'system').' <a href="http://monstra.org" target="_blank">Monstra</a> ' . Core::VERSION;
}
}
// Add new shortcode {siteurl}
Shortcode::add('siteurl', 'returnSiteUrl');
function returnSiteUrl() { return Option::get('siteurl'); }
}

View File

@@ -493,6 +493,34 @@
}
/**
* Check if field exist
*
* <code>
* if ($users->existsField('field_name')) {
* // do something...
* }
* </code>
*
* @param string $name Name of field to check.
* @return boolean
*/
public function existsField($name) {
// Redefine vars
$name = (string) $name;
// Get table
$table = $this->table;
// Select field
$field = Table::_selectOne($this->table, "fields/{$name}");
// Return true or false
return ($field == null) ? false : true;
}
/**
* Add new record
*
@@ -626,31 +654,11 @@
// $users->select('[status="active"]', 'all');
// or
// $users->select('[status="active"]');
if ($row_count == 'all') {
foreach ($tmp as $record) {
$data[] = $record;
}
foreach ($tmp as $record) {
$data[] = $record;
}
$_records = $data;
} else {
// Else select records like
// eg: $users->select(null, 2, 1);
foreach($tmp as $record) {
$data[] = $record;
}
// If offset is null slice array from end else from begin
if ($offset === null) {
$_records = array_slice($data, -$row_count, $row_count);
} else {
$_records = array_slice($data, $offset, $row_count);
}
}
$_records = $data;
}
// If array of fields is exits then get records with this fields only
@@ -665,7 +673,6 @@
$record_array[$count][$field] = (string)$record->$field;
}
//$record_array[$count]['id'] = (int)$record['id'];
$record_array[$count]['id'] = (int)$record->id;
if ($order_by == 'id') {
@@ -677,7 +684,17 @@
$count++;
}
$records = Table::subvalSort($record_array, 'sort', $order);
// Sort records
$records = Table::subvalSort($record_array, 'sort', $order);
// Slice records array
if ($offset === null && is_int($row_count)) {
$records = array_slice($records, -$row_count, $row_count);
} elseif($offset !== null && is_int($row_count)) {
$records = array_slice($records, $offset, $row_count);
}
}
} else {
@@ -687,19 +704,41 @@
if ( ! $one_record) {
$count = 0;
foreach ($_records as $xml_objects) {
$vars = get_object_vars($xml_objects);
foreach ($vars as $key => $value) {
$records[$count][$key] = (string)$value;
$records[$count][$key] = (string)$value;
if ($order_by == 'id') {
$records[$count]['sort'] = (int)$vars['id'];
} else {
$records[$count]['sort'] = (string)$value;
}
}
$count++;
}
// Sort records
$records = Table::subvalSort($records, 'sort', $order);
// Slice records array
if ($offset === null && is_int($row_count)) {
$records = array_slice($records, -$row_count, $row_count);
} elseif($offset !== null && is_int($row_count)) {
$records = array_slice($records, $offset, $row_count);
}
} else {
// Single record
$vars = get_object_vars($_records[0]);
foreach ($vars as $key => $value) {
$records[$key] = (string)$value;
}
}
}
}
// Return records

View File

@@ -97,22 +97,20 @@
* echo Text::strpSlashes('some \ text \ here');
* </code>
*
* @param string $str String with slashes
* @return string
* @param mixed $str String or array of strings with slashes
* @return mixed
*/
public static function strpSlashes($str) {
// Redefine vars
$str = (string) $str;
if (is_array($str)) {
foreach ($str as $key => $val) {
$str[$key] = stripslashes($val);
$result[$key] = stripslashes($val);
}
} else {
$str = stripslashes($str);
$result = stripslashes($str);
}
return $str;
return $result;
}
@@ -227,6 +225,26 @@
break;
}
}
/**
* Add's _1 to a string or increment the ending number to allow _2, _3, etc
*
* <code>
* $str = Text::increment($str);
* </code>
*
* @param string $str String to increment
* @param integer $first Start with
* @param string $separator Separator
* @return string
*/
public static function increment($str, $first = 1, $separator = '_') {
preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match);
return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first;
}
/**

View File

@@ -93,7 +93,8 @@
* @return string
*/
public static function find($url) {
$pos = strpos($url, 'http://');
$https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
$pos = strpos($url, $https);
if ($pos === false) { $url_output = Option::get('siteurl') . $url; } else { $url_output = $url; }
return $url_output;
}
@@ -109,7 +110,7 @@
* @return string
*/
public static function base() {
return 'http://' . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
$https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';
return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
}
}

View File

@@ -2,10 +2,10 @@
return array(
'backup' => array(
'Backups' => 'Atsarginės kopijos',
'Backups' => 'Atsarginės kopijos',
'Backup date' => 'Atsarginės kopijos data',
'Create backup' => 'Sukurti atsarginę kopiją',
'Delete' => 'Ištrinti',
'Create backup' => 'Sukurti atsarginę kopiją',
'Delete' => 'Ištrinti',
'storage' => 'storage',
'public' => 'public',
'plugins' => 'plugins',
@@ -14,4 +14,4 @@
'Delete backup: :backup' => 'Ištrinti: :backup',
'Creating...' => 'Kuriama...',
)
);
);

View File

@@ -0,0 +1,17 @@
<?php
return array(
'backup' => array(
'Backups' => 'Backups',
'Backup date' => 'Data do backup',
'Create backup' => 'Criar',
'Delete' => 'Deletar',
'storage' => 'storage',
'public' => 'public',
'plugins' => 'plugins',
'Size' => 'Tamanho',
'Actions' => 'Ações',
'Delete backup: :backup' => 'Deletar o backup: :backup',
'Creating...' => 'Criando backup...',
)
);

View File

@@ -0,0 +1,17 @@
<?php
return array(
'backup' => array(
'Backups' => 'Бекапи',
'Backup date' => 'Бекап',
'Create backup' => 'Зробити бекап',
'Delete' => 'Видалити',
'storage' => 'дані',
'public' => 'публічна',
'plugins' => 'плагіни',
'Size' => 'Розмір',
'Actions' => 'Дії',
'Delete backup: :backup' => 'Видалити бекап: :backup',
'Creating...' => 'Створення...',
)
);

View File

@@ -1,10 +1,14 @@
<?php
// Add plugin navigation link
Navigation::add(__('Blocks', 'blocks'), 'content', 'blocks', 2);
// Add Plugin Javascript
Javascript::add('plugins/box/blocks/js/blocks.js', 'backend');
class BlocksAdmin extends Backend {
/**
* Blocks admin function
*/

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -0,0 +1,18 @@
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.blocks = {
init: function() { },
showEmbedCodes: function(name) {
$('#shortcode').html('{block get="'+name+'"}');
$('#phpcode').html('&lt;?php echo Block::get("'+name+'"); ?&gt;');
$('#embedCodes').modal();
}
};
$(document).ready(function(){
$.monstra.blocks.init();
});

View File

@@ -21,5 +21,9 @@
'Block <i>:name</i> deleted' => 'Block <i>:name</i> gelöscht',
'Your changes to the block <i>:name</i> have been saved.' => 'Deine Änderungen für den Block <i>:name</i> wurden übernommen.',
'Delete block: :block' => 'Lösche Block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -21,5 +21,9 @@
'Block <i>:name</i> deleted' => 'Block <i>:name</i> deleted',
'Your changes to the block <i>:name</i> have been saved.' => 'Your changes to the block <i>:name</i> have been saved.',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -21,5 +21,9 @@
'Block <i>:name</i> deleted' => 'Snippet <i>:name</i> è stato eliminato',
'Your changes to the block <i>:name</i> have been saved.' => 'Le modifiche al blocco: <i>nome</ i> sono state salvate.',
'Delete block: :block' => 'Elimina blocco: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -20,5 +20,10 @@
'Block content' => 'Bloko turinys',
'Block <i>:name</i> deleted' => 'Blokas <i>:name</i> ištrintas',
'Your changes to the block <i>:name</i> have been saved.' => 'Bloko <i>:name</i> pakeitimai išsaugoti.',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -0,0 +1,29 @@
<?php
return array(
'blocks' => array(
'Blocks' => 'Blocos',
'Blocks manager' => 'Gerenciador de blocos',
'Delete' => 'Deletar',
'Edit' => 'Editar',
'Name' => 'Nome',
'Create new block' => 'Criar novo bloco',
'New block' => 'Novo bloco',
'Edit block' => 'Editar bloco',
'Save' => 'Salvar',
'Save and exit' => 'Salvar e sair',
'Actions' => 'Ações',
'Required field' => 'Campo requerido',
'This block already exists' => 'Este bloco já existe',
'This block does not exist' => 'Este bloco não existe',
'Delete block: :block' => 'Deletar o bloco: :block',
'Block content' => 'Conteúdo do bloco',
'Block <i>:name</i> deleted' => 'Bloco <i>:name</i> deletado',
'Your changes to the block <i>:name</i> have been saved.' => 'Suas mudanças no bloco <i>:name</i> foram salvas',
'Delete block: :block' => 'Delete block: :block',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -21,5 +21,9 @@
'Block <i>:name</i> deleted' => 'Сниппет <i>:name</i> удален',
'Your changes to the block <i>:name</i> have been saved.' => 'Ваши изменения к блоку <i>:name</i> были сохранены.',
'Delete block: :block' => 'Удалить блок: :block',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
)
);

View File

@@ -0,0 +1,29 @@
<?php
return array(
'blocks' => array(
'Blocks' => 'Блоки',
'Blocks manager' => 'Менеджер блоків',
'Delete' => 'Видалити',
'Edit' => 'Редагувати',
'New block' => 'Новий блок',
'Create new block' => 'Створити новий блок',
'Name' => 'Назва',
'Edit block' => 'Редагування блоку',
'Save' => 'Зберегти',
'Actions' => 'Дії',
'Save and exit' => 'Зберегти та вийти',
'Required field' => 'Обов&prime;язкове поле',
'This block already exists' => 'Такий блок вже існує',
'This block does not exist' => 'Такого блоку не існує',
'Delete block: :block' => 'Видалити блок: :block',
'Block content' => 'Вміст блоку',
'Block <i>:name</i> deleted' => 'Сніппет <i>:name</i> вилучен',
'Your changes to the block <i>:name</i> have been saved.' => 'Ваші зміни до блоку <i>:name</i> були збережені.',
'Delete block: :block' => 'Видалити блок: :block',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
)
);

View File

@@ -14,21 +14,48 @@
<!-- Blocks_list -->
<table class="table table-bordered">
<thead>
<tr><td><?php echo __('Blocks', 'blocks'); ?></td><td width="30%"><?php echo __('Actions', 'blocks'); ?></td></tr>
<tr>
<td><?php echo __('Blocks', 'blocks'); ?></td>
<td width="40%"><?php echo __('Actions', 'blocks'); ?></td>
</tr>
</thead>
<tbody>
<?php if (count($blocks_list) != 0) foreach ($blocks_list as $block) { ?>
<tr>
<td><?php echo basename($block, '.block.html'); ?></td>
<td>
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions')); ?>
<?php echo Html::anchor(__('Delete', 'blocks'),
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
?>
<td><?php echo basename($block, '.block.html'); ?></td>
<td>
<div class="btn-toolbar">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions')); ?>
<a class="btn dropdown-toggle btn-actions" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes("'.basename($block, '.block.html').'");')); ?></li>
</ul>
<?php echo Html::anchor(__('Delete', 'blocks'),
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
?>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<!-- /Blocks_list -->
<!-- /Blocks_list -->
<div id="embedCodes" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3><?php echo __('Embed Code', 'blocks'); ?></h3>
</div>
<div class="modal-body">
<p>
<b><?php echo __('Shortcode', 'blocks'); ?></b><br>
<code id="shortcode"></code>
<br> <br>
<b><?php echo __('PHP Code', 'blocks'); ?></b><br>
<code id="phpcode"></code>
</p>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<?php
return array(
'Editor' => array(
'Editor' => 'Editor',
'Editor plugin' => 'Plugin do editor',
)
);

View File

@@ -0,0 +1,8 @@
<?php
return array(
'Editor' => array(
'Editor' => 'Редактор',
'Editor plugin' => 'Редактор плагіну',
)
);

View File

@@ -1,7 +1,7 @@
<?php
Navigation::add(__('Files', 'filesmanager'), 'content', 'filesmanager', 2);
Navigation::add(__('Files', 'filesmanager'), 'content', 'filesmanager', 3);
class FilesmanagerAdmin extends Backend {

View File

@@ -0,0 +1,17 @@
<?php
return array(
'filesmanager' => array(
'Files' => 'Arquivos',
'Files manager' => 'Gerenciador de arquivos',
'Name' => 'Nome',
'Actions' => 'Ações',
'Delete' => 'Deletar',
'Upload' => 'Upload',
'directory' => 'directory',
'Delete directory: :dir' => 'Deletar o diretório: :dir',
'Delete file: :file' => 'Deletar o arquivo :file',
'Extension' => 'Extensão',
'Size' => 'Tamanho',
)
);

View File

@@ -0,0 +1,17 @@
<?php
return array(
'filesmanager' => array(
'Files' => 'Файли',
'Files manager' => 'Менеджер файлів',
'Name' => 'Назва',
'Actions' => 'Дії',
'Delete' => 'Видалити',
'Upload' => 'Загрузити',
'directory' => 'директорія',
'Delete directory: :dir' => 'Видалити директорію: :dir',
'Delete file: :file' => 'Видалити файл: :file',
'Extension' => 'Розширення',
'Size' => 'Розмір',
)
);

View File

@@ -16,8 +16,6 @@
'DOM module' => 'DOM Modul',
'Installed' => 'Installiert',
'Not Installed' => 'Nicht Installiert',
'System version' => 'System Version',
'System version ID' => 'System Versions ID',
'Security check results' => 'Sicherheits-Check Ergebnisse',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Die Konfigurationsdatei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte für defines.php auf Produktionssystemen zu entfernen.',
@@ -29,5 +27,14 @@
'Die Monstra index.php Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen. <br/>Du kannst dies auf Unix-Systemen ganz einfach mit: <code>chmod a-w :path</code> erledigen.',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Aufgrund der Art und Menge der Informationen kann ein Fehler Eindringlinge ergeben wenn Core::$environment = Core::DEVELOPMENT, wir raten dringend dazu folgendermaßen Core::PRODUCTION in Produktionssystemen einzustellen.',
'Monstra version' => 'Monstra version',
'Directory Permissions' => 'Directory Berechtigungen',
'Directory' => 'Verzeichnis',
'Writable' => 'Writable',
'Unwritable' => 'Nicht beschreibbar',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);

View File

@@ -16,8 +16,6 @@
'DOM module' => 'DOM module',
'Installed' => 'Installed',
'Not Installed' => 'Not Installed',
'System version' => 'System version',
'System version ID' => 'System version ID',
'Security check results' => 'Security check results',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.',
@@ -29,5 +27,14 @@
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.',
'Monstra version' => 'Monstra version',
'Directory Permissions' => 'Directory Permissions',
'Directory' => 'Directory',
'Writable' => 'Writable',
'Unwritable' => 'Unwritable',
'Status' => 'Status',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);

View File

@@ -16,8 +16,6 @@
'DOM module' => 'Modulo DOM',
'Installed' => 'Installato',
'Not Installed' => 'Non installato',
'System version' => 'Versione del sistema',
'System version ID' => 'Versione del sistema ID',
'Security check results' => 'Risultato del controllo di sicurezza',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Il file di configurazione è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per defines.php file sul sito funzionante.',
@@ -29,5 +27,14 @@
'Principale file index.php è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale index.php. <br/> È possibile eseguire questa operazione su sistemi UNIX così: <code>chmod -R a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Il sistema opera con lo stato Core::DEVELOPMENT Si consiglia di impostare lo stato Core::PRODUCTION sul sito funzionante.',
'Monstra version' => 'Monstra versione',
'Directory Permissions' => 'Directory Autorizzazioni',
'Directory' => 'Directory',
'Writable' => 'Scrivibile',
'Unwritable' => 'Non scrivibile',
'Status' => 'Stato',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);

View File

@@ -16,8 +16,6 @@
'DOM module' => 'DOM modulis',
'Installed' => 'Įdiegta',
'Not Installed' => 'Neįdiegta',
'System version' => 'Systemos versija',
'System version ID' => 'Systemos versijos ID',
'Security check results' => 'Saugumo patikrinimo rezultatai',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Leidžiama perrašyti nustatymų bylą. Siūlome pašalinti visus rašymo leidimus sistemos bylai defines.php.',
@@ -29,5 +27,14 @@
'Monstra index.php bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus. <br/>Tai galite padaryti Unix sistemoje su: <code>chmod a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Dėl įsilaužimų grėsmės atvaiduojant klaidų pranešimus Core::$environment = Core::DEVELOPMENT veiksenoje, rekomenduojame naudoti Core::PRODUCTION nustatymą nuolatinėje tinklapio veiksenoje.',
'Monstra version' => 'Monstra versija',
'Directory Permissions' => 'Katalogo teisės',
'Directory' => 'Katalogas',
'Writable' => 'Rašomas',
'Unwritable' => 'Nerašomas',
'Status' => 'Būsena',
'PHP Built On' => 'PHP veikia su',
'Web Server' => 'Serverio prog. įranga',
'WebServer to PHP Interface' => 'PHP naudoja šį SAPI',
)
);

View File

@@ -0,0 +1,40 @@
<?php
return array(
'information' => array(
'Information' => 'Informações',
'Debugging' => 'Debug',
'Name' => 'Nome',
'Value' => 'Valor',
'Security' => 'Segurança',
'System' => 'Sistema',
'on' => 'on',
'off'=> 'off',
'Server' => 'Servidor',
'PHP version' => 'Versão do PHP',
'SimpleXML module' => 'Módulo SimpleXML',
'DOM module' => 'Módulo DOM',
'Installed' => 'Instalado',
'Not Installed' => 'Não instalado',
'Security check results' => 'Resultados da verificação de segurança',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'O arquivo de configuração está com permissões de escrita. Para melhor segurança, você deve remover as permissões de escrita do arquivo defines.php em sistemas de produções.',
'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>
'O diretório núcleo do Monstra (":path") e/ou arquivos dentro do diretório estão com permissões de escrita. Para melhor segurança, você deve remover as permissões de escritas. <br/>Você pode fazer isso em sistemas UNIX com: <code>chmod -R a-w :path</code>',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'O arquivo .htaccess da pasta de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas. <br/>Você pode fazer isso em sistemas UNIX com: <code>chmod a-w :path</code>',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'O arquivo index.php do diretório de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas. <br/>Vocês pode fazer isso em sistemas UNIX com: <code>chmod a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Devide ao tipo e quantidade de informações, um erro pode trazer possíveis intrusos se a variável Core::$environment for igual à Core::DEVELOPMENT, para isso nós recomendamos fortemente que você sete a variável para o seguinte valor: Core::PRODUCTION em sistemas de produção.',
'Monstra version' => 'Monstra versão',
'Directory Permissions' => 'Permissões de Diretório',
'Directory' => 'Diretório',
'Writable' => 'Gravável',
'Unwritable' => 'Unwritable',
'Status' => 'Estado',
'PHP Built On' => 'PHP Built On',
'Web Server' => 'Web Server',
'WebServer to PHP Interface' => 'WebServer to PHP Interface',
)
);

View File

@@ -3,7 +3,7 @@
return array(
'information' => array(
'Information' => 'Информация',
'Debuging' => 'Дебаггинг',
'Debugging' => 'Дебаггинг',
'Name' => 'Название',
'Value' => 'Значение',
'Security' => 'Безопасность',
@@ -16,8 +16,6 @@
'DOM module' => 'DOM модуль',
'Installed' => 'Установлен',
'Not Installed' => 'Не установлен',
'System version' => 'Версия системы',
'System version ID' => 'Версия системы ID',
'Security check results' => 'Результаты проверки безопасности',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Конфигурационный файл доступен для записи. Мы рекомендуем вам удалить права записи на файл defines.php на живом сайте.',
@@ -29,5 +27,14 @@
'Главный index.php файл доступен для записи. Мы рекомендуем вам удалить права записи на главный index.php файл. <br/> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Система работает в режиме Core::DEVELOPMENT Мы рекомендуем вам установить режим Core::PRODUCTION на живом сайте.',
'Monstra version' => 'Monstra Версия',
'Directory Permissions' => 'Права доступа',
'Directory' => 'Каталог',
'Writable' => 'Доступна для записи',
'Unwritable' => 'Недоступна для записи',
'Status' => 'Статус',
'PHP Built On' => 'PHP построен на',
'Web Server' => 'Веб сервер',
'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса',
)
);

View File

@@ -0,0 +1,39 @@
<?php
return array(
'information' => array(
'Information' => 'Інформація',
'Debugging' => 'Дебаггінг',
'Name' => 'Назва',
'Value' => 'Значення',
'Security' => 'Безпека',
'System' => 'Система',
'on' => 'включений',
'off'=> 'вимкнено',
'Server' => 'Сервер',
'PHP version' => 'Версія PHP',
'SimpleXML module' => 'SimpleXML модуль',
'DOM module' => 'DOM модуль',
'Installed' => 'Встановлено',
'Not Installed' => 'Не встановлено',
'Security check results' => 'Результати перевірки безпеки',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Конфігураційний файл доступен для запису. Ми рекомендуємо вам видалити права запису на файл defines.php на живому сайті.',
'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>
'Директорія Monstra (":path") доступна для запису. Ми рекомендуємо вам видалити права запису на директорію (":path") на живому сайті. <br/> Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'Головный .htaccess доступен для запису. Ми рекомендуємо вам видалити права запису на головний .htaccess файл. <br/>Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'Головный index.php файл доступен для запису. Ми рекомендуємо вам видалити права запису на головний index.php файл. <br/>Ви можете зробити це на UNIX системах так: <code>chmod -R a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Система працює в режимі Core::DEVELOPMENT Ми рекомендуємо вам встановити режим Core::PRODUCTION на живому сайті.',
'Monstra version' => 'Monstra Версія',
'Directory Permissions' => 'Права Доступу',
'Directory' => 'Каталог',
'Writable' => 'Доступна для запису',
'Unwritable' => 'Недоступна для запису',
'Status' => 'Статус',
'PHP Built On' => 'PHP построен на',
'Web Server' => 'Веб сервер',
'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса', )
);

View File

@@ -5,6 +5,7 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#system" data-toggle="tab"><?php echo __('System', 'information'); ?></a></li>
<li><a href="#server" data-toggle="tab"><?php echo __('Server', 'information'); ?></a></li>
<li><a href="#directory-permissions" data-toggle="tab"><?php echo __('Directory Permissions', 'information'); ?></a></li>
<li><a href="#security" data-toggle="tab"><?php echo __('Security', 'information'); ?></a></li>
</ul>
@@ -20,13 +21,9 @@
</tr>
</thead>
<tbody>
<tr>
<td><?php echo __('System version', 'information'); ?></td>
<td><?php echo MONSTRA_VERSION; ?></td>
</tr>
<tr>
<td><?php echo __('System version ID', 'information'); ?></td>
<td><?php echo MONSTRA_VERSION_ID; ?></td>
<tr>
<td><?php echo __('Monstra version', 'information'); ?></td>
<td><?php echo Core::VERSION; ?></td>
</tr>
<tr>
<td><?php echo __('GZIP', 'information'); ?></td>
@@ -55,6 +52,18 @@
<td><?php echo __('PHP version', 'information'); ?></td>
<td><?php echo PHP_VERSION; ?></td>
</tr>
<tr>
<td><?php echo __('PHP Built On', 'information'); ?></td>
<td><?php echo php_uname(); ?></td>
</tr>
<tr>
<td><?php echo __('Web Server', 'information'); ?></td>
<td><?php echo (isset($_SERVER['SERVER_SOFTWARE'])) ? $_SERVER['SERVER_SOFTWARE'] : @getenv('SERVER_SOFTWARE'); ?></td>
</tr>
<tr>
<td><?php echo __('WebServer to PHP Interface', 'information'); ?></td>
<td><?php echo php_sapi_name(); ?></td>
</tr>
<tr>
<td><?php echo __('SimpleXML module', 'information'); ?></td>
<td><?php if (in_array('SimpleXML', $php_modules)) { echo __('Installed', 'information'); } else { echo __('Not Installed', 'information'); } ?></td>
@@ -80,6 +89,49 @@
</table>
</div>
<div class="tab-pane" id="directory-permissions">
<table class="table table-bordered">
<thead>
<tr>
<td><?php echo __('Directory', 'information'); ?></td>
<td><?php echo __('Status', 'information'); ?></td>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo STORAGE ?></td>
<td><?php if (Dir::writable(STORAGE)) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo ROOT . DS . 'tmp'; ?></td>
<td><?php if (Dir::writable(ROOT . DS . 'tmp')) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo ROOT . DS . 'backups' ?></td>
<td><?php if (Dir::writable(ROOT . DS . 'backups')) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo ROOT . DS . 'public' ?></td>
<td><?php if (Dir::writable(ROOT . DS . 'public')) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo MONSTRA ?></td>
<td><?php if (Dir::writable(MONSTRA)) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo PLUGINS ?></td>
<td><?php if (Dir::writable(PLUGINS)) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
<tr>
<td><?php echo ROOT . DS . 'admin' ?></td>
<td><?php if (Dir::writable(ROOT . DS . 'admin')) { ?><span class="badge badge-success"><?php echo __('Writable', 'information'); ?></span><?php } else { ?><span class="badge badge-error"><?php echo __('Unwritable', 'information'); ?></span><?php } ?></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane" id="security">
@@ -91,12 +143,6 @@
</tr>
</thead>
<tbody>
<?php if (File::writable(BOOT . DS . 'defines.php')) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.', 'information'); ?></td>
</tr>
<?php } ?>
<?php if (File::writable(MONSTRA . DS)) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>

View File

@@ -0,0 +1,23 @@
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.menu = {
init: function() { },
selectPage: function (slug, title) {
$('input[name=menu_item_link]').val(slug);
$('input[name=menu_item_name]').val(title);
$('#selectPageModal').modal('hide');
},
selectCategory: function (name) {
$('input[name=menu_item_category]').val(name);
$('#selectCategoryModal').modal('hide');
}
};
$(document).ready(function(){
$.monstra.menu.init();
});

View File

@@ -13,7 +13,7 @@
'New item' => 'Nuova voce',
'Item name' => 'Nome',
'Item order' => 'Ordine',
'Item target' => 'Scopo',
'Item target' => 'Target',
'Item link' => 'Collegamento',
'Item category' => 'Categoria',
'Save' => 'Salva',

View File

@@ -0,0 +1,27 @@
<?php
return array(
'menu' => array(
'Menu' => 'Menu',
'Menu manager' => 'Gerenciador do menu',
'Edit' => 'Editar',
'Name' => 'Nome',
'Delete' => 'Deletar',
'Order' => 'Ordem',
'Actions' => 'Ações',
'Create new item' => 'Criar novo item',
'New item' => 'Novo item',
'Item name' => 'Nome do item',
'Item order' => 'ordem do item',
'Item target' => 'Target do item (atributo HTML)',
'Item link' => 'Link do item',
'Item category' => 'Categoria do item',
'Save' => 'Salvar',
'Edit item' => 'Editar item',
'Delete item :name' => 'Deletar o item :name',
'Select page' => 'Selecionar página',
'Category' => 'Categoria',
'Select category' => 'Selecionar categoria',
'Required field' => 'Campo requerido',
)
);

View File

@@ -0,0 +1,27 @@
<?php
return array(
'menu' => array(
'Menu' => 'Меню',
'Menu manager' => 'Менеджер меню',
'Edit' => 'Редагувати',
'Name' => 'Назва',
'Delete' => 'Видалити',
'Order' => 'Порядок',
'Actions' => 'Дії',
'Create new item' => 'Створити новий пункт меню',
'New item' => 'Новий пункт меню',
'Item name' => 'Назва',
'Item order' => 'Порядок',
'Item target' => 'Ціль',
'Item link' => 'Ссылка',
'Item category' => 'Категорія',
'Save' => 'Зберегти',
'Edit item' => 'Редагування пункту меню',
'Delete item :name' => 'Видалити пункт меню :name',
'Select page' => 'Вибрати сторінку',
'Category' => 'Категорія',
'Select category' => 'Вибрати категорію',
'Required field' => 'Обов’язкове поле',
)
);

View File

@@ -1,9 +1,10 @@
<?php
// Add plugin navigation link
Navigation::add(__('Menu', 'menu'), 'content', 'menu', 3);
Navigation::add(__('Menu', 'menu'), 'content', 'menu', 4);
Action::add('admin_header', 'MenuAdmin::headers');
// Add Plugin Javascript
Javascript::add('plugins/box/menu/js/menu.js', 'backend');
class MenuAdmin extends Backend {
@@ -18,26 +19,8 @@
/**
* Headers
* Main
*/
public static function headers() {
echo ("
<script>
function selectPage(slug, title) {
$('input[name=menu_item_link]').val(slug);
$('input[name=menu_item_name]').val(title);
$('#selectPageModal').modal('hide');
}
function selectCategory(name) {
$('input[name=menu_item_category]').val(name);
$('#selectCategoryModal').modal('hide');
}
</script>
");
}
public static function main() {
// Get menu table
@@ -97,11 +80,12 @@
// Update menu item
if (count($errors) == 0) {
MenuAdmin::$menu->update(Request::get('item_id'), array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
MenuAdmin::$menu->update(Request::get('item_id'),
array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
Request::redirect('index.php?id=menu');
}
@@ -121,7 +105,7 @@
->assign('menu_item_order_array', $menu_item_order_array)
->assign('errors', $errors)
->assign('categories', MenuAdmin::getCategories())
->assign('pages_list', $pages->select('[slug!="error404" and parent=""]'))
->assign('pages_list', MenuAdmin::getPages())
->assign('components_list', MenuAdmin::getComponents())
->display();
@@ -157,11 +141,11 @@
// Insert new menu item
if (count($errors) == 0) {
MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'),
'link' => Request::post('menu_item_link'),
'category' => Security::safeName(Request::post('menu_item_category'), '-', true),
'target' => Request::post('menu_item_target'),
'order' => Request::post('menu_item_order')));
Request::redirect('index.php?id=menu');
}
@@ -181,7 +165,7 @@
->assign('menu_item_order_array', $menu_item_order_array)
->assign('errors', $errors)
->assign('categories', MenuAdmin::getCategories())
->assign('pages_list', $pages->select('[slug!="error404" and parent=""]'))
->assign('pages_list', MenuAdmin::getPages())
->assign('components_list', MenuAdmin::getComponents())
->display();
@@ -223,6 +207,59 @@
}
/**
* Get pages
*/
protected static function getPages() {
// Init vars
$pages_array = array();
$count = 0;
// Get pages table
$pages = new Table('pages');
// Get Pages List
$pages_list = $pages->select('[slug!="error404" and status="published"]');
foreach ($pages_list as $page) {
$pages_array[$count]['title'] = Html::toText($page['title']);
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;
if (isset($page['parent'])) {
$c_p = $page['parent'];
} else {
$c_p = '';
}
if ($c_p != '') {
$_page = $pages->select('[slug="'.$page['parent'].'"]', null);
if (isset($_page['title'])) {
$_title = $_page['title'];
} else {
$_title = '';
}
$pages_array[$count]['sort'] = $_title . ' ' . $page['title'];
} else {
$pages_array[$count]['sort'] = $page['title'];
}
$_title = '';
$count++;
}
// Sort pages
$_pages_list = Arr::subvalSort($pages_array, 'sort');
// return
return $_pages_list;
}
/**
* Get components
*/
@@ -232,7 +269,7 @@
if (count(Plugin::$components) > 0) {
foreach (Plugin::$components as $component) {
if ($component !== 'pages' && $component !== 'sitemap') $components[] = ucfirst($component);
if ($component !== 'pages' && $component !== 'sitemap') $components[] = Text::lowercase($component);
}
}

View File

@@ -58,10 +58,10 @@
<p>
<ul class="unstyled">
<?php if (count($pages_list) > 0) foreach($pages_list as $page) { ?>
<li><a href="javascript:;" onclick="selectPage('<?php echo $page['slug']; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
<?php } ?>
<?php if (count($components_list) > 0) foreach($components_list as $component) { ?>
<li><a href="javascript:;" onclick="selectPage('<?php echo Text::lowercase($component); ?>', '<?php echo __($component); ?>');"><?php echo __($component); ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
<?php } ?>
</ul>
</p>
@@ -77,7 +77,7 @@
<p>
<ul class="unstyled">
<?php if (count($categories) > 0) foreach($categories as $category) { ?>
<li><a href="javascript:;" onclick="selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<?php } ?>
</ul>
</p>

View File

@@ -58,10 +58,10 @@
<p>
<ul class="unstyled">
<?php if (count($pages_list) > 0) foreach($pages_list as $page) { ?>
<li><a href="javascript:;" onclick="selectPage('<?php echo $page['slug']; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
<?php } ?>
<?php if (count($components_list) > 0) foreach($components_list as $component) { ?>
<li><a href="javascript:;" onclick="selectPage('<?php echo Text::lowercase($component); ?>', '<?php echo __($component); ?>');"><?php echo __($component); ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
<?php } ?>
</ul>
</p>
@@ -78,7 +78,7 @@
<p>
<ul class="unstyled">
<?php if (count($categories) > 0) foreach($categories as $category) { ?>
<li><a href="javascript:;" onclick="selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<?php } ?>
</ul>
</p>

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -0,0 +1,36 @@
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.pages = {
init: function() {
this.pagesExpandProcess();
},
pageExpand: function(slug, expand, token) {
$.ajax({
type:"post",
data:"slug="+slug+"&expand="+expand+"&token="+token,
url: $('form input[name="siteurl"]').val()
});
},
pagesExpandProcess: function() {
$(".parent").click(function() {
if ($(this).html() == "-") {
$('[rel="children_' + $(this).attr('rel')+'"]').hide();
$(this).html("+");
$.monstra.pages.pageExpand($(this).attr("rel"), "1", $(this).attr("token"));
} else {
$('[rel="children_' + $(this).attr('rel')+'"]').show();
$(this).html("-");
$.monstra.pages.pageExpand($(this).attr("rel"), "0", $(this).attr("token"));
}
});
}
};
$(document).ready(function(){
$.monstra.pages.init();
});

View File

@@ -44,8 +44,11 @@
'Page <i>:page</i> deleted' => 'Seite <i>:page</i> wurde gelöscht',
'Search Engines Robots' => 'Suchmaschinen-Roboter',
'Page' => 'Seite',
'SEO' => 'SEO',
'Metadata' => 'Metadata',
'Settings' => 'Einstellungen',
'Required field' => 'Pflichtfeld',
'Access' => 'Zugriff',
'Public' => 'Öffentlichkeit',
'Registered' => 'Eingetragen',
)
);

View File

@@ -44,8 +44,11 @@
'Page <i>:page</i> deleted' => 'Page <i>:page</i> deleted',
'Search Engines Robots' => 'Search Engines Robots',
'Page' => 'Page',
'SEO' => 'SEO',
'Metadata' => 'Metadata',
'Settings' => 'Settings',
'Required field' => 'Required field',
'Access' => 'Access',
'Public' => 'Public',
'Registered' => 'Registered',
)
);

View File

@@ -40,12 +40,15 @@
'Published' => 'Pubblicato',
'Draft' => 'Bozza',
'Published on' => 'Pubblicato il',
'Edit 404 page' => 'Modifica la pagina 404',
'Edit 404 page' => 'Modifica pagina 404',
'Page <i>:page</i> deleted' => 'Pagina <i>:page</i> è stata cancellata',
'Search Engines Robots' => 'Robot dei motori di ricerca',
'Page' => 'Pagina',
'SEO' => 'SEO',
'Metadata' => 'Metadata',
'Settings' => 'Impostazioni',
'Required field' => 'Campo obbligatorio',
'Access' => 'Accesso',
'Public' => 'Pubblico',
'Registered' => 'Registrato',
),
);

View File

@@ -44,8 +44,11 @@
'Page <i>:page</i> deleted' => 'Puslapis <i>:page</i> ištrintas',
'Search Engines Robots' => 'Paieškos variklių robotai',
'Page' => 'Puslapis',
'SEO' => 'SEO',
'Metadata' => 'Metadata',
'Settings' => 'Nustatymai',
'Required field' => 'Privalomas laukas',
'Access' => 'Prieiga',
'Public' => 'Viešas',
'Registered' => 'Registruotas',
)
);

View File

@@ -0,0 +1,54 @@
<?php
return array(
'pages' => array(
'Pages' => 'Páginas',
'Pages manager' => 'Gerenciador de páginas',
'Content' => 'Conteúdo',
'Create new page' => 'Criar nova página',
'New page' => 'Nova página',
'Edit page' => 'Editar página',
'Date' => 'Data',
'Clone' => 'Clonar',
'Edit' => 'Editar',
'Delete' => 'Deletar',
'Delete page: :page' => 'Deletar a página: :page',
'Title' => 'Título',
'Name' => 'Nome',
'Author' => 'Autor',
'Name (slug)' => 'Nome (slug)',
'Description' => 'Descrição',
'Keywords' => 'Keywords',
'Parent' => 'Parente',
'Template' => 'Template',
'Year' => 'Ano',
'Day' => 'Dia',
'Month' => 'Mês',
'Hour' => 'Hora',
'Minute' => 'Minuto',
'Second' => 'Segundo',
'This field should not be empty' => 'Este arquivo não deve ser vazio',
'This page already exists' => 'Esta página já existe',
'Extra' => 'Extra',
'Save' => 'Salvar',
'Save and exit' => 'Salvar e sair',
'Your changes to the page <i>:page</i> have been saved.' => 'Suas alterações na página <i>:page</i> foram salvas.',
'The page <i>:page</i> cloned.' => 'Página <i>:page</i> clonada.',
'Status' => 'Status',
'Actions' => 'Ações',
'Add' => 'Adicionar',
'Published' => 'Publicado',
'Draft' => 'Rascunho',
'Published on' => 'Publicada em',
'Edit 404 page' => 'Editar página de erro 404',
'Page <i>:page</i> deleted' => 'Página <i>:page</i> deletada',
'Search Engines Robots' => 'Crawlers de sistemas de buscas.',
'Page' => 'Página',
'Metadata' => 'Metadata',
'Settings' => 'Configurações',
'Required field' => 'Campo requerido',
'Access' => 'Acesso',
'Public' => 'Público',
'Registered' => 'Registrado',
)
);

View File

@@ -44,8 +44,11 @@
'Page <i>:page</i> deleted' => 'Страница <i>:page</i> удалена',
'Search Engines Robots' => 'Поисковые роботы',
'Page' => 'Страница',
'SEO' => 'SEO',
'Metadata' => 'Метаданные',
'Settings' => 'Настройки',
'Required field' => 'Обязательное поле',
'Access' => 'Доступ',
'Public' => 'Публичный',
'Registered' => 'Зарегистрированным',
),
);

View File

@@ -0,0 +1,54 @@
<?php
return array(
'pages' => array(
'Pages' => 'Сторінки',
'Pages manager' => 'Менеджер сторінок',
'Content' => 'Контент',
'Create new page' => 'Створити нову сторінку',
'New page' => 'Нова сторінка',
'Edit page' => 'Редагування сторінки',
'Date' => 'Дата',
'Clone' => 'Клонувати',
'Edit' => 'Редагувати',
'Delete' => 'Видалити',
'Delete page: :page' => 'Видалити сторінку: :page',
'Title' => 'Заголовок',
'Name' => 'Назва',
'Author' => 'Автор',
'Name (slug)' => 'Назва (slug)',
'Description' => 'Опис',
'Keywords' => 'Ключові слова',
'Parent' => 'Родитель',
'Template' => 'Шаблон',
'Year' => 'Рік',
'Day' => 'День',
'Month' => 'Місяц',
'Hours' => 'Час',
'Minute' => 'Мінута',
'Second' => 'Секунда',
'This field should not be empty' => 'Це поле не може бути пустим',
'This page already exists' => 'Така сторінка вже існує',
'Extra' => 'Додатково',
'Save' => 'Зберегти',
'Save and exit' => 'Зберегти и вийти',
'Your changes to the page <i>:page</i> have been saved.' => 'Ваші зміни до сторінки <i>:page</i> були збережені.',
'The page <i>:page</i> cloned.' => 'Сторінка <i>:page</i> клонована.',
'Status' => 'Статус',
'Actions' => 'Дії',
'Add' => 'Додати',
'Published' => 'Опубліковано',
'Draft' => 'Чернетка',
'Published on' => 'Опубліковано',
'Edit 404 page' => 'Редагувати сторінку 404',
'Page <i>:page</i> deleted' => 'Сторінка <i>:page</i> видалена',
'Search Engines Robots' => 'Пошукові роботи',
'Page' => 'Сторінка',
'Metadata' => 'Метадані',
'Settings' => 'Налаштування',
'Required field' => 'Обов’язкове поле',
'Access' => 'Доступ',
'Public' => 'Публічний',
'Registered' => 'Зареєстрованим',
),
);

View File

@@ -1,10 +1,38 @@
<?php
Navigation::add(__('Pages', 'pages'), 'content', 'pages', 1);
Action::add('admin_pre_render','PagesAdmin::_pageExpandAjax');
// Add Plugin Javascript
Javascript::add('plugins/box/pages/js/pages.js', 'backend');
class PagesAdmin extends Backend {
/**
* Pages tables
*
* @var object
*/
public static $pages = null;
/**
* _pageExpandAjax
*/
public static function _pageExpandAjax() {
if (Request::post('slug')) {
if (Security::check(Request::post('token'))) {
$pages = new Table('pages');
$pages->updateWhere('[slug="'.Request::post('slug').'"]', array('expand' => Request::post('expand')));
Request::shutdown();
} else { die('csrf detected!'); }
}
}
/**
* Pages admin function
@@ -19,26 +47,31 @@
$errors = array();
$pages = new Table('pages');
$users = new Table('users');
PagesAdmin::$pages = $pages;
$users = new Table('users');
$user = $users->select('[id='.Session::get('user_id').']', null);
$user['firstname'] = Html::toText($user['firstname']);
$user['lastname'] = Html::toText($user['lastname']);
// Page author
if (isset($user['firstname']) && trim($user['firstname']) !== '') {
if (trim($user['lastname']) !== '') $lastname = ' '.$user['lastname']; else $lastname = '';
$author = $user['firstname'] . $lastname;
if ( ! empty($user['firstname'])) {
$author = (empty($user['lastname'])) ? $user['firstname'] : $user['firstname'].' '.$user['lastname'];
} else {
$author = Session::get('user_login');
}
// Status array
$status_array = array('published' => __('Published', 'pages'),
'draft' => __('Draft', 'pages'));
// Access array
$access_array = array('public' => __('Public', 'pages'),
'registered' => __('Registered', 'pages'));
// Check for get actions
// ---------------------------------------------
@@ -61,6 +94,9 @@
// Get original page
$orig_page = $pages->select('[slug="'.Request::get('name').'"]', null);
// Generate rand page title
$rand_page_title = $orig_page['title'].' [copy]';
// Clone page
if ($pages->insert(array('slug' => $rand_page_name,
'template' => $orig_page['template'],
@@ -68,7 +104,9 @@
'robots_index' => $orig_page['robots_index'],
'robots_follow'=> $orig_page['robots_follow'],
'status' => $orig_page['status'],
'title' => $rand_page_name,
'access' => (isset($orig_page['access'])) ? $orig_page['access'] : 'public',
'expand' => (isset($orig_page['expand'])) ? $orig_page['expand'] : '0',
'title' => $rand_page_title,
'description' => $orig_page['description'],
'keywords' => $orig_page['keywords'],
'date' => $orig_page['date'],
@@ -133,10 +171,12 @@
if (count($errors) == 0) {
// Insert new page
if($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true),
if ($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true),
'template' => Request::post('templates'),
'parent' => $parent_page,
'status' => Request::post('status'),
'access' => Request::post('access'),
'expand' => '0',
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'title' => Request::post('page_title'),
@@ -190,6 +230,8 @@
if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';
if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = '';
if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index';
if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published';
if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public';
if (Request::post('pages')) $parent_page = Request::post('pages'); else if(Request::get('parent_page')) $parent_page = Request::get('parent_page'); else $parent_page = '';
if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false;
@@ -212,7 +254,10 @@
->assign('parent_page', $parent_page)
->assign('templates_array', $templates_array)
->assign('post_template', $post_template)
->assign('post_status', $post_status)
->assign('post_access', $post_access)
->assign('status_array', $status_array)
->assign('access_array', $access_array)
->assign('date', $date)
->assign('post_robots_index', $post_robots_index)
->assign('post_robots_follow', $post_robots_follow)
@@ -253,6 +298,8 @@
if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = '';
if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = '';
if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index';
if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published';
if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public';
if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false;
//--------------
@@ -284,6 +331,7 @@
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'status' => Request::post('status'),
'access' => Request::post('ascess'),
'date' => $date,
'author' => $author))) {
@@ -306,6 +354,7 @@
'robots_index' => $robots_index,
'robots_follow'=> $robots_follow,
'status' => Request::post('status'),
'access' => Request::post('access'),
'date' => $date,
'author' => $author))) {
@@ -368,7 +417,7 @@
if (Request::post('page_keywords')) $keywords_to_edit = Request::post('page_keywords'); else $keywords_to_edit = $page['keywords'];
if (Request::post('editor')) $to_edit = Request::post('editor'); else $to_edit = Text::toHtml($page_content);
if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false;
if (Request::post('robots_follow')) $post_robots_follow = true; else if ($page['robots_follow'] == 'nofollow') $post_robots_follow = true; else $post_robots_follow = false;
if (Request::post('pages')) {
@@ -385,9 +434,10 @@
}
if (Request::post('templates')) $template = Request::post('templates'); else $template = $page['template'];
if (Request::post('status')) $status = Request::post('status'); else $status = $page['status'];
if (Request::post('access')) $access = Request::post('access'); else $access = (isset($page['access'])) ? $page['access'] : 'public';
// Generate date
$date = Date::format(time(), 'Y-m-d H:i:s');
$date = Request::post('date') ? Request::post('date') : Date::format($page['date'], 'Y-m-d H:i:s');
Notification::setNow('page', 'page');
@@ -404,7 +454,9 @@
->assign('templates_array', $templates_array)
->assign('template', $template)
->assign('status_array', $status_array)
->assign('access_array', $access_array)
->assign('status', $status)
->assign('access', $access)
->assign('date', $date)
->assign('post_robots_index', $post_robots_index)
->assign('post_robots_follow', $post_robots_follow)
@@ -428,7 +480,15 @@
// Delete page and update <parent> fields
if ($pages->deleteWhere('[slug="'.$page['slug'].'" ]')) {
$pages->updateWhere('[parent="'.$page['slug'].'"]', array('parent' => ''));
$_pages = $pages->select('[parent="'.$page['slug'].'"]');
if ( ! empty($_pages)) {
foreach($_pages as $_page) {
$pages->updateWhere('[slug="'.$_page['slug'].'"]', array('parent' => ''));
}
}
File::delete(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt');
Notification::set('success', __('Page <i>:page</i> deleted', 'pages', array(':page' => Html::toText($page['title']))));
}
@@ -458,7 +518,7 @@
$count = 0;
// Get pages
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'parent'));
$pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'expand', 'access', 'parent'));
// Loop
foreach ($pages_list as $page) {
@@ -466,8 +526,10 @@
$pages_array[$count]['title'] = $page['title'];
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['status'] = $status_array[$page['status']];
$pages_array[$count]['access'] = isset($access_array[$page['access']]) ? $access_array[$page['access']] : $access_array['public']; // hack for old Monstra Versions
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['expand'] = $page['expand'];
$pages_array[$count]['slug'] = $page['slug'];
if (isset($page['parent'])) {

View File

@@ -62,14 +62,9 @@
/**
* Main function
*/
public static function main() {
if (BACKEND == false) {
$pages = new Table('pages');
Pages::$pages = $pages;
$page = Pages::pageLoader();
Pages::$page = $page;
}
public static function main() {
Pages::$pages = new Table('pages');
Pages::$page = Pages::pageLoader();
}
@@ -116,16 +111,36 @@
$c_p = '';
}
}
// Hack For old Monstra
$child_page['access'] = (isset($child_page['access'])) ? $child_page['access'] : 'public' ;
// Check is child_parent -> request parent
if ($c_p == $data[0]) {
// Checking only for the parent and one child, the remaining issue 404
if (count($data) < 3) {
$id = $data[1]; // Get real request page
if (count($data) < 3) { // Checking only for the parent and one child, the remaining issue 404
if ((($child_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($child_page['access'] == 'public')) {
$id = $data[1];
} elseif (($child_page['access'] == 'registered') and
(Session::exists('user_id')) and
($child_page['status'] == 'published')) {
$id = $data[1];
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
}
} else {
$id = 'error404';
Response::status(404);
@@ -134,6 +149,7 @@
$id = 'error404';
Response::status(404);
}
} else { // Only parent page come
if(empty($data[0])) {
@@ -144,8 +160,11 @@
// Get current page
$current_page = Pages::$pages->select('[slug="'.$data[0].'"]', null);
// Hack For old Monstra
$current_page['access'] = (isset($current_page['access'])) ? $current_page['access'] : 'public' ;
if (count($current_page) != 0) {
if ($current_page['parent'] != '') {
if ( ! empty($current_page['parent'])) {
$c_p = $current_page['parent'];
} else {
$c_p = '';
@@ -156,14 +175,26 @@
// Check if this page has parent
if ($c_p !== '') {
if ($c_p == $data[0]) {
if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) {
if (($current_page['status'] == 'published') or (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) {
if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) {
if ((($current_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($current_page['access'] == 'public')) {
$id = $data[0];
} elseif (($current_page['access'] == 'registered') and
(Session::exists('user_id')) and
($current_page['status'] == 'published')) {
$id = $data[0];
} else {
$id = 'error404';
Response::status(404);
}
}
} else {
$id = 'error404';
Response::status(404);
@@ -173,9 +204,20 @@
Response::status(404);
}
} else {
if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) {
if (($current_page['status'] == 'published') or (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) {
if ((($current_page['status'] == 'published') or
(Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and
($current_page['access'] == 'public')) {
$id = $data[0];
} elseif (($current_page['access'] == 'registered') and
(Session::exists('user_id')) and
($current_page['status'] == 'published')) {
$id = $data[0];
} else {
$id = 'error404';
Response::status(404);
@@ -387,7 +429,16 @@
*
*/
public static function robots() {
return (Pages::$page !== null) ? Pages::$page['robots_index'].', '.Pages::$page['robots_follow'] : '';
if (Pages::$page !== null) {
$_index = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : '';
$_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : '';
$robots = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : '';
} else {
$robots = '';
}
return $robots;
}
}

View File

@@ -15,7 +15,7 @@
<ul class="nav nav-tabs">
<li <?php if (Notification::get('page')) { ?>class="active"<?php } ?>><a href="#page" data-toggle="tab"><?php echo __('Page', 'pages'); ?></a></li>
<li <?php if (Notification::get('seo')) { ?>class="active"<?php } ?>><a href="#seo" data-toggle="tab"><?php echo __('SEO', 'pages'); ?></a></li>
<li <?php if (Notification::get('metadata')) { ?>class="active"<?php } ?>><a href="#metadata" data-toggle="tab"><?php echo __('Metadata', 'pages'); ?></a></li>
<li <?php if (Notification::get('settings')) { ?>class="active"<?php } ?>><a href="#settings" data-toggle="tab"><?php echo __('Settings', 'pages'); ?></a></li>
</ul>
@@ -39,7 +39,7 @@
?>
</div>
<div class="tab-pane <?php if (Notification::get('seo')) { ?>active<?php } ?>" id="seo">
<div class="tab-pane <?php if (Notification::get('metadata')) { ?>active<?php } ?>" id="metadata">
<?php
echo (
Form::label('page_keywords', __('Keywords', 'pages')).
@@ -61,7 +61,7 @@
</div>
<div class="tab-pane <?php if (Notification::get('settings')) { ?>active<?php } ?>" id="settings">
<div class="row-fluid">
<div class="span4">
<div class="span3">
<?php
echo (
Form::label('pages', __('Parent', 'pages')).
@@ -69,7 +69,7 @@
);
?>
</div>
<div class="span4">
<div class="span3">
<?php
echo (
Form::label('templates', __('Template', 'pages')).
@@ -77,11 +77,19 @@
);
?>
</div>
<div class="span4">
<div class="span3">
<?php
echo (
Form::label('status', __('Status', 'pages')).
Form::select('status', $status_array, 'published')
Form::select('status', $status_array, $post_status)
);
?>
</div>
<div class="span3">
<?php
echo (
Form::label('access', __('Access', 'pages')).
Form::select('access', $access_array, $post_access)
);
?>
</div>

View File

@@ -18,7 +18,7 @@
<ul class="nav nav-tabs">
<li <?php if (Notification::get('page')) { ?>class="active"<?php } ?>><a href="#page" data-toggle="tab"><?php echo __('Page', 'pages'); ?></a></li>
<li <?php if (Notification::get('seo')) { ?>class="active"<?php } ?>><a href="#seo" data-toggle="tab"><?php echo __('SEO', 'pages'); ?></a></li>
<li <?php if (Notification::get('metadata')) { ?>class="active"<?php } ?>><a href="#metadata" data-toggle="tab"><?php echo __('Metadata', 'pages'); ?></a></li>
<li <?php if (Notification::get('settings')) { ?>class="active"<?php } ?>><a href="#settings" data-toggle="tab"><?php echo __('Settings', 'pages'); ?></a></li>
</ul>
@@ -50,7 +50,7 @@
if (isset($errors['pages_exists'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_exists'].'</span>';
?>
</div>
<div class="tab-pane <?php if (Notification::get('seo')) { ?>active<?php } ?>" id="seo">
<div class="tab-pane <?php if (Notification::get('metadata')) { ?>active<?php } ?>" id="metadata">
<?php
@@ -77,7 +77,7 @@
echo Form::hidden('pages', $parent_page);
} else {
?>
<div class="span4">
<div class="span3">
<?php
echo (
Form::label('pages', __('Parent', 'pages')).
@@ -87,7 +87,7 @@
</div>
<?php } ?>
<?php if (Request::get('name') != 'error404') { ?>
<div class="span4">
<div class="span3">
<?php } else { ?>
<div>
<?php } ?>
@@ -103,7 +103,7 @@
echo Form::hidden('status', $status);
} else {
?>
<div class="span4">
<div class="span3">
<?php
echo (
Form::label('status', __('Status', 'pages')).
@@ -112,6 +112,20 @@
?>
</div>
<?php } ?>
<?php
if (Request::get('name') == 'error404') {
echo Form::hidden('access', $access);
} else {
?>
<div class="span3">
<?php
echo (
Form::label('access', __('Access', 'pages')).
Form::select('access', $access_array, $access)
);
?>
</div>
<?php } ?>
</div>
</div>
</div>

View File

@@ -1,14 +1,11 @@
<div class="row-fluid">
<div class="span12">
<h2><?php echo __('Pages', 'pages'); ?></h2>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php
echo (
Html::anchor(__('Create new page', 'pages'), 'index.php?id=pages&action=add_page', array('title' => __('Create new page', 'pages'), 'class' => 'btn default btn-small')). Html::nbsp(3).
@@ -16,15 +13,16 @@
);
?>
<br /><br />
<table class="table table-bordered">
<thead>
<tr>
<td width="3%"></td>
<td><?php echo __('Name', 'pages'); ?></td>
<td><?php echo __('Author', 'pages'); ?></td>
<td><?php echo __('Status', 'pages'); ?></td>
<td><?php echo __('Access', 'pages'); ?></td>
<td><?php echo __('Date', 'pages'); ?></td>
<td width="40%"><?php echo __('Actions', 'pages'); ?></td>
</tr>
@@ -35,21 +33,30 @@
foreach ($pages as $page) {
if ($page['parent'] != '') { $dash = Html::arrow('right').'&nbsp;&nbsp;'; } else { $dash = ""; }
?>
<?php if ($page['parent'] == '') $parent_style=''; else $parent_style = ''; ?>
<?php if ($page['slug'] != 'error404') { ?>
<tr>
<?php
$expand = PagesAdmin::$pages->select('[slug="'.(string)$page['parent'].'"]', null);
if ($page['parent'] !== '' && isset($expand['expand']) && $expand['expand'] == '1') { $visibility = 'style="display:none;"'; } else { $visibility = ''; }
?>
<tr <?php echo $visibility; ?> <?php if(trim($page['parent']) !== '') {?> rel="children_<?php echo $page['parent']; ?>" <?php } ?>>
<td>
<?php
if (count(PagesAdmin::$pages->select('[parent="'.(string)$page['slug'].'"]', 'all')) > 0) {
if (isset($page['expand']) && $page['expand'] == '1') {
echo '<a href="javascript:;" class="btn-expand parent" token="'.Security::token().'" rel="'.$page['slug'].'">+</a>';
} else {
echo '<a href="javascript:;" class="btn-expand parent" token="'.Security::token().'" rel="'.$page['slug'].'">-</a>';
}
}
?>
</td>
<td>
<?php
if ($page['parent'] != '') {
$parent = $page['parent'].'/';
} else {
$parent = '';
}
$_parent = (trim($page['parent']) == '') ? '' : $page['parent'];
$parent = (trim($page['parent']) == '') ? '' : $page['parent'].'/';
echo (trim($page['parent']) == '') ? '' : '&nbsp;';
echo $dash.Html::anchor(Html::toText($page['title']), $site_url.$parent.$page['slug'], array('target' => '_blank', 'rel' => 'children_'.$_parent));
?>
<?php
if ($page['parent'] != '') echo '&nbsp;';
?>
<?php echo $dash.Html::anchor(Html::toText($page['title']), $site_url.$parent.$page['slug'], array('target' => '_blank')); ?>
</td>
<td>
<?php echo $page['author']; ?>
@@ -57,6 +64,9 @@
<td>
<?php echo $page['status']; ?>
</td>
<td>
<?php echo $page['access']; ?>
</td>
<td>
<?php echo Date::format($page['date'], "j.n.Y"); ?>
</td>
@@ -79,6 +89,7 @@
</div>
</td>
</tr>
<?php } ?>
<?php
}
@@ -87,5 +98,9 @@
</tbody>
</table>
<form>
<input type="hidden" name="url" value="<?php echo Option::get('siteurl'); ?>admin/index.php?id=pages">
</form>
</div>
</div>

View File

@@ -10,7 +10,7 @@
'Install New' => 'Install New',
'Delete' => 'Delete',
'Delete plugin :plugin' => 'Delete plugin :plugin',
'This plugins does not exist' => 'This plugins does not exist',
'This plugin does not exist' => 'This plugin does not exist',
'Version' => 'Version',
'Author' => 'Author',
'Get More Plugins' => 'Get More Plugins',

View File

@@ -10,7 +10,7 @@
'Description' => 'Descrizione',
'Delete' => 'Elimina',
'Delete plugin :plugin' => 'Elimina plugin :plugin',
'This plugins does not exist' => 'Tale plugin non esiste',
'This plugin does not exist' => 'Tale plugin non esiste',
'Version' => 'Versione',
'Author' => 'Autore',
'Get More Plugins' => 'Scarica altri plugin',

View File

@@ -0,0 +1,20 @@
<?php
return array(
'plugins' => array(
'Plugins' => 'Plugins',
'Name' => 'Nome',
'Actions' => 'Ações',
'Description' => 'Descrição',
'Installed' => 'Instalado',
'Install New' => 'Instalar novo',
'Delete' => 'Deletar',
'Delete plugin :plugin' => 'Deletar o plugin :plugin',
'This plugins does not exist' => 'Estes plugins não existem',
'Version' => 'Versão',
'Author' => 'Autor',
'Get More Plugins' => 'Ver mais plugins',
'Install' => 'Instalar',
'Uninstall' => 'Desinstalar',
)
);

View File

@@ -10,7 +10,7 @@
'Description' => 'Описание',
'Delete' => 'Удалить',
'Delete plugin :plugin' => 'Удалить плагин :plugin',
'This plugins does not exist' => 'Такой плагин не существует',
'This plugin does not exist' => 'Такого плагина не существует',
'Version' => 'Версия',
'Author' => 'Автор',
'Get More Plugins' => 'Скачать другие плагины',

View File

@@ -0,0 +1,20 @@
<?php
return array(
'plugins' => array(
'Plugins' => 'Плагіни',
'Installed' => 'Установлені',
'Install New' => 'Установити нові',
'Actions' => 'Дії',
'Name' => 'Назва',
'Description' => 'Опис',
'Delete' => 'Видалити',
'Delete plugin :plugin' => 'Видалити плагін :plugin',
'This plugin does not exist' => 'Такого плагіна не існує',
'Version' => 'Версія',
'Author' => 'Автор',
'Get More Plugins' => 'Завантажити інші плагіни',
'Install' => 'Установити',
'Uninstall' => 'Видалити',
)
);

View File

@@ -40,6 +40,9 @@
include PLUGINS . DS . $plugin_name . DS . 'install' . DS . $plugin_name . '.uninstall.php';
}
// Cleanup minify
if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file);
// Clean i18n cache
Cache::clean('i18n');
@@ -69,6 +72,9 @@
'status' => (string)$plugin_xml->plugin_status,
'priority' => (int)$plugin_xml->plugin_priority));
// Cleanup minify
if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file);
// Clean i18n cache
Cache::clean('i18n');

View File

@@ -0,0 +1,7 @@
<?php
return array(
'sitemap' => array(
'Sitemap' => 'Mapa do site',
)
);

View File

@@ -0,0 +1,7 @@
<?php
return array(
'sitemap' => array(
'Sitemap' => 'Карта сайту',
)
);

View File

@@ -22,15 +22,27 @@
'sitemap',
'box');
// Add actions
Action::add('admin_pages_action_add', 'Sitemap::create');
Action::add('admin_pages_action_edit', 'Sitemap::create');
Action::add('admin_pages_action_clone', 'Sitemap::create');
Action::add('admin_pages_action_delete', 'Sitemap::create');
/**
* Sitemap
*/
class Sitemap extends Frontend {
/**
* Forbidden components
*
* @var array
*/
public static $forbidden_components = array('pages', 'sitemap');
/**
* Sitemap Title
*
@@ -54,6 +66,53 @@
*/
public static function content() {
// Display view
return View::factory('box/sitemap/views/frontend/index')
->assign('pages_list', Sitemap::getPages())
->assign('components', Sitemap::getComponents())
->render();
}
/**
* Create sitemap
*/
public static function create() {
// Get pages list
$pages_list = Sitemap::getPages();
// Create sitemap content
$map = '<?xml version="1.0" encoding="UTF-8"?>'."\n";
$map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; }
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').$parent.$page['slug'].'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", (int)$page['date']).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>'.$priority.'</priority>'."\n\t".'</url>'."\n";
}
// Get list of components
$components = Sitemap::getComponents();
// Add components to sitemap
if (count($components) > 0) {
foreach ($components as $component) {
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1.0</priority>'."\n\t".'</url>'."\n";
}
}
// Close sitemap
$map .= '</urlset>';
// Save sitemap
return File::setContent(ROOT . DS . 'sitemap.xml', $map);
}
/**
* Get pages
*/
protected static function getPages() {
// Init vars
$pages_array = array();
$count = 0;
@@ -70,7 +129,7 @@
$pages_array[$count]['parent'] = $page['parent'];
$pages_array[$count]['date'] = $page['date'];
$pages_array[$count]['author'] = $page['author'];
$pages_array[$count]['slug'] = $page['slug'];
$pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ;
if (isset($page['parent'])) {
$c_p = $page['parent'];
@@ -97,48 +156,8 @@
// Sort pages
$_pages_list = Arr::subvalSort($pages_array, 'sort');
// Display view
return View::factory('box/sitemap/views/frontend/index')
->assign('pages_list', $_pages_list)
->assign('components', Sitemap::getComponents())
->render();
}
/**
* Create sitemap
*/
public static function create() {
// Get pages table
$pages = new Table('pages');
// Get pages list
$pages_list = $pages->select('[slug!="error404" and status="published"]');
// Create sitemap content
$map = '<?xml version="1.0" encoding="UTF-8"?>'."\n";
$map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '2'; } else { $parent = ''; $priority = '1'; }
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').$parent.$page['slug'].'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", (int)$page['date']).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>'.$priority.'</priority>'."\n\t".'</url>'."\n";
}
// Get list of components
$components = Sitemap::getComponents();
// Add components to sitemap
if (count($components) > 0) {
foreach ($components as $component) {
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1</priority>'."\n\t".'</url>'."\n";
}
}
// Close sitemap
$map .= '</urlset>';
// Save sitemap
return File::setContent(ROOT . DS . 'sitemap.xml', $map);
// return
return $_pages_list;
}
@@ -151,7 +170,7 @@
if (count(Plugin::$components) > 0) {
foreach (Plugin::$components as $component) {
if ($component !== 'pages' && $component !== 'sitemap') $components[] = ucfirst($component);
if ( ! in_array($component, Sitemap::$forbidden_components)) $components[] = Text::lowercase($component);
}
}

View File

@@ -18,7 +18,7 @@
if (count($components) > 0) {
if (count($pages_list) == 0) { echo '<ul>'; }
foreach ($components as $component) {
echo '<li><a href="'.Option::get('siteurl').Text::lowercase($component).'" target="_blank">'.__($component).'</a></li>';
echo '<li><a href="'.Option::get('siteurl').$component.'" target="_blank">'.__(ucfirst($component), $component).'</a></li>';
}
echo '</ul>';

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -0,0 +1,18 @@
if (typeof $.monstra == 'undefined') $.monstra = {};
$.monstra.snippets = {
init: function() { },
showEmbedCodes: function(name) {
$('#shortcode').html('{snippet get="'+name+'"}');
$('#phpcode').html('&lt;?php echo Snippet::get("'+name+'"); ?&gt;');
$('#embedCodes').modal();
}
};
$(document).ready(function(){
$.monstra.snippets.init();
});

View File

@@ -22,5 +22,9 @@
'Your changes to the snippet <i>:name</i> have been saved.' => 'Deine Änerungen für das Snippet <i>:name</i> wurden gespeichert.',
'Delete snippet: :snippet' => 'Lösche Snippet: :snippet',
'Required field' => 'Pflichtfeld',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -13,7 +13,6 @@
'Edit snippet' => 'Edit snippet',
'Save' => 'Save',
'Save and exit' => 'Save and exit',
'This field should not be empty' => 'This field should not be empty',
'This snippet already exists' => 'This snippet already exists',
'This snippet does not exist' => 'This snippet does not exist',
'Delete snippet: :snippet' => 'Delete snippet: :snippet',
@@ -22,5 +21,9 @@
'Your changes to the snippet <i>:name</i> have been saved.' => 'Your changes to the snippet <i>:name</i> have been saved.',
'Delete snippet: :snippet' => 'Delete snippet: :snippet',
'Required field' => 'Required field',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -13,7 +13,6 @@
'Edit snippet' => 'Modifica snippet',
'Save' => 'Salva',
'Save and exit' => 'Salva ed esci',
'This field should not be empty' => 'Campo obbligatorio',
'This snippet already exists' => 'Tale snippet già esistente',
'This snippet does not exist' => 'Tale snippet non esiste',
'Delete snippet: :block' => 'Elimina snippet: :snippet',
@@ -22,5 +21,9 @@
'Your changes to the snippet <i>:name</i> have been saved.' => 'Le modifiche al snippet <i>:name</i> sono state salvate.',
'Delete snippet: :snippet' => 'Elimina snippet: :snippet',
'Required field' => 'Campo obbligatorio',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -20,5 +20,9 @@
'Snippet content' => 'Fragmento turinys',
'Snippet <i>:name</i> deleted' => 'Fragmentas <i>:name</i> ištrintas',
'Your changes to the snippet <i>:name</i> have been saved.' => 'Fragmento <i>:name</i> pakeitimai išsaugoti.',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -0,0 +1,30 @@
<?php
return array(
'snippets' => array(
'Snippets' => 'Códigos',
'Snippets manager' => 'Gerenciador de códigos',
'Actions' => 'Ações',
'Delete' => 'Deletar',
'Edit' => 'Editar',
'Name' => 'Nome',
'Create new snippet' => 'Criar novo código',
'New snippet' => 'Novo código',
'Edit snippet' => 'Editar código',
'Save' => 'Salvar',
'Save and exit' => 'Salvar e sair',
'This field should not be empty' => 'Este campo não pode estar vazio',
'This snippet already exists' => 'Este código já existe',
'This snippet does not exist' => 'Este código não existe',
'Delete snippet: :snippet' => 'Deletar o código: :snippet',
'Snippet content' => 'Conteúdo do código',
'Snippet <i>:name</i> deleted' => 'Código <i>:name</i> deletado',
'Your changes to the snippet <i>:name</i> have been saved.' => 'Suas alterações no código <i>:name</i> foram salvas',
'Delete snippet: :snippet' => 'Deletar o código: :snippet',
'Required field' => 'Campo requerido',
'View Embed Code' => 'View Embed Code',
'Embed Code' => 'Embed Code',
'Shortcode' => 'Shortcode',
'PHP Code' => 'PHP Code',
)
);

View File

@@ -13,7 +13,6 @@
'Edit snippet' => 'Редактирование сниппета',
'Save' => 'Сохранить',
'Save and exit' => 'Сохранить и выйти',
'This field should not be empty' => 'Это поле не должно быть пустым',
'This snippet already exists' => 'Такой сниппет уже существует',
'This snippet does not exist' => 'Такого сниппета не существует',
'Delete snippet: :block' => 'Удалить сниппет: :snippet',
@@ -22,5 +21,9 @@
'Your changes to the snippet <i>:name</i> have been saved.' => 'Ваши изменения к сниппету <i>:name</i> были сохранены.',
'Delete snippet: :snippet' => 'Удалить сниппет: :snippet',
'Required field' => 'Обязательное поле',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
)
);

View File

@@ -0,0 +1,29 @@
<?php
return array(
'snippets' => array(
'Snippets' => 'Сніппети',
'Snippets manager' => 'Менеджер сніппетів',
'Actions' => 'Дії',
'Delete' => 'Видалити',
'Edit' => 'Редагувати',
'New snippet' => 'Новий сніппет',
'Create new snippet' => 'Створити новий сніппет',
'Name' => 'Назва',
'Edit snippet' => 'Редагування сніппета',
'Save' => 'Зберегти',
'Save and exit' => 'Зберегти та вийти',
'This snippet already exists' => 'Такий сніппет вже існує',
'This snippet does not exist' => 'Такого сніппета не існує',
'Delete snippet: :block' => 'Видалити сніппет: :snippet',
'Snippet content' => 'Вміст сніппета',
'Snippet <i>:name</i> deleted' => 'Сніппет <i>:name</i> видалено',
'Your changes to the snippet <i>:name</i> have been saved.' => 'Ваші зміни до сниппету <i>:name</i> були збережені.',
'Delete snippet: :snippet' => 'Видалити сніппет: :snippet',
'Required field' => 'Обов’язкове поле',
'View Embed Code' => 'Код для вставки',
'Embed Code' => 'Код для вставки',
'Shortcode' => 'Шорткод',
'PHP Code' => 'PHP код',
)
);

View File

@@ -1,7 +1,11 @@
<?php
// Add plugin navigation link
Navigation::add(__('Snippets', 'snippets'), 'extends', 'snippets', 3);
// Add Plugin Javascript
Javascript::add('plugins/box/snippets/js/snippets.js', 'backend');
class SnippetsAdmin extends Backend {

View File

@@ -23,47 +23,75 @@
'box');
if(Session::exists('user_role') && in_array(Session::get('user_role'),array('admin'))) {
if (Session::exists('user_role') && in_array(Session::get('user_role'),array('admin'))) {
// Include Admin
Plugin::admin('snippets', 'box');
}
// Add shortcode {snippet get="snippetname"}
// Add shortcode {snippet}
Shortcode::add('snippet', 'Snippet::_content');
/**
* Snippet class
*/
class Snippet {
/**
* Get snippet
*
* @param string $name Snippet file name
* <code>
* echo Snippet::get('snippetname');
* echo Snippet::get('snippetname', array('message' => 'Hello World'));
* </code>
*
* @param string $name Snippet file name
* @param string $vars Vars
* @return string
*/
public static function get($name) {
return Snippet::_content(array('get' => $name));
public static function get($name, $vars = array()) {
$vars['get'] = $name;
return Snippet::_content($vars);
}
/**
* Returns snippet content for shortcode {snippet get="snippetname"}
*
* @param array $attributes snippet filename
* <code>
* {snippet get="snippetname"}
* {snippet get="snippetname" message="Hello World"}
* </code>
*
* @param array $attributes Array of attributes
* @return string
*/
public static function _content($attributes) {
if (isset($attributes['get'])) $name = (string)$attributes['get']; else $name = '';
// Extracst attributes
extract($attributes);
// Get snippet name
$name = (isset($get)) ? (string)$get : '';
// Get snippet path
$snippet_path = STORAGE . DS . 'snippets' . DS . $name . '.snippet.php';
// Get snippet content
if (File::exists($snippet_path)) {
// Turn on output buffering
ob_start();
// Include view file
include $snippet_path;
$snippet_contents = ob_get_contents();
ob_end_clean();
return $snippet_contents;
// Output...
return ob_get_clean();
} else {
if (Session::exists('admin') && Session::get('admin') == true) {
return __('<b>Snippet <u>:name</u> is not found!</b>', 'snippets', array(':name' => $name));

View File

@@ -1,7 +1,7 @@
<h2><?php echo __('Snippets', 'snippets'); ?></h2>
<br />
<?php if(Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php
echo (
@@ -14,21 +14,45 @@
<!-- Snippets_list -->
<table class="table table-bordered">
<thead>
<tr><td><?php echo __('Snippets', 'snippets'); ?></td><td width="30%"><?php echo __('Actions', 'snippets'); ?></td></tr>
<tr><td><?php echo __('Snippets', 'snippets'); ?></td><td width="40%"><?php echo __('Actions', 'snippets'); ?></td></tr>
</thead>
<tbody>
<?php if (count($snippets_list) != 0) foreach ($snippets_list as $snippet) { ?>
<tr>
<td><?php echo basename($snippet, '.snippet.php'); ?></td>
<td>
<?php echo Html::anchor(__('Edit', 'snippets'), 'index.php?id=snippets&action=edit_snippet&filename='.basename($snippet, '.snippet.php'), array('class' => 'btn btn-actions')); ?>
<?php echo Html::anchor(__('Delete', 'snippets'),
'index.php?id=snippets&action=delete_snippet&filename='.basename($snippet, '.snippet.php').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
?>
<td>
<div class="btn-toolbar">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'snippets'), 'index.php?id=snippets&action=edit_snippet&filename='.basename($snippet, '.snippet.php'), array('class' => 'btn btn-actions')); ?>
<a class="btn dropdown-toggle btn-actions" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('View Embed Code', 'snippets'), 'javascript:;', array('title' => __('View Embed Code', 'snippets'), 'onclick' => '$.monstra.snippets.showEmbedCodes("'.basename($snippet, '.snippet.php').'");')); ?></li>
</ul>
<?php echo Html::anchor(__('Delete', 'snippets'),
'index.php?id=snippets&action=delete_snippet&filename='.basename($snippet, '.snippet.php').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
?>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<!-- /Snippets_list -->
<!-- /Snippets_list -->
<div id="embedCodes" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3><?php echo __('Embed Code', 'snippets'); ?></h3>
</div>
<div class="modal-body">
<p>
<b><?php echo __('Shortcode', 'snippets'); ?></b><br>
<code id="shortcode"></code>
<br> <br>
<b><?php echo __('PHP Code', 'snippets'); ?></b><br>
<code id="phpcode"></code>
</p>
</div>
</div>

View File

@@ -75,5 +75,7 @@
'Sitemap file not writable' => 'Sitemap-Datei ist nicht beschreibbar',
'Main .htaccess file writable' => 'Haupt .htaccess-Datei ist beschreibbar',
'Main .htaccess file not writable' => 'Haupt .htaccess-Datei ist nicht beschreibbar',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);

View File

@@ -50,6 +50,7 @@
'Send New Password' => 'Send New Password',
'This user does not exist' => 'This user does not exist',
'Version' => 'Version',
'Plugin does not exist' => 'Plugin does not exist',
'Install script writable' => 'Install script writable',
'Install script not writable' => 'Install script not writable',
@@ -75,5 +76,7 @@
'Sitemap file not writable' => 'Sitemap file not writable',
'Main .htaccess file writable' => 'Main .htaccess file writable',
'Main .htaccess file not writable' => 'Main .htaccess file not writable',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);

View File

@@ -15,8 +15,8 @@
'Site settings' => 'Impostazioni del sito',
'System settings' => 'Impostazioni di sistema',
'Site name' => 'Nome del sito',
'Site description' => 'Descrizione del sito',
'Site keywords' => 'Parole chiavi del sito',
'Site description' => 'Descrizione',
'Site keywords' => 'Parole chiavi',
'Site slogan' => 'Slogan',
'Default page' => 'Pagina predefinita',
'Time zone' => 'Fuso orario',
@@ -24,7 +24,7 @@
'Save' => 'Salva',
'Site' => 'Sito',
'System version' => 'Versione del sistema',
'System version ID' => 'Versione del sistema ID',
'System version ID' => 'ID del sistema',
'GZIP' => 'Compressione GZIP',
'Debugging' => 'Debugging',
'Plugin API' => 'Plugin API',
@@ -52,8 +52,8 @@
'Version' => 'Versione',
'Install script writable' => 'Lo script d&#8217;installazione è scrivibile',
'Install script not writable' => 'Lo script d&#8217;installazione non è scrivibile',
'Install script writable' => 'Script d&#8217;installazione è scrivibile',
'Install script not writable' => 'Script d&#8217;installazione non è scrivibile',
'Directory: <b> :dir </b> writable' => 'Directory <b> :dir </b> è scrivibile',
'Directory: <b> :dir </b> not writable' => 'Directory <b> :dir </b> non è scrivibile',
'PHP Version' => 'Versione PHP',
@@ -76,5 +76,7 @@
'Sitemap file not writable' => 'Sitemap file non è scrivibile',
'Main .htaccess file writable' => 'Principale file .htaccess è scrivibile',
'Main .htaccess file not writable' => 'Principale file .htaccess non è scrivibile',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);

View File

@@ -75,5 +75,7 @@
'Sitemap file not writable' => 'Negalima rašyti į sitemap bylą',
'Main .htaccess file writable' => 'Galima rašyti į pagrindinę .htaccess bylą',
'Main .htaccess file not writable' => 'Negalima rašyti į pagrindinę .htaccess bylą',
'Official Support Forum' => 'Pagalbos forumas',
'Documentation' => 'Dokumentacija',
)
);

View File

@@ -0,0 +1,80 @@
<?php
return array(
'system' => array(
'System' => 'Sistema',
'Published a new version of the :monstra' => 'Foi publicada uma nova versão do :monstra',
'Sitemap created' => 'Mapa do site criado',
'Create sitemap' => 'Criar mapa do site',
'on' => 'on',
'off'=> 'off',
'Site url' => 'URL do site',
'Maintenance Mode' => 'Modo de manutenção',
'Maintenance Mode On' => 'Modo de manutenção online',
'Maintenance Mode Off' => 'Modo de manutenção offline',
'Site settings' => 'Configurações do site',
'System settings' => 'Configurações do sistema',
'Site name' => 'Nome do site',
'Site description' => 'Descrição do site',
'Site keywords' => 'Keywords do site',
'Site slogan' => 'Slogan do site',
'Default page' => 'Página padrão',
'Time zone' => 'Timezone padrão',
'Language' => 'Linguagem',
'Save' => 'Salvar',
'Site' => 'Site',
'System version' => 'Versão do sistema',
'System version ID' => 'ID (longo) da versão do sistema',
'GZIP' => 'GZIP',
'Debugging' => 'Debugando',
'Plugin API' => 'API do Plugin',
'Plugins active' => 'Plugins ativos',
'Actions registered' => 'Ações registradas',
'Filters registered' => 'Filtros registrados',
'logout' => 'Sair',
'site' => 'site',
'Core' => 'Núcleo',
'Delete temporary files' => 'Deletar arquivo temporário',
'Download the latest version' => 'Baixar a última versão',
'Powered by' => 'Feito com',
'Administration' => 'Administração',
'Settings' => 'Configurações',
'Temporary files deleted' => 'Arquivos temporários deletados',
'Extends' => 'Extender',
'View site' => 'Ver site',
'Welcome, :username' => 'Olá, :username',
'Reset Password' => 'Resetar senha',
'< Back to Website' => '< Voltar para o site',
'Forgot your password? >' => 'Esqueceu sua senha? >',
'Administration >' => 'Administração >',
'Send New Password' => 'Enviar nova senha',
'This user does not exist' => 'Este usuário não existe',
'Version' => 'Versão',
'Install script writable' => 'Script de instalação com permissões de escrita',
'Install script not writable' => 'Script de instalação sem permissões de escrita',
'Directory: <b> :dir </b> writable' => 'Diretório: <b>:dir</b> com permissões de escrita',
'Directory: <b> :dir </b> not writable' => 'Diretório: <b>:dir</b> sem permissões de escrita',
'PHP Version' => 'Versão do PHP',
'Module DOM is installed' => 'O módulo DOM está instalado',
'Module DOM is required' => 'O módulo DOM é necessário',
'Module Mod Rewrite is installed' => 'O módulo mod_rewrite está instalado',
'Module SimpleXML is installed' => 'O module SimpleXML está instalado',
'PHP 5.2 or greater is required' => 'A versão do PHP precisa ser acima da 5.2.*',
'Apache Mod Rewrite is required' => 'O módulo mod_rewrite do apache é requerido',
'SimpleXML module is required' => 'o módulo SimpleXML é requerido',
'Field "Site name" is empty' => 'O campo "Nome do site" está vazio',
'Field "Email" is empty' => 'O campo "Email" está vazio',
'Field "Username" is empty' => 'O campo "Usuário" está vazio',
'Field "Password" is empty' => 'O campo "Senha" está vazio',
'Field "Site url" is empty' => 'O campo "URL do site" está vazio',
'Email not valid' => 'Email inválido',
'Install' => 'Instalar',
'...Monstra says...' => '... O Monstra diz ...',
'Sitemap file writable' => 'O arquivo \'sitemap.xml\' tem permissões de escrita',
'Sitemap file not writable' => 'O arquivo \'sitemap.xml\' não tem permissões de escrita',
'Main .htaccess file writable' => 'O arquivo .htaccess principal tem permissões de escrita',
'Main .htaccess file not writable' => 'O arquivo .htacces principal não tem permissões de escrita',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
)
);

View File

@@ -16,8 +16,8 @@
'System settings' => 'Настройки системы',
'Site name' => 'Название сайта',
'Site description' => 'Описание сайта',
'Site keywords' => 'Ключевые слова сайта',
'Site slogan' => 'Слоган сайта',
'Site keywords' => 'Ключевые слова',
'Site slogan' => 'Слоган',
'Default page' => 'Страница по умолчанию',
'Time zone' => 'Временная зона',
'Language' => 'Язык',
@@ -44,13 +44,13 @@
'View site' => 'Сайт',
'Welcome, :username' => 'Добро пожаловать, :username',
'Reset Password' => 'Сброс пароля',
'< Back to Website' => '< Обратно на сайт',
'< Back to Website' => '< Вернуться на сайт',
'Forgot your password? >' => 'Забыли пароль? >',
'Administration >' => 'Администрирование >',
'Send New Password' => 'Выслать новый пароль',
'This user does not exist' => 'Нет такого пользователя',
'Send New Password' => 'Отправить новый пароль',
'This user does not exist' => 'Такого пользователя не существует',
'Version' => 'Версия',
'Plugin does not exist' => 'Такого плагина не существует',
'Install script writable' => 'Установочный скрипт доступен для записи',
'Install script not writable' => 'Установочный скрипт не доступен для записи',
@@ -64,17 +64,19 @@
'PHP 5.2 or greater is required' => 'PHP 5.2 или высше',
'Apache Mod Rewrite is required' => 'Требуется Apache Mod Rewrite',
'SimpleXML module is required' => 'Требуется SimpleXML модуль',
'Field "Site name" is empty' => 'Поле "Название сайта" пустое',
'Field "Email" is empty' => 'Поле "Емейл" пустое',
'Field "Username" is empty' => 'Поле "Имя пользователя" пустое',
'Field "Password" is empty' => 'Поле "Пароль" пустое',
'Field "Site url" is empty' => 'Поле "Адрес сайта" пустое',
'Email not valid' => 'Емейл недействительный',
'Field "Site name" is empty' => 'Поле "Название сайта" не заполнено',
'Field "Email" is empty' => 'Поле "Эл. почта" не заполнено',
'Field "Username" is empty' => 'Поле "Имя пользователя" не заполнено',
'Field "Password" is empty' => 'Поле "Пароль" не заполнено',
'Field "Site url" is empty' => 'Поле "Адрес сайта" не заполнено',
'Email not valid' => 'Эл. почта недействительна',
'Install' => 'Установить',
'...Monstra says...' => '...Monstra говорит...',
'Sitemap file writable' => 'Карта сайта доступна для записи',
'Sitemap file not writable' => 'Карта сайта не доступна для записи',
'Main .htaccess file writable' => 'Главный .htaccess файл доступен для записи',
'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи',
'Official Support Forum' => 'Официальный Форум Поддержки',
'Documentation' => 'Документация',
)
);

Some files were not shown because too many files have changed in this diff Show More