* added news ticker for kathrine template

* (internal) moved news tickers to twig template
* (internal) moved Forum class to separate file
* (internal) moved deprecated functions to compat.php
This commit is contained in:
slawkens
2017-10-25 09:50:12 +02:00
parent 21b1383c9a
commit 5e414ebda8
12 changed files with 463 additions and 432 deletions

View File

@@ -123,7 +123,7 @@ defined('MYAAC') or die('Direct access not allowed!');
</table>
<hr noshade="noshade" size="1" />
<div class="Content"><div id="ContentHelper">
<?php echo template_place_holder('center_top') . $content; ?>
<?php echo tickers() . template_place_holder('center_top') . $content; ?>
</div></div>
</div>
</div>

View File

@@ -304,7 +304,7 @@ foreach($config['menu_categories'] as $id => $cat) { ?>
<div id="ContentColumn">
<div class="Content">
<div id="ContentHelper">
<?php echo news_place(); ?>
<?php echo tickers(); ?>
<div id="<?php echo PAGE; ?>" class="Box">

View File

@@ -0,0 +1,46 @@
<div id="newsticker" class="Box">
<div class="Corner-tl" style="background-image: url({{ template_path }}/images/content/corner-tl.gif);"></div>
<div class="Corner-tr" style="background-image: url({{ template_path }}/images/content/corner-tr.gif);"></div>
<div class="Border_1" style="background-image: url({{ template_path }}/images/content/border-1.gif);"></div>
<div class="BorderTitleText" style="background-image: url({{ template_path }}/images/content/title-background-green.gif);"></div>
<img class="Title" src="{{ template_path }}/images/header/headline-newsticker.gif" alt="Contentbox headline">
<div class="Border_2">
<div class="Border_3">
<div class="BoxContent" style="background-image: url({{ template_path }}/images/content/scroll.gif);">
{% set i = 0 %}
{% for ticker in tickers %}
<div id="TickerEntry-{{ i }}" class="Row" onclick='TickerAction("TickerEntry-{{ i }}")'>
<div class="{% if (i / 2) matches '/^\\d+$/' %}Odd{% else %}Even{% endif %}">
<div class="NewsTickerIcon" style="background-image: url({{ template_path }}/images/news/icon_{{ ticker.icon }}_small.gif);"></div>
<div id="TickerEntry-{{ i }}-Button" class="NewsTickerExtend" style="background-image: url({{ template_path }}/images/general/plus.gif);"></div>
<div class="NewsTickerText">
<span class="NewsTickerDate">{{ ticker.date|date("j M Y") }} -</span>
<div id="TickerEntry-{{ i }}-ShortText" class="NewsTickerShortText">{{ ticker.body_short|raw }}</div>
<div id="TickerEntry-{{ i }}-FullText" class="NewsTickerFullText">{{ ticker.body|raw }}
{% if canEdit %}
<a href="?subtopic=news&action=edit&id={{ ticker.id }}" title="Edit">
<img src="images/edit.png"/>
Edit
</a>
<a id="delete" href="?subtopic=news&action=delete&id={{ ticker.id }}" onclick="return confirm('Are you sure?');" title="Delete">
<img src="images/del.png"/>
Delete
</a>
<a href="?subtopic=news&action=hide&id={{ ticker.id }}" title="{% if ticker.hidden != 1 %}Hide{% else %}Show{% endif %}">
<img src="images/{% if ticker.hidden != 1 %}success{% else %}error{% endif %}.png"/>
{% if ticker.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
{% endif %}
</div>
</div>
</div>
</div>
{% set i = i + 1 %}
{% endfor %}
</div>
</div>
</div>
<div class="Border_1" style="background-image: url({{ template_path }}/images/content/border-1.gif);"></div>
<div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url({{ template_path }}/images/content/corner-bl.gif);"></div></div>
<div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url({{ template_path }}/images/content/corner-br.gif);"></div></div>
</div>