//Render News
function render_news($subject, $news, $info) {
global $locale, $settings, $aidlink;
$parameter= $settings['siteurl']."news.php?readmore=".$info['news_id'];
$title= $settings['sitename'].$locale['global_200'].$locale['global_077'].$locale['global_201'].$info['news_subject']."".$locale['global_200'];
$breaking_news = 56600; //Breaking News Time (1 Hour/60 Mins/3600 Seconds)
if (!isset($_GET['readmore'])) {
opentable("<span class='' onclick=\"location='".BASEDIR."news.php?readmore=".$info['news_id']."'\" style='cursor:pointer;'>".$subject, "</span> ".(time()-$info['news_date'] < $breaking_news ? " <img class='breaking-news' src='".get_image("new")."' title='".$locale['theme_039c']."' alt='".$locale['theme_039c']."'/>" :
($info['news_sticky'] == 1 ? "<img class='sticky-news' src='".get_image("sticky")."' title='".$locale['theme_038b']."' alt='".$locale['theme_038b']."'/>" : "")));
}else{
opentable($subject.(time()-$info['news_date'] < $breaking_news ? " <img class='breaking-news' src='".get_image("new")."' title='New News Item' alt='New News Item'/>" :
($info['news_sticky'] == 1 ? "<img class='sticky-news' src='".get_image("sticky")."' title='Sticky News Item' alt='Sticky News Item'/>" : "")));
}
echo "<div class='flright clearfix'>\n
<a href='".BASEDIR."print.php?type=N&item_id=".$info['news_id']."'><img src='".get_image("printer")."' title='Print' alt='printer' /></a>\n";
if (iADMIN && checkrights("N")) {
echo " <a href='".ADMIN."news.php".$aidlink."&action=edit&news_id=".$info['news_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' border='0' /></a>\n";
}
echo "</div>\n";
echo "<ul class='item-info news-info'>\n";
//Author
echo "<li class='author'>".profile_link($info['user_id'], $info['user_name'], $info['user_status'])."</li>\n";
//Date
echo "<li class='dated'>".showdate("newsdate", $info['news_date'])."</li>\n";
//Category
echo "<li class='cat'>\n";
if ($info['cat_id']) {
echo "<a href='".BASEDIR."news_cats.php?cat_id=".$info['cat_id']."'>".$info['cat_name']."</a>\n";
} else {
echo "<a href='".BASEDIR."news_cats.php?cat_id=0'>".$locale['global_080']."</a>";
}
echo "</li>\n";
//Reads
if ($info['news_ext'] == "y" || ($info['news_allow_comments'] && $settings['comments_enabled'] == "1")) {
echo "<li class='reads'>\n";
echo $info['news_reads'].$locale['global_074'];
echo "</li>\n";}
//Comments
if ($info['news_allow_comments'] && $settings['comments_enabled'] == "1") { echo "<li class='comments'><a ".(isset($_GET['readmore']) ? "class='scroll'" : "")." href='".BASEDIR."news.php?readmore=".$info['news_id']."#comments'>".$info['news_comments']."".($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a></li>\n"; }
echo "</ul>\n";
//The message
echo "<div class=''>".$info['cat_image'].$news."</div>\n";
//Read more button
if (!isset($_GET['readmore']) && $info['news_ext'] == "y") {
echo "<div class='readmore flright'><a href='".BASEDIR."news.php?readmore=".$info['news_id']."' class='news-button'>".$locale['global_072']."..</a></div>\n";
}
echo "<!--news_id-".$info['news_id']."_end-->";
closetable();
}
.maincap { clear: both; font-size: 18px; font-weight: bold; line-height: 25px; padding: 0;
text-transform: none; color : #161616; margin: -7px 5px 5px 4px;}
.maincap:hover {color : #de7037;}
/* Links */
a { color :#de7037; text-decoration: none; font-weight: none; transition: color 0.2s linear 0s; }
a:active, a:focus, a:active.side, a:hover { color :#000; text-decoration: none;}
// Title as link to extended news
$subject = preg_replace("/<a name='news_([0-9]+)' id='news_([0-9]+)'><\/a>/i", '', $subject);
if (!isset($_GET['readmore'])) {
$subject = "<a href='".BASEDIR."news.php?readmore=".$info['news_id']."'>".$subject."</a>";
}
/<a name=
.maincap .options { overflow: hidden; float: right; height: 18px; padding-top: 4px;}
.maincap .print, .maincap .edit { float: left;}
.news-category { padding: 4px; background: none; float: left; margin: 0.2em 0.5em 0 0;}
.panel { font: 11.5px/1.4em "Ubuntu",Helvetica,Arial,sans-serif; color: #666666; background-color: #f8f8f8; display: block; vertical-align: top; padding: 6px 6px 6px 6px; margin-top: 2px; border: 1px solid #e6e7e9; box-shadow: 0 3px 0 0 rgba(135, 135, 135, 0.1); box-sizing: border-box; }
.panelcap, .maincap { margin: 0px 5px 5px 4px; }
h2.panelcap { position: relative; color: #000; font-size: 18px; font-weight: 700; line-height: 1.2; margin-bottom: 10px;
min-height: 18px; /* IE7 */ padding: 2px 5px 0px 5px;}
.maincap { clear: both; font-size: 18px; font-weight: bold; line-height: 25px; padding: 0;
text-transform: none; color : #161616; margin: 2px 5px 5px 5px;}
.maincap:hover {color : #2779c5;}
.panelbody { background: #f2f2f2; z-index: 1000; }
.contentbody { padding: 4px 6px 10px; margin-bottom: 15px; z-index: 1000;}
.post .contentbody,.article .contentbody {font:13px/1.4em "Ubuntu",Helvetica,Arial,sans-serif; color: #777; display: block; vertical-align: top; padding: 6px 6px 6px 2px;}
#container .panel, .post, .article { overflow: hidden; background: none; border: 0 none; box-shadow: none; }
.panelcap,.sides .panel, #navigation h2, .side-label { overflow: visible; /* IE7 */ zoom: 1; /* IE7 */ position: relative; }
.maincap a { color: red }
.maincap a:hover { color: blue }
$subject = preg_replace("/<a name='news_([0-9]+)' id='news_([0-9]+)'><\/a>/i", '', $subject);
Category Forum
General DiscussionLabels
None yet
Statistics
11 participants
Notifications
You are not receiving notifications from this thread.
Related Questions