Bandit-X.Net  
ID Password
   All Posts (Bandit-X)


(1) 2 3 4 ... 6 »


Usage on Cloneable Modules.
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
Ability to use this module with clones of the news module

Posted on: 2010/3/31 19:09
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: XM-Spotlight 1.02 In The Works.
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
the numbering of the versions got a bit confusing so moving on to 1.04

Posted on: 2009/6/3 18:25
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


XM-Spotlight 1.04 Feature Requests
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
Requests:
* Expiration Of Spotlighted Item (Auto Removal from spotlight position)
* Easier to use Admin UI

Posted on: 2009/6/3 18:25

Edited by Bandit-X on 2009/6/6 18:44:17
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: .05 member function mid() on a non-object
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline

Posted on: 2008/7/22 21:24

Edited by Bandit-X on 2008/10/24 6:02:58
Edited by Bandit-X on 2008/10/24 6:03:11
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: .05 member function mid() on a non-object
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
another solution

create a new class that inherits the NewsStory

//taken from news 1.56 for compatibiliy and object inheritance

class LatestNewsStory extends NewsStory{
	function LatestNewsStory($id=-1){
	    parent::NewsStory($id);
	
	}
		/**
 	* Returns published stories according to some options
 	*/
	function LatestNewsgetAllPublished($limit=0, $start=0, $checkRight=false, $topic=0, $ihome=0, $asobject=true, $order = 'published', $topic_frontpage=false)
	{
		$db =& Database::getInstance();
		$myts =& MyTextSanitizer::getInstance();
		$ret = array();
		$sql = 'SELECT s.*, t.* FROM '.$db->prefix('stories').' s, '. $db->prefix('topics').' t WHERE (s.published > 0 AND s.published <= '.time().') AND (s.expired = 0 OR s.expired > '.time().') AND (s.topicid=t.topic_id) ';
		if ($topic != 0) {
		    if (!is_array($topic)) {
		    	if($checkRight) {
        			$topics = news_MygetItemIds('news_view');
		    		if(!in_array ($topic,$topics)) {
		    			return null;
		    		} else {
		    			$sql .= ' AND s.topicid='.intval($topic).' AND (s.ihome=1 OR s.ihome=0)';
		    		}
		    	} else {
		        	$sql .= ' AND s.topicid='.intval($topic).' AND (s.ihome=1 OR s.ihome=0)';
		        }
		    } else {
				if($checkRight) {
					$topics = news_MygetItemIds('news_view');
		    		$topic = array_intersect($topic,$topics);
		    	}
		    	if(count($topic)>0) {
		        	$sql .= ' AND s.topicid IN ('.implode(',', $topic).')';
		    	} else {
		    		return null;
		    	}
		    }
		} else {
		    if($checkRight) {
		        $topics = news_MygetItemIds('news_view');
		        if(count($topics)>0) {
		        	$topics = implode(',', $topics);
		        	$sql .= ' AND s.topicid IN ('.$topics.')';
		        } else {
		        	return null;
		        }
		    }
			if (intval($ihome) == 0) {
				$sql .= ' AND s.ihome=0';
			}
		}
		if($topic_frontpage) {
			$sql .=' AND t.topic_frontpage=1';
		}
 		$sql .= " ORDER BY s.$order DESC";
		$result = $db->query($sql,intval($limit),intval($start));

		while ( $myrow = $db->fetchArray($result) ) {
			if ($asobject) {
				$ret[] = new LatestNewsStory($myrow);
			} else {
				$ret[$myrow['storyid']] = $myts->htmlSpecialChars($myrow['title']);
			}
		}
		return $ret;
	}
	
