RSS fixes, Micro theme improves
This commit is contained in:
parent
57a9a13152
commit
92f6cc299e
|
@ -89,6 +89,9 @@ define('PROFILE_IMG_WIDTH', 400);
|
|||
define('PROFILE_IMG_HEIGHT', 400);
|
||||
define('PROFILE_IMG_QUALITY', 100); // 100%
|
||||
|
||||
// Password length
|
||||
define('PASSWORD_LENGTH', 6);
|
||||
|
||||
// Password salt length
|
||||
define('SALT_LENGTH', 8);
|
||||
|
||||
|
|
|
@ -522,8 +522,8 @@ function createUser($args) {
|
|||
}
|
||||
|
||||
// Password length
|
||||
if( strlen($args['new_password']) < 6 ) {
|
||||
Alert::set($Language->g('Password must be at least 6 characters long'), ALERT_STATUS_FAIL);
|
||||
if( Text::length($args['new_password']) < PASSWORD_LENGTH ) {
|
||||
Alert::set($Language->g('Password must be at least '.PASSWORD_LENGTH.' characters long'), ALERT_STATUS_FAIL);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,12 @@ class Login {
|
|||
$password = trim($password);
|
||||
|
||||
if (empty($username) || empty($password)) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Username or password empty. Username: '.$username.' - Password: '.$password);
|
||||
Log::set(__METHOD__.LOG_SEP.'Username or password empty. Username: '.$username);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Text::length($password)<PASSWORD_LENGTH) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Password lenght less than required.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -144,4 +149,4 @@ class Login {
|
|||
return Session::destroy();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -14,6 +14,12 @@ class pluginOpenGraph extends Plugin {
|
|||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Default image').'</label>';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
|
||||
$html .= '</div>';
|
||||
|
||||
/*
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Default image').'</label>';
|
||||
$html .= '<select name="defaultImage">';
|
||||
|
@ -26,6 +32,7 @@ class pluginOpenGraph extends Plugin {
|
|||
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
*/
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
@ -64,7 +71,7 @@ class pluginOpenGraph extends Plugin {
|
|||
default:
|
||||
$content = '';
|
||||
// The image it's from the first page
|
||||
if(isset($pages[0]) ) {
|
||||
if (isset($pages[0]) ) {
|
||||
$og['image'] = $pages[0]->coverImage($absolute=true);
|
||||
$content = $pages[0]->content();
|
||||
}
|
||||
|
@ -86,12 +93,13 @@ class pluginOpenGraph extends Plugin {
|
|||
if ($src!==false) {
|
||||
$og['image'] = $src;
|
||||
} else {
|
||||
$og['image'] = DOMAIN_UPLOADS.$this->getValue('defaultImage');
|
||||
if (Text::isNotEmpty($this->getValue('defaultImage'))) {
|
||||
$og['image'] = $this->getValue('defaultImage');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '<meta property="og:image" content="'.$og['image'].'">'.PHP_EOL;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class pluginRSS extends Plugin {
|
|||
$xml .= '<item>';
|
||||
$xml .= '<title>'.$page->title().'</title>';
|
||||
$xml .= '<link>'.$page->permalink().'</link>';
|
||||
$xml .= '<description>'.$page->contentBreak().'</description>';
|
||||
$xml .= '<description>'.Sanitize::html($page->contentBreak()).'</description>';
|
||||
$xml .= '<pubDate>'.$page->dateRaw('r').'</pubDate>';
|
||||
$xml .= '<guid isPermaLink="false">'.$page->uuid().'</guid>';
|
||||
$xml .= '</item>';
|
||||
|
|
|
@ -14,6 +14,12 @@ class pluginTwitterCards extends Plugin {
|
|||
{
|
||||
global $Language;
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Default image').'</label>';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
|
||||
$html .= '</div>';
|
||||
|
||||
/*
|
||||
$html = '<div>';
|
||||
$html .= '<label>'.$Language->get('Default image').'</label>';
|
||||
$html .= '<select name="defaultImage">';
|
||||
|
@ -26,6 +32,7 @@ class pluginTwitterCards extends Plugin {
|
|||
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
*/
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
@ -80,7 +87,9 @@ class pluginTwitterCards extends Plugin {
|
|||
if ($src!==false) {
|
||||
$og['image'] = $src;
|
||||
} else {
|
||||
$og['image'] = DOMAIN_UPLOADS.$this->getValue('defaultImage');
|
||||
if (Text::isNotEmpty($this->getValue('defaultImage'))) {
|
||||
$og['image'] = $this->getValue('defaultImage');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,4 +117,4 @@ class pluginTwitterCards extends Plugin {
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5201,7 +5201,7 @@ tbody.collapse.in {
|
|||
.pagination > li > span {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 14px 12px;
|
||||
padding: 5px 10px;
|
||||
line-height: 1.42857;
|
||||
text-decoration: none;
|
||||
color: #e32929;
|
||||
|
|
|
@ -19,4 +19,17 @@
|
|||
</footer>
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!-- Pagination -->
|
||||
<ul class="pagination">
|
||||
<?php
|
||||
if (Paginator::showPrev()) {
|
||||
echo '<li><a href="'.Paginator::prevPageUrl().'">'.$L->get('Next').'</a></li>';
|
||||
}
|
||||
|
||||
if (Paginator::showNext()) {
|
||||
echo '<li><a href="'.Paginator::nextPageUrl().'">'.$L->get('Previuos').'</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
Loading…
Reference in New Issue