slawkens1 a177c93e97 Some big update
* added option to change character name in accountmanagement
* added automatic database updater (data migrations)
* renamed events to hooks
* moved hooks to database
* now you can use hooks in plugins
* set account.type field to 5, if TFS 1.0+
* added example plugin
* new, latest google analytics code
* fixed bug with loading account.name that has numbers in it
* fixed many bugs in player editor in admin panel
* added error handling to plugin manager and some more verification in
file has been correctly unpacked/uploaded
* fixed Statistics page in admin panel when using account.number
* fixed bug when creating/recovering account on servers with
account.salt field (TFS 0.3 for example)
* fixed forum showing thread with html tags (added from news manager)
* new, actual code for youtube videos in movies
* fixed showing vocation images when using
$config['online_vocations_images']
* many fixes in polls (also importing proper schema)
* fixed hovering on buttons in kathrine template (on accountmanagement
page)
* many fixes in signatures
* added missing gesior signature system
2017-05-11 04:13:16 +02:00

43 lines
1.4 KiB
PHP

<?php
defined('MYAAC') or die('Direct access not allowed!');
function news_parse($title, $content, $date, $icon = 0, $author = '', $comments = '')
{
global $template_path;
$firstLetter = '';
if($content[0] != '<')
{
$tmp = $template_path.'/images/letters/'.$content[0].'.gif';
if(file_exists($tmp)) {
$firstLetter = '<img src="' . $tmp . '" alt="'.$content[0].'" BORDER=0 ALIGN=bottom>';
$content = substr($content, 1);
}
}
return '
<div id="News">
<div class="NewsHeadline">
<div class="NewsHeadlineBackground" style="background-image:url(' . $template_path . '/images/news/newsheadline_background.gif)">
<img src="' . $template_path . '/images/news/icon_' . $icon . '.gif" class=\'NewsHeadlineIcon\' />
<div class="NewsHeadlineDate">' . date("j.n.Y", $date) . ' - </div>
<div class="NewsHeadlineText">' . stripslashes($title) . '</div>
' . (isset($author[0]) ? '
<div class="NewsHeadlineAuthor"><b>Author: </b><i>' . $author . '</i></div>' : '') . '
</div>
</div>
</div>
<table style="clear:both" border=0 cellpadding=0 cellspacing=0 width="100%" >
<tr>
<td style="padding-left:10px;padding-right:10px;" >' . $firstLetter.$content . '</td>
</tr>'
. (isset($comments[0]) ? '
<tr>
<td>
<div style="text-align: right; margin-right: 10px;"><a href="' . $comments . '">» Comment on this news</a></div>
</td>
</tr>' : '') .
'</table><br/>';
}
?>