	/**
	 * Function used to prepare an article to be showned
	 */
	function latestprepare2show($filescount)
	{
	    include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
	    global $xoopsUser, $xoopsConfig, $xoopsModuleConfig;
	    $myts =& MyTextSanitizer::getInstance();
	    $infotips = news_getmoduleoption('infotips');
	    $story = array();
	    $story['id'] = $this->storyid();
	    $story['poster'] = $this->uname();
	    $story['author_name'] = $this->uname();
	    $story['author_uid'] = $this->uid();
	    if ( $story['poster'] != false ) {
	        $story['poster'] = "<a href='".XOOPS_URL."/userinfo.php?uid=".$this->uid()."'>".$story['poster']."</a>";
	    } else {
			if($xoopsModuleConfig['displayname']!=3) {
				$story['poster'] = $xoopsConfig['anonymous'];
			}
	    }
		if ($xoopsModuleConfig['ratenews']) {
			$story['rating'] = number_format($this->rating(), 2);
			if ($this->votes == 1) {
				$story['votes'] = _NW_ONEVOTE;
			} else {
				$story['votes'] = sprintf(_NW_NUMVOTES,$this->votes);
			}
		}
	    $story['posttimestamp'] = $this->published();
	    $story['posttime'] = formatTimestamp($story['posttimestamp'],news_getmoduleoption('dateformat'));
		$story['topic_description'] = $myts->displayTarea($this->topic_description);

		$auto_summary = '';
		$tmp = '';
		$auto_summary = $this->auto_summary($this->bodytext(),$tmp);

	    $story['text'] = $this->hometext();
		$story['text'] = str_replace('[summary]', $auto_summary, $story['text']);

	    $introcount = strlen($story['text']);
	    $fullcount = strlen($this->bodytext());
	    $totalcount = $introcount + $fullcount;

	    $morelink = '';
	    if ( $fullcount > 1 ) {
	        $morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
	        $morelink .= '">'._NW_READMORE.'</a>';
        	$morelink .= ' | '.sprintf(_NW_BYTESMORE,$totalcount);
	        if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
	            $morelink .= ' | ';
	        }
	    }
	    if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
	        $ccount = $this->comments();
	        $morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
	        $morelink2 = '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
	        if ( $ccount == 0 ) {
	            $morelink .= '">'._NW_COMMENTS.'</a>';
	        } else {
	            if ( $fullcount < 1 ) {
	                if ( $ccount == 1 ) {
	                    $morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">'._NW_ONECOMMENT.'</a>';
	                } else {
	                    $morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">';
	                    $morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
	                    $morelink .= '</a>';
	                }
	            } else {
	                if ( $ccount == 1 ) {
	                    $morelink .= '">'._NW_ONECOMMENT.'</a>';
	                } else {
	                    $morelink .= '">';
	                    $morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
	                    $morelink .= '</a>';
	                }
	            }
	        }
	    }
	    $story['morelink'] = $morelink;
	    $story['adminlink'] = '';

	    $approveprivilege = 0;
	    if($this->latest_news_is_admin_group()) {
	        $approveprivilege = 1;
	    }

	    if($xoopsModuleConfig['authoredit']==1 && (is_object($xoopsUser) && $xoopsUser->getVar('uid')==$this->uid())) {
	    	$approveprivilege = 1;
	    }
	    if ($approveprivilege) {
	        $story['adminlink'] = $this->adminlink();
	    }
	    $story['mail_link'] = 'mailto:?subject='.sprintf(_NW_INTARTICLE,$xoopsConfig['sitename']).'&amp;body='.sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']).':  '.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid();
	    $story['imglink'] = '';
	    $story['align'] = '';
	    if ( $this->topicdisplay() ) {
	        $story['imglink'] = $this->imglink();
	        $story['align'] = $this->topicalign();
	    }
		if($infotips>0) {
			$story['infotips'] = ' title="'.news_make_infotips($this->hometext()).'"';
		} else {
			$story['infotips'] = '';
		}
	    $story['title'] = "<a href='".XOOPS_URL."/modules/news/article.php?storyid=".$this->storyid()."'".$story['infotips'].">".$this->title()."</a>";

	    $story['hits'] = $this->counter();
		if($filescount>0) {
			$story['files_attached']= true;
			$story['attached_link']="<a href='".XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid()."' title='"._NW_ATTACHEDLIB."'><img src='".XOOPS_URL.'/modules/news/images/attach.gif'."' title='"._NW_ATTACHEDLIB."'></a>";
		} else {
			$story['files_attached']= false;
			$story['attached_link']='';
		}
	    return $story;
	}
	
	function latest_news_is_admin_group(){
		global $xoopsUser;
		$module_handler =& xoops_gethandler('module');
		$xoopsModule =& $module_handler->getByDirname('news');
		if(is_object($xoopsUser)) {
			if(in_array('1',$xoopsUser->getGroups())) {
				return true;
			} else {
				if($xoopsUser->isAdmin($xoopsModule->mid())) {
					return true;
				} else {
					return false;
				}
			}
		}else{
			return false;
		}
	}
	
}

