创建一个Newsticker

时间:2016-07-23 12:00:45

标签: php ipb invision-power-board

我正在使用IPboard 4并且正在尝试创建一个newsticker。 目前它看起来像这样:

What it looks like

但是,它看起来应该是这样的:

What it should look like

问题是我在ipb上找不到关于如何编辑输出的任何材料。 基本上我想要实现的是文章的标题显示注释的数量和发布的日期以及文章按工作日分组。

当前的模板代码如下所示:

 {{if !empty( $topics ) }}
    <h3 class='ipsWidget_title ipsType_reset'>{$title}</h3>

    {{if $orientation == 'vertical'}}
        <div class='ipsPad_half ipsWidget_inner'>
            <ul class='ipsDataList ipsDataList_reducedSpacing'>
                {{foreach $topics as $topic}}
                    <li class='ipsDataItem{{if $topic->unread()}} ipsDataItem_unread{{endif}}{{if $topic->hidden()}} ipsModerated{{endif}}'>
                        <div class='ipsDataItem_icon ipsPos_top'>
                            {template="userPhoto" group="global" app="core" params="$topic->author(), 'tiny'"}
                        </div>
                        <div class='ipsDataItem_main'>
                            <div class="ipsCommentCount ipsPos_right {{if ( $topic->posts - 1 ) === 0}}ipsFaded{{endif}}" data-ipsTooltip title='{lang="replies_number" pluralize="$topic->posts - 1"}'>{expression="$topic->posts - 1"}</div>
                            {{if $topic->mapped('featured') || $topic->hidden() === -1 || $topic->hidden() === 1}}
                                <span>
                                    {{if $topic->hidden() === -1}}
                                        <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$topic->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
                                    {{elseif $topic->hidden() === 1}}
                                        <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
                                    {{endif}}
                                    {{if $topic->mapped('featured')}}
                                        <span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
                                    {{endif}}
                                </span>
                            {{endif}}
                            <a href="{$topic->url()->setQueryString( 'do', 'getNewComment' )}" title='{lang="view_this_topic" sprintf="$topic->title"}' class='ipsDataItem_title ipsType_break'>{wordbreak="$topic->title"}</a>
                            <br>
                            <p class='ipsType_reset ipsType_medium ipsType_blendLinks'>
                                <!-- span>{lang="byline_nodate" htmlsprintf="$topic->author()->link()"}</span><br -->
                                <span class='ipsType_light'>{lang="topic_started_date" htmlsprintf="\IPS\DateTime::ts( $topic->mapped('date') )->html()"}</span>
                            </p>
                        </div>
                    </li>
                {{endforeach}}
            </ul>
        </div>
    {{else}}
        <div class='ipsWidget_inner'>
            <ul class='ipsDataList'>
                {{foreach $topics as $topic}}
                    {template="row" group="global" app="forums" location="front" params="NULL, NULL, $topic, FALSE"}
                {{endforeach}}
            </ul>
        </div>
    {{endif}}
{{endif}}

非常感谢任何帮助。

0 个答案:

没有答案