1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +02:00

Merge pull request #196 from promo360/dev

Dev
This commit is contained in:
Sergey Romanenko
2014-01-06 11:09:59 -08:00
15 changed files with 30 additions and 30 deletions

View File

@@ -62,11 +62,11 @@
<div class="container form-signin"> <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" alt="monstra" /></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"> <div class="administration-area">
<hr> <hr>
<div> <div>
<h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br /> <h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br>
<form method="post"> <form method="post">
<div class="form-group"> <div class="form-group">
<label><?php echo __('Username', 'users'); ?></label> <label><?php echo __('Username', 'users'); ?></label>
@@ -87,7 +87,7 @@
<div class="reset-password-area"> <div class="reset-password-area">
<hr> <hr>
<div> <div>
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br /> <h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br>
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?> <?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<form method="post"> <form method="post">
<div class="form-group"> <div class="form-group">

View File

@@ -157,7 +157,7 @@ class Html
*/ */
public static function br($num = 1) public static function br($num = 1)
{ {
return str_repeat("<br />",(int) $num); return str_repeat("<br>",(int) $num);
} }
/** /**

View File

@@ -19,18 +19,18 @@ ob_end_clean();
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>MonstraCMS::BLOG::RSS</title> <title>MonstraCMS::BLOG::RSS</title>
<link><?php echo Option::get('siteurl'); ?>blog</link> <link><?php echo Option::get('siteurl'); ?>/blog</link>
<description>The latest updates for <?php echo Option::get('sitename'); ?>.</description> <description>The latest updates for <?php echo Option::get('sitename'); ?>.</description>
<language>en-us</language> <language>en-us</language>
<pubDate><?php echo $now; ?></pubDate> <pubDate><?php echo $now; ?></pubDate>
<lastBuildDate><?php echo $now; ?></lastBuildDate> <lastBuildDate><?php echo $now; ?></lastBuildDate>
<atom:link href="<?php echo Option::get('siteurl'); ?>rss.php" rel="self" type="application/rss+xml" /> <atom:link href="<?php echo Option::get('siteurl'); ?>/rss.php" rel="self" type="application/rss+xml" />
<generator>Monstra</generator> <generator>Monstra</generator>
<?php foreach ($posts as $post) { ?> <?php foreach ($posts as $post) { ?>
<item> <item>
<title><?php echo $post['title']; ?></title> <title><?php echo $post['title']; ?></title>
<link><?php echo Option::get('siteurl').'blog/'.$post['slug']; ?></link> <link><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></link>
<guid><?php echo Option::get('siteurl').'blog/'.$post['slug']; ?></guid> <guid><?php echo Option::get('siteurl').'/blog/'.$post['slug']; ?></guid>
<pubDate><?php echo Date::format($post['date'], 'd M Y'); ?></pubDate> <pubDate><?php echo Date::format($post['date'], 'd M Y'); ?></pubDate>
<description><![CDATA[<?php echo Text::toHtml(Text::cut(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'), 300)); ?>]]></description> <description><![CDATA[<?php echo Text::toHtml(Text::cut(File::getContent(STORAGE . DS . 'pages' . DS . $post['id'] . '.page.txt'), 300)); ?>]]></description>
<author><?php echo $post['author']; ?></author> <author><?php echo $post['author']; ?></author>

View File

@@ -31,25 +31,25 @@ class FilesmanagerAdmin extends Backend
// Add slash if not exists // Add slash if not exists
if (substr($path, -1, 1) != '/') { if (substr($path, -1, 1) != '/') {
$path .= '/'; $path .= '/';
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} }
// Upload corectly! // Upload corectly!
if ($path == 'uploads' || $path == 'uploads//') { if ($path == 'uploads' || $path == 'uploads//') {
$path = 'uploads/'; $path = 'uploads/';
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} }
// Only 'uploads' folder! // Only 'uploads' folder!
if (strpos($path, 'uploads') === false) { if (strpos($path, 'uploads') === false) {
$path = 'uploads/'; $path = 'uploads/';
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} }
// Set default path value if path is empty // Set default path value if path is empty
if ($path == '') { if ($path == '') {
$path = 'uploads/'; $path = 'uploads/';
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} }
$files_path = ROOT . DS . 'public' . DS . $path; $files_path = ROOT . DS . 'public' . DS . $path;
@@ -85,7 +85,7 @@ class FilesmanagerAdmin extends Backend
if (Security::check(Request::get('token'))) { if (Security::check(Request::get('token'))) {
File::delete($files_path.Request::get('delete_file')); File::delete($files_path.Request::get('delete_file'));
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
} }
@@ -97,7 +97,7 @@ class FilesmanagerAdmin extends Backend
if (Security::check(Request::get('token'))) { if (Security::check(Request::get('token'))) {
Dir::delete($files_path.Request::get('delete_dir')); Dir::delete($files_path.Request::get('delete_dir'));
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
} }
@@ -111,7 +111,7 @@ class FilesmanagerAdmin extends Backend
if ($_FILES['file']) { if ($_FILES['file']) {
if ( ! in_array(File::ext($_FILES['file']['name']), $forbidden_types)) { if ( ! in_array(File::ext($_FILES['file']['name']), $forbidden_types)) {
move_uploaded_file($_FILES['file']['tmp_name'], $files_path.Security::safeName(basename($_FILES['file']['name'], File::ext($_FILES['file']['name'])), '-', true).'.'.File::ext($_FILES['file']['name'])); move_uploaded_file($_FILES['file']['tmp_name'], $files_path.Security::safeName(basename($_FILES['file']['name'], File::ext($_FILES['file']['name'])), '-', true).'.'.File::ext($_FILES['file']['name']));
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path); Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
} }
} }

View File

@@ -486,7 +486,7 @@ class Page extends Pages
*/ */
public static function url() public static function url()
{ {
return Option::get('siteurl').Pages::$page['slug']; return Option::get('siteurl').'/'.Pages::$page['slug'];
} }
/** /**

View File

@@ -82,7 +82,7 @@ class Sitemap extends Frontend
$map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n"; $map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
foreach ($pages_list as $page) { foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; } 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"; $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 // Get list of components
@@ -91,7 +91,7 @@ class Sitemap extends Frontend
// Add components to sitemap // Add components to sitemap
if (count($components) > 0) { if (count($components) > 0) {
foreach ($components as $component) { 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"; $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";
} }
} }

View File

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

View File

@@ -155,7 +155,7 @@ class Users extends Frontend
$mail->Send(); $mail->Send();
// Redirect to user profile // Redirect to user profile
Request::redirect(Option::get('siteurl').'users/'.Users::$users->lastId()); Request::redirect(Option::get('siteurl').'/users/'.Users::$users->lastId());
} }
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }

View File

@@ -6,7 +6,7 @@ Your new details are as follows:
Username: <?php echo $user_login; ?><br> Username: <?php echo $user_login; ?><br>
Password: <?php echo $new_password; ?> Password: <?php echo $new_password; ?>
<br><br> <br><br>
To change your password, please visit this page: <a href="<?php echo $site_url; ?>users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>users/<?php echo $user_id; ?></a> To change your password, please visit this page: <a href="<?php echo $site_url; ?>/users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>/users/<?php echo $user_id; ?></a>
<br><br> <br><br>
All the best,<br> All the best,<br>
<?php echo $site_name; ?> <?php echo $site_name; ?>

View File

@@ -4,14 +4,14 @@ You have requested to reset your password on <?php echo $site_name; ?> because y
If you did not request this, please ignore it. If you did not request this, please ignore it.
<br><br> <br><br>
To reset your password, please visit the following page:<br> To reset your password, please visit the following page:<br>
<a href="<?php echo $site_url; ?>users/password-reset?hash=<?php echo $new_hash; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>users/password-reset?hash=<?php echo $new_hash; ?></a> <a href="<?php echo $site_url; ?>/users/password-reset?hash=<?php echo $new_hash; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>/users/password-reset?hash=<?php echo $new_hash; ?></a>
<br><br> <br><br>
When you visit that page, your password will be reset, and the new password will be emailed to you. When you visit that page, your password will be reset, and the new password will be emailed to you.
<br><br> <br><br>
Your username is: <?php echo $user_login; ?> Your username is: <?php echo $user_login; ?>
<br><br> <br><br>
To edit your profile, go to this page:<br> To edit your profile, go to this page:<br>
<a href="<?php echo $site_url ?>users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url ?>users/<?php echo $user_id; ?></a> <a href="<?php echo $site_url ?>/users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url ?>/users/<?php echo $user_id; ?></a>
<br><br> <br><br>
All the best,<br> All the best,<br>
<?php echo $site_name; ?> <?php echo $site_name; ?>

View File

@@ -5,5 +5,5 @@
<?php echo Form::hidden('csrf', Security::token()); ?> <?php echo Form::hidden('csrf', Security::token()); ?>
<label><?php echo __('Username', 'users'); ?></label><input name="username" type="text" class="input-large" /> <label><?php echo __('Username', 'users'); ?></label><input name="username" type="text" class="input-large" />
<label><?php echo __('Password', 'users'); ?></label><input name="password" type="password" class="input-large" /> <label><?php echo __('Password', 'users'); ?></label><input name="password" type="password" class="input-large" />
<br><input name="login_submit" class="btn" type="submit" value="<?php echo __('Log In', 'users'); ?>" /> <a class="small-grey-text reset-password-btn" href="<?php echo Option::get('siteurl').'users/password-reset'; ?>"><?php echo __('Forgot your password?', 'users');?></a> <br><input name="login_submit" class="btn" type="submit" value="<?php echo __('Log In', 'users'); ?>" /> <a class="small-grey-text reset-password-btn" href="<?php echo Option::get('siteurl').'/users/password-reset'; ?>"><?php echo __('Forgot your password?', 'users');?></a>
</form> </form>

View File

@@ -20,7 +20,7 @@ Plugin::register( __FILE__,
'http://monstra.org/'); 'http://monstra.org/');
// Set crypt captcha path to images // Set crypt captcha path to images
$cryptinstall = Option::get('siteurl').'plugins/captcha/crypt/images/'; $cryptinstall = Option::get('siteurl').'/plugins/captcha/crypt/images/';
// Include Crypt Captcha // Include Crypt Captcha
include PLUGINS . DS . 'captcha/crypt/cryptographp.fct.php'; include PLUGINS . DS . 'captcha/crypt/cryptographp.fct.php';

View File

@@ -45,7 +45,7 @@ main:
pop {sp, pc} pop {sp, pc}
message: message:
.asciz "Hello world!<br />" .asciz "Hello world!<br>"
</textarea> </textarea>
</form> </form>

View File

@@ -53,7 +53,7 @@ This is an example of EJS (embedded javascript)
</script> </script>
<p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on
JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p> JavaScript, CSS and XML.<br>Other dependancies include those of the scriping language chosen.</p>
<p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET),
<code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p> <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>

View File

@@ -53,7 +53,7 @@
}); });
</script> </script>
<br /> <br>
<h3>Smarty 2, custom delimiters</h3> <h3>Smarty 2, custom delimiters</h3>
<form><textarea id="code2" name="code2"> <form><textarea id="code2" name="code2">
@@ -89,7 +89,7 @@
}); });
</script> </script>
<br /> <br>
<h3>Smarty 3</h3> <h3>Smarty 3</h3>