* added featured article to tibiacom template (you can add them with add news button)

* added networks (facebook and twitter) and highscores (top 5) boxes to tibiacom template, configurable in templates/tibiacom/config.php
* fixed polls box in tibiacom template
* (internal) moved tibiacom boxes to separate directory
* (internal) renamed constant TICKET -> TICKER
This commit is contained in:
slawkens
2017-10-26 15:35:22 +02:00
parent 5e414ebda8
commit 583f3394fc
29 changed files with 795 additions and 121 deletions

View File

@@ -1,7 +1,7 @@
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
selector : "textarea",
selector : "#body",
theme : "modern",
plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
@@ -31,21 +31,37 @@
{% set rows = rows + 1 %}
<tr bgcolor="{{ getStyle(rows) }}">
<!--td>Description:</td-->
<td colspan="2"><textarea name="body" maxlength="{{ constant('BODY_LIMIT') }}" class="tinymce">{{ body }}</textarea></td>
<td colspan="2"><textarea name="body" id="body" maxlength="{{ constant('BODY_LIMIT') }}" class="tinymce">{{ body }}</textarea></td>
<tr/>
{% set rows = rows + 1 %}
<tr bgcolor="{{ getStyle(rows) }}">
<td><b>Type:</b></td>
<td>
<select name="type">
<select name="type" id="select-type"{% if action == 'edit' %} disabled{% endif %}>
<option value="{{ constant('NEWS') }}" {% if type is defined and type == constant('NEWS') %}selected="yes"{% endif %}>News</option>
<option value="{{ constant('TICKET') }}" {% if type is defined and type == constant('TICKET') %}selected="yes"{% endif %}>Ticket</option>
<!--option value="{{ constant('ARTICLE') }}">Article</option-->
<option value="{{ constant('TICKER') }}" {% if type is defined and type == constant('TICKER') %}selected="yes"{% endif %}>Ticket</option>
<option value="{{ constant('ARTICLE') }}" {% if type is defined and type == constant('ARTICLE') %}selected="yes"{% endif %}>Article</option>
</select>
</td>
</tr>
{% set rows = rows + 1 %}
<tr id="article-text" bgcolor="{{ getStyle(rows) }}"{% if article_text is empty %} style="display: none;"{% endif %}>
<td><b>Article short text:<br/>This will be displayed on news page.<br/>Rest will be available on "read more" page.</b></td>
<td>
<textarea name="article_text">{% if article_text is not empty %}{{ article_text }}{% endif %}</textarea>
</td>
</tr>
{% set rows = rows + 1 %}
<tr id="article-image" bgcolor="{{ getStyle(rows) }}"{% if article_image is empty %} style="display: none;"{% endif %}>
<td><b>Article image:</b></td>
<td>
<input type="text" name="article_image" value="{% if article_image is not empty %}{{ article_image }}{% else %}images/news/announcement.jpg{% endif %}" />
</td>
</tr>
{% if action == 'edit' %}
{% set rows = rows + 1 %}
{% if player is defined %}
@@ -115,11 +131,23 @@
<script type="text/javascript">
$(document).ready(function() {
$("#news-edit").hide();
});
$("#news-button").click(function() {
$("#news-edit").toggle();
return false;
$("#news-button").click(function() {
$("#news-edit").toggle();
return false;
});
$('#select-type').change(function() {
var value = $('#select-type').val();
if(value == {{ constant('ARTICLE') }}) {
$('#article-text').show();
$('#article-image').show();
}
else {
$('#article-text').hide();
$('#article-image').hide();
}
});
});
</script>
{% endif %}