Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Aug 1, 2014
2 parents 31ec9de + ac8ba8a commit 2dd6fac
Show file tree
Hide file tree
Showing 768 changed files with 69,827 additions and 11,813 deletions.
10 changes: 9 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ Options -Indexes
# Setting rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on

# Update code bellow for SEO improvements
# RewriteCond %{HTTP_HOST} ^www.example.org [NC]
# RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]

RewriteBase /%siteurlhere%/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

# Update code bellow for SEO improvements
# Redirect 301 /home http://example.org/
</IfModule>
87 changes: 86 additions & 1 deletion changelog.txt → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
Monstra 3.0.0, 2014-08-01
------------------------
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
- Twitter Bootstrap updated to 3.1.1
- Idiorm updated to 1.4.1
- jQuery updated to 2.1.0
- Admin: New Modern User Interface
- Site: New default theme
- Layout fixes according to World Wide Web Consortium (W3C) Standards
- Prefetch DNS to reduce look up times
- Files Manager: added ability to create & rename directories.
- Files Manager: Maximum upload file size message - added.
- Files Manager: Bootstrap fileinput.js updated to 3.0.0
- Files Manager: File Info Popup
- Backup: Restore Site from Backup added
- Plugins Manager: Uploading new plugins via the admin panel added
- Plugins Manager: Read plugin help(README.MD) ability added.
- Responsive Chocolat Lightbox instead of TB Lightbox
- Blog Plugin as a part of Monstra CMS
- CodeMirror Plugin as a part of Monstra CMS
- Markdown Plugin as a part of Monstra CMS
- MarkItUp Color Pallete fixes
- Site Url without trailing slashes
- Admin Help Section - added.
- Pages Plugin: tags field added.
- Pages Plugin: Meta Title added.
- Sitemap Errors Fixes.
- Monstra automatically renames files - fixed
- Monstra Dashboard created and set as default Plugin for Admin Panel
- Ink Framework for Monstra Email Templates
- iCheck plugin for checkboxes added.
- Emails Manager Plugin added.
- HubSpot Messaging Library added for notifications
- Gelato: Unzip Functionality added.
- Gelato: Number Class new method convertToBytes() added.
- Gelato: ErroHandler styles updates
- Users Plugin getGravatarURL() improve
- Plugin API - Actions - Closure support added.
- Plugin API - Filters - Closure support added.
- Core: Better statuses notification (error,success,warning)
- Core: Store user_email in Session
- Core: Javascript may be broken if there is no break line - fixed
- Core: Added ability to avoid caching JS/CSS by the browser.
- Core: Monstra automatically rename files Issue - fixed
- Sandbox Plugin cleanup
- New Flags: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) added.
- Localization: Japanese(JA), Indonesian(ID), Chinese(ZH-CN), Turkish(TR) translations added.
- Localization: Major Fixes

Monstra 2.3.1, 2013-12-25
------------------------
- Localization: Major Fixes
- Gelato: Image.php Major Fixes
- Sitemap: Errors #175 - fixes
- New favicon added #182 - by bernte
- Layouts: General Fixes - by bernte
- Installer: SERVER_PORT issue - fixed by KANekT
- Gelato: Number Class - updated bytes format (JEDEC & IEC 60027) by mbarzda
- Email Layout: footer fixes

Monstra 2.3.0, 2013-12-19
------------------------
- Update Twitter Bootstrap to 2.3.2
- Security: Added limits for login attempts #104
- Security: Obfuscate users email to prevent spam-bots from sniffing it.
- Core: Added ability to map Monstra Engine Directory.
- Core: Maintenance Mode Improvements
- Core: ORM::configure - driver options added
- Gelato: Image.php fix for PNG files
- Gelato: Number.php: Undefined offset fix
- XMLDB: error select for empty table fix
- Plugin API: Stylesheet.php updates - sourcecode misses a linebreak after minified css
- Files Manager: jasny bootstrap-fileupload - added #89
- Users Plugin: login page fixes
- Users Plugin: Deleting users - fixed by Oleg Gatseluk #158
- Pages Plugin: General method getPages() created #123
- Pages Plugin: page expand ajax bug #115 - fixed
- Pages Plugin: Improved available() method to show only published pages
- Pages Plugin: Bug with pages renaming - fixed
- Monstra Email Templates #164
- Localization: Major Fixes
- Localization: PL added
- Localization: NL added
- .htaccess SEO improvements

