- Affected Version
- WoltLab Suite 5.3
Habe jetzt alle drei Boxen einzeln am laufen bekommen, aber wenn ich 2 oder 3 anzeigen will, wir der Inhalt nicht angezeigt.
Bin mit meinem Latein am Ende.
Könnte sich das bitte mal jemand anschauen
PHP
<?php
use wbb\data\thread\AccessibleThreadList;
use wcf\system\WCF;
$threadList = new AccessibleThreadList();
$threadList->sqlLimit = 5;
$threadList->sqlOrderBy = "thread.lastPostTime DESC";
$threadList->getConditionBuilder()->add('thread.boardID NOT IN (1,2,3,4,144,290,291,292,293,294,197,198,199,200,201,296,196,27,256)');
$threadList->readObjects();
$assignVariables['homeThreads'] = $threadList->getObjects();
WCF::getTPL()->assign($assignVariables);
?>
<?php
use wcf\data\article\AccessibleArticleList;
use wcf\system\WCF;
$articleList = new AccessibleArticleList();
$articleList->sqlLimit = 5;
$articleList->sqlOrderBy = "article.time DESC";
$articleList->readObjects();
$assignVariables['homeArticles'] = $articleList->getObjects();
WCF::getTPL()->assign($assignVariables);
?>
<?php
use news\data\news\ViewableNewsList;
use wcf\system\WCF;
$newsList = new ViewableNewsList();
$newsList->sqlLimit = 5;
$newsList->sqlOrderBy = "news.time DESC";
$newsList->readObjects();
$assignVariables['homeNews'] = $newsList->getObjects();
WCF::getTPL()->assign($assignVariables);
?>
Display More
HTML
<style>
.row {
display: flex;
flex-wrap: wrap;
margin-left: 0px;
margin-right: 0px;
}
.homeList > li {
padding: 2px 5px 5px 5px;
}
.boxhomeList {
background: rgb(255, 255, 255) none repeat scroll 0 0;
box-shadow: 0 0 5px 0 rgb(136, 136, 136);
}
.icon.icon32 {
margin: 0 5px 0 0;
color: rgb(0, 0, 0);
}
.boxHomeTitle {
border-bottom: 1px solid rgb(224, 224, 224);
padding: 5px 5px 5px 10px;
margin-bottom: 3px;
background: rgb(27, 161, 226);
color: rgb(255, 255, 255);
font-size: 14px;
font-weight: bolder;
}
.HomeSeparator {
background: rgb(224, 224, 224) none repeat scroll 0 0;
border: 0 none;
height: 1px;
margin: 5px auto;
width: 50%;
}
.HomeFooter {
text-align: center;
}
.box[data-box-identifier="com.woltlab.wcf.genericBox37"] {
background: #f5f5f5;
}
.main {
background: #f5f5f5;
padding: 0px;
}
</style>
<br />
<div class="boxContent" style="padding-left: 60px;padding-right: 60px;">
<div class="row">
<div class="col-xs-12 col-md-4">
<section class="boxhomeList">
<h2 class="boxHomeTitle"> <span class="icon icon32 fa-comments-o"></span>Aktuelle Themen</h2>
<div class="boxContent">
<ul class="homeList">
{foreach from=$homeThreads item=thread}
<li data-object-id="{$thread->threadID}">
<a href="{$thread->getLink()}" class="box48" data-user-id="{$thread->getUserProfile()->userID}">
<div>
<small>
<ul class="inlineList dotSeparated">
<li>{@$thread->lastPostTime|time}</li>
<li>{$thread->getUserProfile()->username}</li>
</ul>
</small>
<h3>{$thread->getTitle()}</h3>
<hr class="HomeSeparator">
</div>
</a>
</li>
{/foreach}
<p class="HomeFooter">Weitere <a href="/forum/">Themen</a> lesen!</p>
</ul>
</div>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="boxhomeList">
<h2 class="boxHomeTitle"> <span class="icon icon32 fa-book"></span>Aktuelle Artikel</h2>
<ul class="homeList">
{foreach from=$homeArticles item=article}
<li data-object-id="{$article->articleID}">
<a href="{$article->getLink()}" class="box48" data-user-id="{$article->getUserProfile()->userID}">
<div>
<small>
<ul class="inlineList dotSeparated">
<li>{@$article->time|time}</li>
<li>{$article->getUserProfile()->username}</li>
</ul>
</small>
<h3>{$article->getTitle()}</h3>
<hr class="HomeSeparator">
</div>
</a>
</li>
{/foreach}
<p class="HomeFooter">Weitere <a href="/article-list/">Artikel</a> lesen!</p>
</ul>
</section>
</div>
<div class="col-xs-12 col-md-4">
<section class="boxhomeList">
<h2 class="boxHomeTitle"> <span class="icon icon32 fa-newspaper-o"></span>Aktuelle News</h2>
<ul class="homeList">
{foreach from=$homeNews item=news}
<li data-object-id="{$news->newsID}">
<a href="{$news->getLink()}" class="box48" data-user-id="{$news->getUserProfile()->userID}">
<div>
<small>
<ul class="inlineList dotSeparated">
<li>{@$news->time|time}</li>
<li>{$news->getUserProfile()->username}</li>
</ul>
</small>
<h3>{$news->getTitle()}</h3>
<hr class="HomeSeparator">
</div>
</a>
</li>
{/foreach}
<p class="HomeFooter">Weitere <a href="/news/">News</a> lesen!</p>
</ul>
</section><br /><br />
</div>
</div>
</div>
Display More