my last news module working good but the category not appear in the links ex : http://www.shiftwap.com/0/95662-christmas-cupid-2010-dvdrip-xvid-rosub.html Im using the Datalife Engine script 9.2, can someone help me fix this issue? <?php /* ===================================================== ?î??ëü ?ë? DataLife Engine - by BDSoft ----------------------------------------------------- email: bdsoft@mail.com site: www.myws.ru ----------------------------------------------------- Copyright (c) 2007 bdsoft ===================================================== ?à ??ûé êî? çà ùèù?? à â?î??êè?è ï?à âà ?è ===================================================== ?à éë: lastnews.php ----------------------------------------------------- ?à ç?à ÷??è?: ?î?ë???è? ?îâî??è v 2.1 ===================================================== */ if(!defined('DATALIFEENGINE')) { die("Hacking attempt!"); } /*=========================================== ????????? =============================================*/ $lastnewsconf['news'] = 200; // ?ëè?à ?îâî??è $lastnewsconf['link'] = 30; // ????çà ?è? ?è?ëà ?îâî???é $lastnewsconf['limit'] = 30; // ?îëè÷???âî ?îâî???é $lastnewsconf['hide_html'] = true;// ????à ?ü â?? ???è èç ??ê??à ?îâî??è (true - ?à , false - ???) $lastnewsconf['only_hide_main'] = false;// ?îêà çûâà ?ü ?îëüêî ?îâî??è ?? îï??ëèêîâà ?û? ?à ?ëà â?îé (true - ?à , false - ???) $lastnewsconf['category'] = '1,2,3,4,5,6,7,8,9'; // ?îêà çûâà ?ü êà ???î?èè, ï???÷è?ëè?? ID êà ???î?èé ÷???ç çà ï???? ??ç ï?î??ëîâ. ??ëè ????î ïîêà çâà ?ü â?? î??à â?? ïîë? ï???û? $lastnews = dle_cache("lastnews", $config['skin']); if (!$lastnews) { //include(ENGINE_DIR.'/inc/parse.class.php'); //$parse = new ParseFilter(Array(), Array()); if ($lastnewsconf['only_hide_main']) $ln_allow_main = 'and allow_main=0'; else $ln_allow_main = ''; if ($lastnewsconf['category']) $ln_category = 'and category = '. str_replace(',',' or ', $lastnewsconf['category']); else $ln_category = ''; $tpl->load_template('lastnews.tpl'); $db->query("SELECT id, title, short_story , date, alt_name FROM ". PREFIX . "_post WHERE approve='1' $ln_allow_main $ln_category ORDER BY date DESC LIMIT 0,{$lastnewsconf['limit']}"); while($row = $db->get_row()){ $row['date'] = strtotime($row['date']); if (strlen($row['title']) > $lastnewsconf['link']) $title = substr ($row['title'], 0, $lastnewsconf['link'])." .."; else $title = $row['title']; //$row['short_story'] = preg_replace("/\[attachment=[[:digit:]]*\]/si","",stripslashes($parse->BB_Parse($parse->process($row['short_story'])))); $row['short_story'] = preg_replace("/\[attachment=[[:digit:]]*\]/si","",stripslashes($row['short_story'])); $row['short_story'] = preg_replace("/<!--*-->/si","",$row['short_story']); if($lastnewsconf['hide_html'])$row['short_story'] = strip_tags($row['short_story']); if (strlen($row['short_story']) > $lastnewsconf['news']) $short_story = substr ($row['short_story'], 0, $lastnewsconf['news'])." ..."; else $short_story = $row['short_story']; $go_page = ($config['ajax']) ? "onclick=\"DlePage('newsid=".$row['id']."'); return false;\" " : ""; if ($config['allow_alt_url'] == "yes") $tpl->set_block("'\[full-link\](.*?)\[/full-link\]'si", "<a {$go_page}href=\"".$config['http_home_url'].$row['category'] = intval( $row['category'] )."/".$row['id']."-".$row['alt_name'].".html\">\\1</a>"); else $tpl->set_block("'\[full-link\](.*?)\[/full-link\]'si", "<a {$go_page}href=\"$PHP_SELF?newsid=".$row['id']."\">\\1</a>"); $tpl->set('{title}', stripslashes($title)); $tpl->set('{short_news}', $short_story); $tpl->compile('lastnews'); } $lastnews = $tpl->result['lastnews']; } ?> PHP:
I think your issue in one how to set your SEO url in your Admin CP, if you set your site seo to type 2, then your link should include the category in url but if you set it to type 1 which I think what you are setting on your site right now...so try to change the seo type to type 2, should work fine on your module