Monstra 2.2.1, 2013-04-06
------------------------
- Update Gelato to 1.0.3
Expand Down Expand Up @@ -213,7 +298,7 @@ Monstra 1.1.4, 2012-06-09
------------------------
- Improve Monstra Error Handler

Monstra 1.1.3, 2012-06-06
Monstra 1.1.3, 2012-06-06
------------------------
- Improve Monstra Error Handler

Expand Down
2 changes: 1 addition & 1 deletion license.txt → LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ The hypothetical commands `show w' and `show c' should show the appropriate part

You should also get your employer (if you work as a programmer) or school, if any, to sign a �copyright disclaimer� 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>.
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>.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Monstra CMS
Fast and small content management system written in PHP!
Monstra is a modern and lightweight Content Management System.

## System Requirements
- UNIX/Linux host
- PHP 5.2.3 or higher
- SimpleXML Module
- Apache Mod Rewrite
- Multibyte String
Operation system: Unix, Linux, Windows, Mac OS
Middleware: PHP 5.2.3 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)
Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule)

## Steps to Install
1. [Download the latest version.](http://monstra.org/download)
Expand All @@ -21,13 +19,13 @@ Fast and small content management system written in PHP!
2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/contribute/sponsors)
3. Develop a new plugin.
4. Create a new theme.
5. Find and [report issues.](https://github.com/MonstraLab/monstra-cms/issues)
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/MonstraLab/monstra-cms)
- [Github Repository](https://github.com/Awilum/monstra-cms)

Copyright (C) 2012-2013 Romanenko Sergey / Awilum [awilum@msn.com]
Copyright (C) 2012-2014 Romanenko Sergey / Awilum [awilum@msn.com]
70 changes: 52 additions & 18 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @package Monstra
*
* @author Romanenko Sergey / Awilum <awilum@msn.com>
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -33,24 +33,58 @@
// Admin login
if (Request::post('login_submit')) {

$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('login')) {
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
Session::set('admin', true);
Session::set('user_id', (int) $user['id']);
Session::set('user_login', (string) $user['login']);
Session::set('user_role', (string) $user['role']);
Request::redirect('index.php');
if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {

$login_error = __('You are banned for 10 minutes. Try again later', 'users');

} else {

$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('login')) {
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
Session::set('admin', true);
Session::set('user_id', (int) $user['id']);
Session::set('user_login', (string) $user['login']);
Session::set('user_role', (string) $user['role']);
Session::set('user_email', (string) $user['email']);
Request::redirect('index.php');
}
} else {
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');

if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts, 600);
} else {
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
}
} else {
Cookie::set('login_attempts', 1, 600);
}

}
}
} else {
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');

if (Cookie::get('login_attempts')) {
if (Cookie::get('login_attempts') < 5) {
$attempts = Cookie::get('login_attempts') + 1;
Cookie::set('login_attempts', $attempts, 600);
} else {
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
}
} else {
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
Cookie::set('login_attempts', 1, 600);
}
}
} else {
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
}

Notification::setNow('error', $login_error);

}

// Errors
Expand Down Expand Up @@ -86,13 +120,13 @@
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email')
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
->assign('user_login', $user['login'])
->assign('new_hash', $new_hash)
->assign('view', 'reset_password_email')
->assign('email_template', 'reset-password')
->render());
$mail->Send();

Expand All @@ -101,7 +135,7 @@
Notification::set('reset_password', 'reset_password');

// Redirect to password-reset page
Request::redirect(Site::url().'admin');
Request::redirect(Site::url().'/admin');

}

Expand All @@ -127,7 +161,7 @@
if (Request::get('id')) {
$area = Request::get('id');
} else {
Request::redirect('index.php?id=pages');
Request::redirect('index.php?id=dashboard');
}

$plugins_registered = Plugin::$plugins;
Expand Down
Loading

0 comments on commit 2dd6fac

Please sign in to comment.