<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2005 Nick Jones
| <a href=\"http://www.php-fusion.co.uk/\" target=\"_blank\">http://www.php-fusion.co.uk/</a>
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit <a href=\"http://gnu.org\" target=\"_blank\">http://gnu.org</a>
+----------------------------------------------------+
+----------------------------------------------------+
| News Ticker Script by Matonor
| Infusion Code by MrX2003
| v 1.02 fix by Matonor
+---------------------------------------------------*/
if (file_exists(INFUSIONS
."news_ticker_panel/locale/".$settings['locale'].".php")) { include INFUSIONS."news_ticker_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."news_ticker_panel/locale/English.php";
}
@opentable($locale['NTIC_001']);
//settings
//0 = no, 1= yes
//show author?
$ticker_author = "0";
//show date?
$ticker_date = "0";
//show commentcount?
$ticker_comments = "0";
//show readcounts?
$ticker_reads = "0";
//the higher the value the slower, default is 100
$ticker_speed = "100";
//ticker width? (use either % or px values)
$ticker_width = "100%";
$tickerquery = dbquery("SELECT tn.*, tu.user_id,user_name ,COUNT(comment_item_id) AS news_comments
FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
LEFT JOIN ".$db_prefix."comments ON news_id=comment_item_id AND comment_type='N'
GROUP BY news_id
ORDER BY news_datestamp DESC LIMIT 0,10");
while($data < 5) {
$ticker_content .= "<span style='font-weight:bold;'><a href=\"".BASEDIR."news.php?readmore=".$data['news_id']."\">".$data['news_subject']."</a></span> ";
if($ticker_author+$ticker_date+$ticker_comments+$ticker_reads != "0" ) {
$ticker_content .= "[";
if($ticker_author == "1") {
$ticker_content .= $locale['040'].$data[user_name];
if($ticker_date+$ticker_comments+$ticker_reads != "0"){
$ticker_content .= " | ";
}
}
if($ticker_date == "1") {
$ticker_content .= showdate("shortdate", $data['news_datestamp']);
if($ticker_comments+$ticker_reads != "0"){
$ticker_content .= " | ";
}
}
if($ticker_comments == "1") {
$ticker_content .= $data['news_comments'] .$locale['043'];
if($ticker_reads != "0"){
$ticker_content .= " | ";
}
}
if($ticker_reads == "1") {
$ticker_content .= $data['news_reads'] .$locale['044'];
}
$ticker_content .= "]";
}
$ticker_content .= " | ";
}
@closetable();
?>