Bugfixes and extending things
This commit is contained in:
parent
fd22e35e04
commit
425350d402
7 changed files with 222 additions and 31 deletions
|
@ -6,7 +6,7 @@ class module_mybbnews extends admin_module{
|
|||
$info["name"]="MYBB News";
|
||||
$info["file"]="mybbnews";
|
||||
$info["author"]="genuineparts";
|
||||
$info["version"]="1.0.1";
|
||||
$info["version"]="1.0.2";
|
||||
$info["url"]="http://www.becast.ar";
|
||||
return $info;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ class plugins_mybbnews{
|
|||
|
||||
function newsview(){
|
||||
global $db, $config;
|
||||
date_default_timezone_set($config['timezone']);
|
||||
$this->tpl= new Smarty();
|
||||
$parser=new textparser(true);
|
||||
$root = $_SERVER['DOCUMENT_ROOT'] . $config["path"];
|
||||
|
@ -33,7 +34,7 @@ class plugins_mybbnews{
|
|||
$row["year"]=date("Y",$row["dateline"]);
|
||||
$row["month"]=date("M",$row["dateline"]);
|
||||
$row["day"]=date("d",$row["dateline"]);
|
||||
$row["time"]=date("h:i",$row["dateline"]);
|
||||
$row["time"]=date("H:i",$row["dateline"]);
|
||||
$row["date"]=date("d.m.Y",$row["dateline"]);
|
||||
$row["text"]=$parser->parse(nl2br($row["message"]));
|
||||
$row["title"]=$parser->parse(nl2br($row["subject"]));
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
<h2>News</h2>
|
||||
{foreach from=$news item=n}
|
||||
<article class="entry">
|
||||
<header class="entry-header">
|
||||
<h2 class="entry-title">{$n.title}</h2>
|
||||
<div class="entry-meta">
|
||||
<ul>
|
||||
<li>{$n.date}</li>
|
||||
<span class="meta-sep">•</span>
|
||||
<li><a href="/np/{$n.username}">{$n.username}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
<p>{$n.text}</p>
|
||||
</div>
|
||||
<p>
|
||||
<small
|
||||
><a href="/forum/thread-{$n.tid}.html"
|
||||
>{$n.comments} Kommentar(e)</a
|
||||
></small
|
||||
>
|
||||
</p>
|
||||
</article>
|
||||
<!-- end entry -->
|
||||
{foreachelse} {/foreach}
|
||||
<div id="comments">
|
||||
<h1 style="color:#FEAC48;">News</h1>
|
||||
<ul class="commentlist">
|
||||
{foreach from=$news item=n}
|
||||
<li class="comment_{cycle values="odd,even"}">
|
||||
<div class="author"><img class="avatar" src="forum/uploads/avatars/avatar_{$n.fuid}.png" width="32" height="32" alt=""><span class="name"><a href="/np/{$n.username}">{$n.username}</a></span> <span class="wrote">schrieb:</span></div>
|
||||
<div class="submitdate">{$n.date} {$n.time}</div> <h2 class="entry-title" style="color:#FEAC48;">{$n.title}</h2>
|
||||
<p>{$n.text}</p>
|
||||
<small><a href="/forum/thread-{$n.tid}.html">{$n.comments} Kommentar(e)</a></small>
|
||||
</li>
|
||||
{foreachelse} {/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue