1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-03 11:47:51 +02:00

Merge branch 'origin/dev'

Conflicts:
	engine/Monstra.php
	public/assets/js/bootstrap.js
This commit is contained in:
Awilum
2014-01-01 21:32:20 +02:00
20 changed files with 5290 additions and 3342 deletions

View File

@@ -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)

View File

@@ -62,7 +62,7 @@
<div class="container form-signin">
<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 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" alt="monstra" /></a></div>
<div class="administration-area">
<hr>
<div>
@@ -127,7 +127,7 @@
</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 Monstra::VERSION; ?></span>
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div>
</body>

View File

@@ -1,27 +1,38 @@
Monstra 2.3.0, xxxx-xx-xx
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
- Update PHPMailer to 5.2.7
- Monstra: Added ability to map Monstra Engine Directory
- .htaccess SEO improvements
- Files Manager: jasny bootstrap-fileupload - added #89
- Security: Added limits for login attempts #104
- Security: Obfuscate users email to prevent spam-bots from sniffing it.
- Users Plugin: login page fixes
- Pages Plugin: page expand ajax bug #115 - fixed
- Localization: PL added
- Localization: NL added
- Localization: DE fixed
- Maintenance Mode Improvements
- 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
- Fix Number.php: Undefined offset
- Gelato: Number.php: Undefined offset fix
- XMLDB: error select for empty table fix
- Update Stylesheet.php - sourcecode misses a linebreak after minified css
- 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
- Users Plugin - Deleting users - fixed by Oleg Gatseluk #158
- Pages Plugin - Improved available() method to show only published pages
- 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
------------------------

View File

