retrieve("nq_othernews2")) { echo $cacheData; return; } require_once(e_HANDLER."news_class.php"); unset($text); global $OTHERNEWS2_STYLE; $ix = new news; if(!$OTHERNEWS2_STYLE) { $OTHERNEWS2_STYLE = "
{NEWSCATICON} {NEWSCATEGORY}
{NEWSTITLELINK}
{NEWSSUMMARY}
{NEWSTHUMBNAIL}
"; } if(!defined("OTHERNEWS2_LIMIT")){ // define("OTHERNEWS2_LIMIT",5); } if(!defined("OTHERNEWS2_ITEMLINK")){ // define("OTHERNEWS2_ITEMLINK",""); } if(!defined("OTHERNEWS2_CATLINK")){ // define("OTHERNEWS2_CATLINK",""); } if(!defined("OTHERNEWS2_CATICON")){ define("OTHERNEWS2_CATICON","border:0px"); } if(!defined("OTHERNEWS2_THUMB")){ define("OTHERNEWS2_THUMB","border:0px"); } if(!defined("OTHERNEWS2_COLS")){ // define("OTHERNEWS2_COLS","1"); } if(!defined("OTHERNEWS2_CELL")){ // define("OTHERNEWS2_CELL",""); } if(!defined("OTHERNEWS2_SPACING")){ // define("OTHERNEWS2_SPACING","0"); } $param['itemlink'] = defset('OTHERNEWS2_ITEMLINK',''); $param['thumbnail'] = OTHERNEWS2_THUMB; $param['catlink'] = defset('OTHERNEWS2_CATLINK',''); $param['caticon'] = OTHERNEWS2_CATICON; $style = defset('OTHERNEWS2_CELL','padding:0px;vertical-align:top'); $nbr_cols = defset('OTHERNEWS2_COLS', 1); $query = "SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon FROM #news AS n LEFT JOIN #user AS u ON n.news_author = u.user_id LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().") AND FIND_IN_SET(3, n.news_render_type) ORDER BY n.news_datestamp DESC LIMIT 0,". defset('OTHERNEWS2_LIMIT',5); if ($sql->db_Select_gen($query)) { $text = ""; if(OTHERNEWS2_COLS !== false) { $text = ""; $t = 0; $wid = floor(100/$nbr_cols); while ($row = $sql->db_Fetch()) { $text .= ($t % $nbr_cols == 0) ? "" : ""; $text .= "\n\n"; if (($t+1) % $nbr_cols == 0) { $text .= ""; $t++; } else { $t++; } } while ($t % $nbr_cols != 0) { $text .= "\n"; $text .= (($t+1) % $nbr_cols == 0) ? "" : ""; $t++; } $text .= "
\n"; $text .= $ix->render_newsitem($row, 'return', '', $OTHERNEWS2_STYLE, $param); $text .= "\n
 
"; } else // perfect for divs. { while ($row = $sql->db_Fetch()) { $text .= $ix->render_newsitem($row, 'return', '', $OTHERNEWS2_STYLE, $param); } } // Save Data ob_start(); $ns->tablerender(TD_MENU_L2, $text, 'other_news2'); $cache_data = ob_get_flush(); $e107cache->set("nq_othernews2", $cache_data); } ?>