Posted on: 2008/7/18 10:26
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


.05 member function mid() on a non-object
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
src:xoops.org news comment

Report: Fatal error: Call to a member function mid() on a non-object in D:\localhost\www\xoops\modules\news\include\functions.php on line 538

Solution (Trabis) Suggests: Fix?

You can hack news/include/functions.php
replace function ate line 531 for this one:
function news_is_admin_group()
{
	global $xoopsUser;
	$module_handler =& xoops_gethandler('module');
    $xoopsModule =& $module_handler->getByDirname('news');
	if(is_object($xoopsUser)) {
		if(in_array('1',$xoopsUser->getGroups())) {
			return true;
		} else {
			if($xoopsUser->isAdmin($xoopsModule->mid())) {
				return true;
			} else {
				return false;
			}
		}
	} else {
		return false;
	}
}

Posted on: 2008/7/18 10:23
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Info:Files:Releases
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
Description: Quote:
This module displays the latest news from the news module (1.62) in a block.

Features:
1. Can set the number of articles to display, using one or more columns.
2. Can choose to display the title, author, date, comments link, and other display settings.
3. Can customize image properties in all articles (i.e. width, height, position, borders).
4. Can customize the number of letters to truncate each news item, without cutting off any words midway.
5. Adding link and description to each image automatically for SEO.
6. Can limit by topic.
7. Can display featured news only.
8. Can clone unlimited blocks.
9. Can scrolling the articles.

Download Link.

v.72 2008/11/21
v.6 2008/7/26
v.5 2008/6/16
---------------

I Was Informed That This Module Has Stopped Development And All Of Its Features Will Be Integrated Into Publisher (www.xuups.com)

Posted on: 2008/7/18 9:05

Edited by Bandit-X on 2008/9/19 19:47:57
Edited by Bandit-X on 2008/11/28 12:06:11
Edited by Alex_Grey on 2008/12/2 5:37:52
Edited by Bandit-X on 2009/5/29 6:27:02
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: XM-Spotlight 1.02 In The Works.
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
Juin 11. 2col recent news block. WIP


Posted on: 2008/6/12 7:15
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: XM-Spotlight 1.02 In The Works.
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
XM-Spotlight 1.02 Juin 10, 2008. was released a few days ago.

http://www.bandit-x.net/news+article.storyid+95.htm
Some Bug Fixes, and Some Code Changes To Make It Run Better/Faster. (Tested On XCL and XooPS 2.0.18.1, News 1.56, PHP5, MySQL 5)

Download Link. [Here]

Posted on: 2008/6/12 7:05
_________________
Bandit-X.Net
Transfer the post to other applications Transfer


Re: XM-Spotlight 1.02 In The Works.
Webmaster
Joined:
2006/6/3 9:27
From UsA - MiChIgAn
Posts: 154
Offline
been a while since i replied to this thread. its a long read and ill try to keep the 1st post updated.

the current version of xm-spotlight (Download Link Sept 2007) works with news 1.5x.

Sept 2007 Bugs are. Link Here.

i've been busy with school and other distractions. i really want to finish this module back in january, but time is my enemy.

Posted on: 2008/3/19 7:37
_________________
Bandit-X.Net
Transfer the post to other applications Transfer



 Top
(1) 2 3 4 ... 6 »