Fix broken custom newsfeed, newsfeed redesign
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
16
lib/ajax.php
16
lib/ajax.php
@@ -25,6 +25,8 @@ require './userdata.inc.php';
|
||||
require './tables.inc.php';
|
||||
require './classes/database/class.Database.php';
|
||||
require './classes/settings/class.Settings.php';
|
||||
require './functions/validate/function.validate_ip.php';
|
||||
require './functions/validate/function.validateDomain.php';
|
||||
|
||||
if(isset($_POST['action'])) {
|
||||
$action = $_POST['action'];
|
||||
@@ -72,7 +74,19 @@ if ($action == "newsfeed") {
|
||||
$content = preg_replace("/[\r\n]+/", " ", strip_tags($item->description));
|
||||
$content = substr($content, 0, 150) . "...";
|
||||
|
||||
echo "<tr class=\"newsitem\"><td><small>" . $date . "</small><br /><a href=\"" . $link . "\" target=\"_blank\"><b>" . $title . "</b><br />" . $content . "</a></td></tr>";
|
||||
echo "<li class=\"clearfix\">
|
||||
<div class=\"newsfeed-body clearfix\">
|
||||
<div class=\"header\">
|
||||
<strong class=\"primary-font\"><a href=\"{$link}\" target=\"_blank\">{$title}</a></strong>
|
||||
<small class=\"pull-right text-muted\">
|
||||
<i class=\"fa fa-clock-o fa-fw\"></i> {$date}
|
||||
</small>
|
||||
</div>
|
||||
<p>
|
||||
{$content}
|
||||
</p>
|
||||
</div>
|
||||
</li>";
|
||||
}
|
||||
} else {
|
||||
echo "";
|
||||
|
||||
7
templates/Sparkle/admin/index/index.tpl
vendored
7
templates/Sparkle/admin/index/index.tpl
vendored
@@ -174,7 +174,12 @@ $header
|
||||
<th>News</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="newsfeeditems">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="newsfeed" id="newsfeeditems"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</if>
|
||||
|
||||
41
templates/Sparkle/assets/css/main.css
vendored
41
templates/Sparkle/assets/css/main.css
vendored
@@ -864,7 +864,7 @@ label.nobr {
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
/* NEWSFEED */
|
||||
/* NEWSFEED
|
||||
#newsfeed {
|
||||
display: none;
|
||||
}
|
||||
@@ -899,6 +899,45 @@ label.nobr {
|
||||
.newsitem small {
|
||||
font-size:8px;
|
||||
color:gray;
|
||||
}*/
|
||||
.newsfeed {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.newsfeed li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted #999;
|
||||
}
|
||||
|
||||
.newsfeed li:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.newsfeed li.left .newsfeed-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.newsfeed li.right .newsfeed-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.newsfeed li .newsfeed-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon,
|
||||
.newsfeed .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.newsfeed-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
/* TIPPER */
|
||||
|
||||
7
templates/Sparkle/customer/index/index.tpl
vendored
7
templates/Sparkle/customer/index/index.tpl
vendored
@@ -156,7 +156,12 @@ $header
|
||||
<th>News</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="newsfeeditems">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="newsfeed" id="newsfeeditems"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user