if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
class RssfitXnews{
var $dirname = 'xnews';
var $modname;
var $grab;
function RssfitXnews(){
}
function loadModule(){
$mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
if( !$mod || !$mod->getVar('isactive') ){
return false;
}
$this->modname = $mod->getVar('name');
$this->module =& $mod;
return $mod;
}
function &grabEntries(&$obj){
$ret = false;
@include_once XOOPS_ROOT_PATH.'/modules/xnews/class/class.newsstory.php';
$myts =& MyTextSanitizer::getInstance();
if( $this->module->getVar('version') >= 130 ){
@include_once XOOPS_ROOT_PATH.'/modules/xnews/include/functions.php';
$news = nw_NewsStory::getAllPublished($this->grab, 0, nw_getmoduleoption('restrictindex'));
}else{
$news = nw_NewsStory::getAllPublished($this->grab, 0);
}
if( count($news) > 0 ){
for( $i=0; $i<count($news); $i++ ){
$ret[$i]['title'] = $myts->undoHtmlSpecialChars($news[$i]->title());
$ret[$i]['link'] = XOOPS_URL.'/modules/xnews/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['guid'] = XOOPS_URL.'/modules/xnews/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['timestamp'] = $news[$i]->published();
$desc = $news[$i]->hometext();
$ret[$i]['description'] = $news[$i]->hometext();
$ret[$i]['category'] = $this->modname;
$ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
}
}
return $ret;
}
}
?>
function b_sitemap_xnews(){
$xoopsDB =& Database::getInstance();
// xnews
$block = sitemap_get_categoires_map($xoopsDB->prefix("[b][color=006600]nw_topics[/color][/b]"), "topic_id", "topic_pid", "topic_title", "index.php?storytopic=", "topic_title");
return $block;
}
?>
function b_waiting_xnews(){
$xoopsDB =& Database::getInstance();
$block = array();
// news
$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("[b][color=006600]nw_stories[/color][/b]")." WHERE published=0");
if ( $result ) {
$block['adminlink'] = XOOPS_URL."/modules/xnews/admin/index.php?op=newarticle" ;
list($block['pendingnum']) = $xoopsDB->fetchRow($result);
$block['lang_linkname'] = _PI_WAITING_SUBMITTED ;
}
return $block;
}
?>
@include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
@include_once XOOPS_ROOT_PATH.'/modules/yourmodulefoldername/class/class.newsstory.php';
@include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
@include_once XOOPS_ROOT_PATH.'/modules/yourmodulefoldername/include/functions.php';
$news = NewsStory::getAllPublished($this->grab, 0, news_getmoduleoption('restrictindex'));
$news = nw_NewsStory::getAllPublished($this->grab, 0, nw_getmoduleoption('restrictindex'));
$news = NewsStory::getAllPublished($this->grab, 0);
$news = nw_NewsStory::getAllPublished($this->grab, 0);
$ret[$i]['link'] = XOOPS_URL.'/modules/news/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['guid'] = XOOPS_URL.'/modules/news/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['link'] = XOOPS_URL.'/modules/yourmodulefoldername/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['guid'] = XOOPS_URL.'/modules/yourmodulefoldername/article.php?storyid='.$news[$i]->storyid();
if( !defined('RSSFIT_ROOT_PATH') ){ exit(); }
class RssfitNews{
var $dirname = 'news';
var $modname;
var $grab;
function RssfitNews(){
}
function loadModule(){
$mod =& $GLOBALS['module_handler']->getByDirname($this->dirname);
if( !$mod || !$mod->getVar('isactive') ){
return false;
}
$this->modname = $mod->getVar('name');
$this->module =& $mod;
return $mod;
}
function &grabEntries(&$obj){
$ret = false;
@include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
$myts =& MyTextSanitizer::getInstance();
if( $this->module->getVar('version') >= 130 ){
@include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
$news = NewsStory::getAllPublished($this->grab, 0, news_getmoduleoption('restrictindex'));
}else{
$news = NewsStory::getAllPublished($this->grab, 0);
}
if( count($news) > 0 ){
for( $i=0; $i<count($news); $i++ ){
$ret[$i]['title'] = $myts->undoHtmlSpecialChars($news[$i]->title());
$ret[$i]['link'] = XOOPS_URL.'/modules/news/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['guid'] = XOOPS_URL.'/modules/news/article.php?storyid='.$news[$i]->storyid();
$ret[$i]['timestamp'] = $news[$i]->published();
$desc = $news[$i]->hometext();
$ret[$i]['description'] = $news[$i]->hometext();
$ret[$i]['category'] = $this->modname;
$ret[$i]['domain'] = XOOPS_URL.'/modules/'.$this->dirname.'/';
}
}
return $ret;
}
}
?>
<div style="padding: 3px; margin-right:3px;"><{include file="db:nw2_news_item.html" story=$story}>div>
script>
<{if $display_images == 1 && $images_count > 0}>
//DNPROSSI - Added for adobe detection * does not work in msie
$browser = $_SERVER['HTTP_USER_AGENT'];
//'msie', 'firefox', 'safari', 'webkit', 'opera', 'netscape', 'konqueror', 'gecko'
if ( !preg_match("/msie[^;]*/i", $browser) ) {
$has_adobe = nw2_detect_adobe();
} else { $has_adobe = 1; }