@@ -39,7 +39,11 @@ class Monstra
/**
* The version of Monstra
*/
<<<<<<< HEAD
const VERSION = '2.4.0 pre-alpha';
=======
const VERSION = '2.3.1';
>>>>>>> refs/remotes/origin/dev
/**
* Monstra environment

View File

@@ -128,7 +128,7 @@ class Javascript
if (BACKEND) {
echo '<script type="text/javascript" src="'.Option::get('siteurl').'tmp/minify/backend_site.minify.js"></script>';
} else {
echo '<script type="text/javascript" src="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.js"></script>';
echo '<script type="text/javascript" src="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.js"></script>'."\n";
}
}
}

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -16,8 +16,11 @@
// Get array with the names of all modules compiled and loaded
$php_modules = get_loaded_extensions();
// Get server port
if ($_SERVER["SERVER_PORT"] == "80") $port = ""; else $port = ':'.$_SERVER["SERVER_PORT"];
// Get site URL
$site_url = 'http://'.$_SERVER["SERVER_NAME"].str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
$site_url = 'http://'.$_SERVER["SERVER_NAME"].$port.str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
// Rewrite base
$rewrite_base = str_replace(array("index.php", "install.php"), "", $_SERVER['PHP_SELF']);
@@ -295,7 +298,7 @@
<input class="input-xlarge" name="siteurl" type="text" value="<?php echo Html::toText($site_url); ?>" />
<br />
<label><?php echo __('Username', 'users'); ?></label>
<input class="input-xlarge" class="login" name="login" value="<?php if(Request::post('login')) echo Html::toText(Request::post('login')); ?>" type="text" />
<input class="input-xlarge login" name="login" value="<?php if(Request::post('login')) echo Html::toText(Request::post('login')); ?>" type="text" />
<br />
<label><?php echo __('Password', 'users'); ?></label>
<input class="input-xlarge" name="password" type="password" />
@@ -397,78 +400,78 @@
</form>
</div>
<hr>
<p align="center"><strong><?php echo __('...Monstra says...', 'system'); ?></strong></p>
<p class="text-center"><strong><?php echo __('...Monstra says...', 'system'); ?></strong></p>
<div>
<ul>
<?php
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
echo '<span class="error"><li>'.__('PHP 5.2 or greater is required', 'system').'</li></span>';
echo '<li class="error">'.__('PHP 5.2 or greater is required', 'system').'</li>';
} else {
echo '<span class="ok"><li>'.__('PHP Version', 'system').' '.PHP_VERSION.'</li></span>';
echo '<li class="ok">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
}
if (in_array('SimpleXML', $php_modules)) {
echo '<span class="ok"><li>'.__('Module SimpleXML is installed', 'system').'</li></span>';
echo '<li class="ok">'.__('Module SimpleXML is installed', 'system').'</li>';
} else {
echo '<span class="error"><li>'.__('SimpleXML module is required', 'system').'</li></span>';
echo '<li class="error">'.__('SimpleXML module is required', 'system').'</li>';
}
if (in_array('dom', $php_modules)) {
echo '<span class="ok"><li>'.__('Module DOM is installed', 'system').'</li></span>';
echo '<li class="ok">'.__('Module DOM is installed', 'system').'</li>';
} else {
echo '<span class="error"><li>'.__('Module DOM is required', 'system').'</li></span>';
echo '<li class="error">'.__('Module DOM is required', 'system').'</li>';
}
if (function_exists('apache_get_modules')) {
if ( ! in_array('mod_rewrite',apache_get_modules())) {
echo '<span class="error"><li>'.__('Apache Mod Rewrite is required', 'system').'</li></span>';
echo '<li class="error">'.__('Apache Mod Rewrite is required', 'system').'</li>';
} else {
echo '<span class="ok"><li>'.__('Module Mod Rewrite is installed', 'system').'</li></span>';
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>';
}
} else {
echo '<span class="ok"><li>'.__('Module Mod Rewrite is installed', 'system').'</li></span>';
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>';
}
foreach ($dir_array as $dir) {
if (is_writable($dir.'/')) {
echo '<span class="ok"><li>'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li></span>';
echo '<li class="ok">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';
} else {
echo '<span class="error"><li>'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li></span>';
echo '<li class="error">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';
}
}
if (is_writable(__FILE__)) {
echo '<span class="ok"><li>'.__('Install script writable', 'system').'</li></span>';
echo '<li class="ok">'.__('Install script writable', 'system').'</li>';
} else {
echo '<span class="error"><li>'.__('Install script not writable', 'system').'</li></span>';
echo '<li class="error">'.__('Install script not writable', 'system').'</li>';
}
if (is_writable('sitemap.xml')) {
echo '<span class="ok"><li>'.__('Sitemap file writable', 'system').'</li></span>';
echo '<li class="ok">'.__('Sitemap file writable', 'system').'</li>';
} else {
echo '<span class="error"><li>'.__('Sitemap file not writable', 'system').'</li></span>';
echo '<li class="error">'.__('Sitemap file not writable', 'system').'</li>';
}
if (is_writable('.htaccess')) {
echo '<span class="ok"><li>'.__('Main .htaccess file writable', 'system').'</li></span>';
echo '<li class="ok">'.__('Main .htaccess file writable', 'system').'</li>';
} else {
echo '<span class="error"><li>'.__('Main .htaccess file not writable', 'system').'</li></span>';
echo '<li class="error">'.__('Main .htaccess file not writable', 'system').'</li>';
}
if (isset($errors['sitename'])) echo '<span class="error"><li>'.$errors['sitename'].'</li></span>';
if (isset($errors['siteurl'])) echo '<span class="error"><li>'.$errors['siteurl'].'</li></span>';
if (isset($errors['login'])) echo '<span class="error"><li>'.$errors['login'].'</li></span>';
if (isset($errors['password'])) echo '<span class="error"><li>'.$errors['password'].'</li></span>';
if (isset($errors['email'])) echo '<span class="error"><li>'.$errors['email'].'</li></span>';
if (isset($errors['email_valid'])) echo '<span class="error"><li>'.$errors['email_valid'].'</li></span>';
if (isset($errors['sitename'])) echo '<li class="error">'.$errors['sitename'].'</li>';
if (isset($errors['siteurl'])) echo '<li class="error">'.$errors['siteurl'].'</li>';
if (isset($errors['login'])) echo '<li class="error">'.$errors['login'].'</li>';
if (isset($errors['password'])) echo '<li class="error">'.$errors['password'].'</li>';
if (isset($errors['email'])) echo '<li class="error">'.$errors['email'].'</li>';
if (isset($errors['email_valid'])) echo '<li class="error">'.$errors['email_valid'].'</li>';
?>
</ul>
</div>
</div>
<div class="install-block-footer">
<div style="text-align:center;">
<span class="small-grey-text">© 2012 - 2013 <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 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div>
</div>

View File

@@ -244,6 +244,10 @@ class Image
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $new_width;
$this->height = $new_height;
return $this;
}
@@ -282,11 +286,15 @@ class Image
imagefill($this->image, 0, 0, $transparent);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $old_image, 0, 0, 0, 0, $width, $height, $width, $height);
imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height);
// Destroy an image
imagedestroy($old_image);
// Save new width and height
$this->width = $width;
$this->height = $height;
return $this;
}

View File

@@ -28,7 +28,7 @@ class Number
}
/**
* Convert bytes in 'kb','mb','gb','tb','pb'
* Convert bytes in 'KB','MB','GB','TiB','PiB'
*
* <code>
* echo Number::byteFormat(10000);
@@ -42,7 +42,7 @@ class Number
// Redefine vars
$size = (int) $size;
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
$unit = array('B', 'KB', 'MB', 'GB', 'TiB', 'PiB');
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
}

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
'Delete file: :file' => 'Lösche Datei: file',
'Extension' => 'Dateiendung',
'Size' => 'Größe',
'Select file' => 'Select file',
'Change' => 'Change',
'Select file' => 'Datei wählen',
'Change' => 'Ändern',
)
);

View File

@@ -309,7 +309,13 @@ class PagesAdmin extends Backend
// Update parents in all childrens
if ((Security::safeName(Request::post('page_name'), '-', true)) !== (Security::safeName(Request::post('page_old_name'), '-', true)) and (Request::post('old_parent') == '')) {
$pages->updateWhere('[parent="'.Request::get('name').'"]', array('parent' => Text::translitIt(trim(Request::post('page_name')))));
$_pages = $pages->select('[parent="'.Text::translitIt(trim(Request::post('page_old_name'))).'"]');
if ( ! empty($_pages)) {
foreach ($_pages as $_page) {
$pages->updateWhere('[parent="'.$_page['parent'].'"]', array('parent' => Security::safeName(Request::post('page_name'), '-', true)));
}
}
if ($pages->updateWhere('[slug="'.Request::get('name').'"]',
array('slug' => Security::safeName(Request::post('page_name'), '-', true),

View File

@@ -3,25 +3,27 @@
<ul>
<?php
// Display pages
if (count($pages_list) > 0) {
foreach ($pages_list as $page) {
if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';
if (trim($page['parent']) !== '') { echo '<ul>'; }
echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>';
if (trim($page['parent']) !== '') { echo '</ul>'; }
if (trim($page['parent']) !== '') { echo '<ul>'."\n"; }
echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>'."\n";
if (trim($page['parent']) !== '') { echo '</ul>'."\n"; }
}
if (count($components) == 0) { echo '<ul>'; }
if (count($components) == 0) { echo '<ul>'."\n"; }
}
// Display components
if (count($components) > 0) {
if (count($pages_list) == 0) { echo '<ul>'; }
if (count($pages_list) == 0) { echo '<ul>'."\n"; }
foreach ($components as $component) {
echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>';
echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>'."\n";
}
echo '</ul>';
if (count($pages_list) == 0) { echo '</ul>'."\n"; }
}
?>

View File

@@ -63,6 +63,6 @@
'Your login details for :site_name' => 'Deine Login-Daten für :site_name',
'About Me' => 'Über Mich',
'Profile' => 'Profil',
'You are banned for 10 minutes. Try again later' => 'You are banned for 10 minutes. Try again later',
'You are banned for 10 minutes. Try again later' => 'Du wurdest für 10 Minuten blockiert. Bitte probier es später nochmal',
)
);

View File

@@ -192,7 +192,9 @@
<table width="100%" cellpadding="10" cellspacing="0" border="0">
<tr>
<td valign="top" style="font-size:11px; border-top:1px dashed #ccc; text-align:right;">
<p style="margin-top:0; margin-bottom:0;">© 2012 - 2014 <a href="http://monstra.org" style="color:#333; text-decoration:none;">MONSTRA.ORG</p>
<p style="margin-top:0; margin-bottom:0;">
</p>
</td>
</tr>
</table>

2280
public/assets/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,6 @@
<footer>
<p>
<div style="float:left;"><?php echo Chunk::get('footer-links'); ?></div>
<div style="float:right;"><?php Action::run('theme_footer'); ?><?php echo Site::powered(); ?></div>
</p>
</footer>
</div> <!-- /container -->

View File

@@ -20,4 +20,4 @@
</div>
<hr>
<?php Chunk::get('footer');
<?php Chunk::get('footer'); ?>

View File

@@ -2,19 +2,16 @@
&lt;p&gt;Welcome to your new Monstra powered website.&lt;br&gt;Monstra is succesfully installed, you can start editing the content and customising your site.&lt;/p&gt;
&lt;br&gt;
&lt;h4&gt;Getting Started&lt;/h4&gt;
&lt;p&gt;This is a default &lt;u&gt;home&lt;/u&gt; page of your website.&lt;br&gt;Here&#039;s a quick description of how to edit this page:
&lt;p&gt;This is a default &lt;u&gt;home&lt;/u&gt; page of your website.&lt;br&gt;Here&#039;s a quick description of how to edit this page:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First make sure you&#039;re &lt;a href=&quot;{siteurl}admin&quot;&gt;logged in.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go to the &lt;a href=&quot;{siteurl}admin/index.php?id=pages&quot;&gt;Pages Manager&lt;/a&gt; and click &quot;Edit&quot; button for this page.&lt;/li&gt;
&lt;li&gt;Make your changes, click &quot;Save&quot; and you&#039;re done!&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;h4&gt;Online Resources&lt;/h4&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://monstra.org&quot;&gt;Official Site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://forum.monstra.org&quot;&gt;Official Support Forum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://monstra.org/documentation&quot;&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;