diff --git a/app/models/contact/ContactDAO.php b/app/models/contact/ContactDAO.php
index 6ec1cfb33..d47415e7e 100755
--- a/app/models/contact/ContactDAO.php
+++ b/app/models/contact/ContactDAO.php
@@ -602,7 +602,8 @@ class ContactDAO extends SQL {
select *
from rosterlink
where session = :jid
- ) as rosterlink on jidfrom = rosterlink.jid';
+ ) as rosterlink on jidfrom = rosterlink.jid
+ order by value';
$this->prepare(
'Contact',
diff --git a/app/models/postn/PostnDAO.php b/app/models/postn/PostnDAO.php
index 6b0650f3b..529387afe 100755
--- a/app/models/postn/PostnDAO.php
+++ b/app/models/postn/PostnDAO.php
@@ -476,6 +476,28 @@ class PostnDAO extends SQL {
return $arr[0]['published'];
}
+ function getLastPublished($limitf = false, $limitr = false)
+ {
+ $this->_sql = '
+ select * from postn
+ where
+ node != \'urn:xmpp:microblog:0\'
+ and postn.node not like \'urn:xmpp:microblog:0:comments/%\'
+ and postn.node not like \'urn:xmpp:inbox\'
+ order by published desc
+ ';
+
+ if($limitr)
+ $this->_sql = $this->_sql.' limit '.$limitr.' offset '.$limitf;
+
+ $this->prepare(
+ 'Postn',
+ array()
+ );
+
+ return $this->run('Postn');
+ }
+
function exist($id) {
$this->_sql = '
select count(*) from postn
diff --git a/app/widgets/Chat/_chat_message.tpl b/app/widgets/Chat/_chat_message.tpl
index 5c7f218c5..8452070be 100644
--- a/app/widgets/Chat/_chat_message.tpl
+++ b/app/widgets/Chat/_chat_message.tpl
@@ -32,11 +32,7 @@
{if="preg_match('#^\?OTR#', $message->body)"}
{$c->__('message.encrypted')}
{else}
- {if="isset($message->html)"}
- {$message->html|prepareString}
- {else}
- {$message->body|htmlentities:ENT_COMPAT,'UTF-8'|prepareString}
- {/if}
+
{if="isset($message->html)"}{$message->html|prepareString}{else}{$message->body|htmlentities:ENT_COMPAT,'UTF-8'|prepareString}{/if}
{/if}
+
+
+
{$c->__('post.hot')}
+
+
diff --git a/app/widgets/Post/locales.ini b/app/widgets/Post/locales.ini
index b67d2a556..5bd801c65 100644
--- a/app/widgets/Post/locales.ini
+++ b/app/widgets/Post/locales.ini
@@ -14,6 +14,7 @@ post.no_content_preview = 'No content to preview'
post.no_content = 'No content'
post.published = 'Post published'
post.gallery = 'This picture will be added to your gallery'
+post.hot = "What's Hot"
[manage]
post.public = 'Publish this post on your public feed?'
diff --git a/system/Route.php b/system/Route.php
index cf443c706..8e970d168 100755
--- a/system/Route.php
+++ b/system/Route.php
@@ -26,7 +26,7 @@ class Route extends \BaseController {
'pods' => false,
'disconnect' => array('err'),
'friend' => array('f'),
- 'blog' => array('f', 'n'),
+ 'blog' => array('f'),
'feed' => array('f', 'n'),
'nodeconfig' => array('s', 'n'),
'node' => array('s', 'n'),
diff --git a/themes/material/css/list.css b/themes/material/css/list.css
index e76bfdd62..5cd1bd135 100644
--- a/themes/material/css/list.css
+++ b/themes/material/css/list.css
@@ -69,7 +69,12 @@ ul.active.all li:hover,
ul.active li.active:not(.subheader) {
background-color: rgba(0, 0, 0, 0.03);
cursor: pointer;
- transition: background-color .2s ease-in-out;
+}
+
+ul.active li:hover:not(.subheader) > p.more:after,
+ul.active.all li:hover > p.more:after,
+ul.active li.active:not(.subheader) > p.more:after {
+ background-image: linear-gradient(to bottom, transparent, rgba(247, 247, 247, 1));
}
ul.active li:focus:not(.subheader),
@@ -78,6 +83,12 @@ ul.active li.active:not(.subheader) {
background-color: rgba(0, 0, 0, 0.07);
}
+ul.active li:focus:not(.subheader) > p.more:after,
+ul.active.all li:focus > p.more:after,
+ul.active li.active:not(.subheader) > p.more:after {
+ background-image: linear-gradient(to bottom, transparent, rgba(237, 237, 237, 1));
+}
+
.dark ul.active li:hover:not(.subheader),
.dark ul.active.all li:hover,
.dark ul.active li.active:not(.subheader) {
@@ -105,6 +116,17 @@ ul li > p {
text-overflow: ellipsis;
max-height: 8rem;
line-height: 2.5rem;
+ position: relative;
+}
+
+ul li > p.more:after {
+ display: block;
+ width: 100%;
+ height: 3rem;
+ background-image: linear-gradient(to bottom, transparent, white);
+ content: "";
+ position: absolute;
+ bottom: 0;
}
ul li > p.all {
@@ -123,6 +145,11 @@ ul li img {
max-width: 100%;
}
+ul li > p.more img:not(.emoji) {
+ margin: 1rem auto;
+ display: block;
+}
+
ul li.action {
padding-right: 7rem;
}
@@ -180,10 +207,14 @@ ul li div.bubble {
max-width: 100%;
min-width: 50%;
float: left;
-
/*word-break: break-all;*/
}
+ul li div.bubble div {
+ white-space: pre;
+ display: inline;
+}
+
ul li div.bubble.quote {
font-style: italic;
}
diff --git a/themes/material/css/style.css b/themes/material/css/style.css
index 965eebd8e..0cce80948 100644
--- a/themes/material/css/style.css
+++ b/themes/material/css/style.css
@@ -439,6 +439,11 @@ span.icon.small {
margin-top: -1.5rem;
}
+span.icon.tiny {
+ font-size: 1.8rem;
+ font-weight: 600;
+}
+
span.icon.large {
width: 7rem;
height: 7rem;