prepare(); $newsquery = dbquery("SELECT nid, author, title, story, time as date, comments FROM ".TABLEPREFIX."fanfiction_news ORDER BY time DESC LIMIT $numupdated"); $count = 0; while($stories = dbassoc($newsquery)) { //create a new number_row block $news->newBlock("newsbox"); //assign values if(!empty($blocks['news']['sumlength']) && isNumber($blocks['news']['sumlength'])) $newsStory = truncate_text($stories['story'], $blocks['news']['sumlength'])."
"; else $newsStory = format_story($stories['story']); $news->assign("newstitle" , $stories['title'] ); $news->assign("newsstory" , $newsStory); $news->assign("newsauthor", $stories['author'] ); $news->assign("newsdate", date("$dateformat $timeformat", $stories['date']) ); $news->assign("oddeven", ($count % 2 ? "even" : "odd")); $news->assign("newsid", $stories['nid']); $news->assign("skindir", $skindir); if($newscomments) $news->assign("newscomments", "".$stories['comments']." "._COMMENTS.""); if(isADMIN) $news->assign("adminoptions", ""._EDIT." | "._DELETE.""); $count++; } $news->gotoBlock("_ROOT"); $content = $news->getOutputContent( ); ?>