[RC] lastRSS agregator 2.0.0RC

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Hi Installed this today and cant get it to appear in ACP, I have cheched the install 3 times. Could it be the other mods.

Board 3
Advertisement module
Referal module ?

Board is http://www.discussuc.com


Appreciate your help

BTW I have purged 8 or so times ? and refreshed all templates.
PS running prosilver

Thank you

User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by Smix »

Well I´m finally a bit confused - are you speaking about agregator or about autoposting bot :?: ...
Flash tutorial how to add it (agregator mod) is :arrow: there ...

joebart72
Registered User
Posts: 743
Joined: Thu Feb 01, 2007 5:54 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by joebart72 »

Hi :)

Your mod is really nice but (to my mind), it would have been better with many news displayed at the same time :)

So I'm gonna wait for Autoposting Bot ;)
I learn English with phpbb.com :)

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Yes I am definantly talking about the aggregator, I have run the tutorial also, basically the drop down to add agregator does not appear?, any thoughts as to why its missing. I have checked the install many times.

Thanks again for your help
Below is my class_lastrss.php

Board
http://www.discussuc.com[/url]
Feed
http://www.econtentmag.com/rss/default. ... tegoryid=1

Code: Select all

<?php
/**
*
* @package includes
* @version $Id: $
* @copyright (c) 2007-2008 Jiri Smika (Smix) http://phpbb3.smika.net
* @          (c) 2003-2004 original lastRSS by Vojtech Semecky http://lastrss.oslab.net/
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* @main class
*/
class lastrss 
{
  /**
   * @ignore public properties
   */
  var $cdata = 'strip';
  var $items_limit = 0;
  var $striphtml = true;
  var $date_format = 'U';
  var $encoding = 'UTF-8';
  
  /** 
   * @ignore private variables
   */	 
  var $channeltags = array ('title', 'link', 'description', 'language', 'copyright', 'managingEditor', 'webMaster', 'lastBuildDate', 'rating', 'docs');
	var $itemtags = array('title', 'link', 'description', 'author', 'category', 'comments', 'enclosure', 'guid', 'pubDate', 'source');
	var $imagetags = array('title', 'url', 'link', 'width', 'height');
	var $textinputtags = array('title', 'description', 'name', 'link');

  /**
   *  returns content gathered with CURL   
   *  @param string (URL) 
   */
  function curl_get_rss($rss)
  {
    // initiate and set options
    $ch = @curl_init($rss['url']);
    @curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
    @curl_setopt( $ch, CURLOPT_HEADER, 0);
    @curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
    //@curl_setopt( $ch, CURLOPT_ENCODING, '');
    @curl_setopt( $ch, CURLOPT_USERAGENT, 'lastRSS'); 
    // initial connection timeout
    @curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5);
    // setting this to higher means longer time for loading the page for user!
    @curl_setopt( $ch, CURLOPT_TIMEOUT, 60);
    @curl_setopt( $ch, CURLOPT_MAXREDIRS, 0);
    // get content
    $result['content'] = @curl_exec($ch);
    $result['errno'] = @curl_errno($ch);
    $result['errmsg'] = @curl_error($ch);
    $result['getinfo'] = @curl_getinfo($ch);
    @curl_close($ch);
    // if we have error data for log
    if($result['errmsg']!='')
    {
      add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss['name'] . ' ('.$rss['url'].')<br />Feed wasn´t updated, because <b>' . $result['errmsg'] .'</b>');
    }
    else
    {
      // merge arrays with new data
      $result = array_merge($rss, $result);
    }
    return $result;
  }

  /** 
   * specific lastRSS agregator MOD function  
   * returns RSS data from db if applicable, 
   * or downloads new RSS data and updates old data 
   * and returns data directly 
   */	 
  function get_rss($rss) 
  {
    global $db;
    // check if it´s time to get new data or not
    if (($this->cache_time + $rss['last_update']) > time())
    {
      $sql = 'SELECT content
              FROM ' . LASTRSS_RSSCONTENT_TABLE . '
              WHERE name = "' . ($rss['name']) . '"
              LIMIT 1';
      if(!($result = $db->sql_query($sql)))
      {
        trigger_error('ERROR getting lastRSS content from DB.', E_USER_ERROR);
      }
      $result = $db->sql_fetchrow($result);
      return unserialize($result['content']);
    }
    else
    { 
      // connect and download fresh data
      $result = $this->parse($rss);    
      // do we have some items
      if(isset($result['items']) && (sizeof($result['items']) > 0))
      {
        // update data in database
        $sql = 'UPDATE ' . LASTRSS_RSSCONTENT_TABLE . '
                SET content = "' . $db->sql_escape(serialize($result)) . '"
                WHERE name = "' . $rss['name'] . '"
                LIMIT 1 ;';   
        if(!$update = $db->sql_query($sql))
      	{
      	  trigger_error('ERROR updating lastRSS content', E_USER_ERROR);
      	}
        else
        { 
          // update time of last check
          $sql = 'UPDATE ' . LASTRSS_RSSLIST_TABLE . ' 
                  SET last_update = "' . time() . '" 
                  WHERE name = "' . $rss['name'] . '" 
                  LIMIT 1 ;';
          if(!$update = $db->sql_query($sql))
        	{
        	   trigger_error('ERROR updating lastRSS list', E_USER_ERROR);
        	}
        }  
        return $result;
      }
      else
      { 
        // update time of last check
        $sql = 'UPDATE ' . LASTRSS_RSSLIST_TABLE . ' 
                SET last_update = "' . time() . '" 
                WHERE name = "' . $rss['name'] . '" 
                LIMIT 1 ;';
        if(!$update = $db->sql_query($sql))
      	{
      	   trigger_error('ERROR updating lastRSS list', E_USER_ERROR);
      	}
        add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss['name'] . '<br />Items not found. <br />Check the URL if it is RSS feed (NO ATOM or other formats) and if yes, is the feed valid?');
        return false;
      }   
    }
  }

  /**
   * modified preg_match(); returns trimed field with index 1
   * from 'classic' preg_match() array output	 
   */   	
  function my_preg_match($pattern, $subject) 
  {
  	// start regullar expression
  	preg_match($pattern, $subject, $out);
  	// if there is some result... process it and return it
  	if(isset($out[1])) 
    {
  		// cdata
  		$out[1] = strtr($out[1], array('<![CDATA['=>'', ']]>'=>''));
  		
  		if( (isset($this->encoding)) && ($this->encoding != 'UTF-8') && ($this->encoding != '') )
  		{
  		  // recode with phpBB´s functions
        $out[1] = utf8_recode($out[1], $this->encoding);
      }
      // Return result
  		return trim($out[1]); 	
  	} 
    else 
    {
  	  // if there is NO result, return empty string
  		return '';
  	}
  }
  
  /**
  * replace HTML entities &something; by real characters
  * @param string  
  */     
  function unhtmlentities ($string) 
  {
		// Get HTML entities table
		$trans_tbl = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES);
		// Flip keys<==>values
		$trans_tbl = array_flip ($trans_tbl);
		// Add support for &apos; entity (missing in HTML_ENTITIES)
		$trans_tbl += array('&apos;' => "'");
		// Replace entities by values
		return strtr($string, $trans_tbl);
  }

  /**
  *  parse() is private method used by getrss() to load and parse RSS file    
  *  @param string (URL)  
  */     
  function parse($rss_data) 
  {
    global $rss;
  	// open and load RSS file
    // use curl if enabled 
  	if($rss->type == 'curl')
  	{ 
      $rss_content = $this->curl_get_rss($rss_data);
    } 
  	else 
    { 
      // else use fopen if possible
      if($f = @fopen($rss_data['url'], 'r')) 
      { 
  			while (!feof($f)) 
        {
  				@$rss_content['content'] .= fgets($f, 4096);
  				$rss_content = array_merge($rss_data,$rss_content);
  			}
  			fclose($f);	
      }
    }
    // if download was succesfull
  	if(isset($rss_content['content']) && (sizeof($rss_content['content'])>0))
    {	
  		// parse document encoding
  		$result['encoding'] = $this->my_preg_match("'encoding=[\'\"](.*?)[\'\"]'si", $rss_content['content']);
  		// if document encoding is specified, use it
  		if ( isset($result['encoding']) && ($result['encoding'] != '') )
  		{ 
        $this->encoding = $result['encoding'];   
      }
  		else
  		{ 
  		  // otherwise use UTF-8
        $this->encoding = 'UTF-8';     
        add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss_data['name'] . '<br />Feed tag "encoding" unavailable, characters can be damaged.');
      } 
  		// parse channel info
  		preg_match("'<channel.*?>(.*?)</channel>'si", $rss_content['content'], $out_channel);
  		foreach($this->channeltags as $channeltag)
  		{
  			$temp = @$this->my_preg_match("'<$channeltag.*?>(.*?)</$channeltag>'si", $out_channel[1]);
  			if (isset($temp))
        {
          $result[$channeltag] = $temp; 
        } 
  		}
  		// parse textinput info
  		// This a little strange regexp means:
  		// Look for tag <textinput> with or without any attributes, but skip truncated version <textinput /> (it's not beggining tag)
  		preg_match("'<textinput(|[^>]*[^/])>(.*?)</textinput>'si", $rss_content['content'], $out_textinfo);
  		if (isset($out_textinfo[2])) 
      {
  			foreach($this->textinputtags as $textinputtag) 
        {
  				$temp = $this->my_preg_match("'<$textinputtag.*?>(.*?)</$textinputtag>'si", $out_textinfo[2]);
  				if (isset($temp)) 
          {
            $result['textinput_'.$textinputtag] = $temp; 
          }
  			}
  		}
  		// parse images
  		preg_match("'<image.*?>(.*?)</image>'si", $rss_content['content'], $out_imageinfo);
			if (isset($out_imageinfo[1])) 
      {
				foreach($this->imagetags as $imagetag) 
        {
					$temp = $this->my_preg_match("'<$imagetag.*?>(.*?)</$imagetag>'si", $out_imageinfo[1]);
					if ($temp != '') 
          {
            $result['image_'.$imagetag] = $temp;
          }
				}
			}
			
  		// parse items
  		preg_match_all("'<item(| .*?)>(.*?)</item>'si", $rss_content['content'], $items);
  		$rss_items = $items[2];
  		// init item counter
  		$i = 0;
  		foreach($rss_items as $rss_item) 
      {  
  			// If number of items is lower then limit: parse one item
  			if ($i < $this->items_limit || $this->items_limit == 0) 
        {
  				foreach($this->itemtags as $itemtag) 
          {
  					$temp = $this->my_preg_match("'<$itemtag.*?>(.*?)</$itemtag>'si", $rss_item);
  					if (isset($temp))
            {
              $result['items'][$i][$itemtag] = $temp; 
            } 
  				}
  				// item title
  				if ($this->striphtml && isset($result['items'][$i]['title']))
  				{
            $result['items'][$i]['title'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['title'])));
          }
          // item description
					if ($this->striphtml && $result['items'][$i]['description'])
						$result['items'][$i]['description'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['description'])));
					// If pubDate exists
          if ( (isset($result['items'][$i]['pubDate']) && ($result['items'][$i]['pubDate'] != '') )) 
          {
            // ... and is valid ?
            if( (($timestamp = strtotime($result['items'][$i]['pubDate'])) !== -1) && (($timestamp = strtotime($result['items'][$i]['pubDate'])) === false) )
            {
  						// convert pubDate to specified date format
  						$result['items'][$i]['pubDate'] = $timestamp;
  					}
          }
          else
          {
            $result['items'][$i]['pubDate'] = time();
          }
  				// item counter
  				$i++;
  			}
  		}
  		$result['items_count'] = $i;
  		return $feed['content'] = $result;
  	}
  	else 
  	{
  	  // error in getting content return false
  		return $feed['error'] = true;
  	}
  }
}
?>
Last edited by deanandeva on Tue Jul 15, 2008 1:56 am, edited 1 time in total.

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Hi I checked again and seems I put the wrong acp_lastrss.php in the place of info/ACP. Now I can get configuration to show in my ACP but not Management. When I run the module I get the following error.

Fatal error: Cannot redeclare class lastrss in /home/discussu/public_html/includes/class_lastrss.php on line 24

Below is my class_lastrss.php

Code: Select all

<?php
/**
*
* @package includes
* @version $Id: $
* @copyright (c) 2007-2008 Jiri Smika (Smix) http://phpbb3.smika.net
* @          (c) 2003-2004 original lastRSS by Vojtech Semecky http://lastrss.oslab.net/
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* @main class
*/
class lastrss 
{
  /**
   * @ignore public properties
   */
  var $cdata = 'strip';
  var $items_limit = 0;
  var $striphtml = true;
  var $date_format = 'U';
  var $encoding = 'UTF-8';
  
  /** 
   * @ignore private variables
   */	 
  var $channeltags = array ('title', 'link', 'description', 'language', 'copyright', 'managingEditor', 'webMaster', 'lastBuildDate', 'rating', 'docs');
	var $itemtags = array('title', 'link', 'description', 'author', 'category', 'comments', 'enclosure', 'guid', 'pubDate', 'source');
	var $imagetags = array('title', 'url', 'link', 'width', 'height');
	var $textinputtags = array('title', 'description', 'name', 'link');

  /**
   *  returns content gathered with CURL   
   *  @param string (URL) 
   */
  function curl_get_rss($rss)
  {
    // initiate and set options
    $ch = @curl_init($rss['url']);
    @curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
    @curl_setopt( $ch, CURLOPT_HEADER, 0);
    @curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
    //@curl_setopt( $ch, CURLOPT_ENCODING, '');
    @curl_setopt( $ch, CURLOPT_USERAGENT, 'lastRSS'); 
    // initial connection timeout
    @curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5);
    // setting this to higher means longer time for loading the page for user!
    @curl_setopt( $ch, CURLOPT_TIMEOUT, 60);
    @curl_setopt( $ch, CURLOPT_MAXREDIRS, 0);
    // get content
    $result['content'] = @curl_exec($ch);
    $result['errno'] = @curl_errno($ch);
    $result['errmsg'] = @curl_error($ch);
    $result['getinfo'] = @curl_getinfo($ch);
    @curl_close($ch);
    // if we have error data for log
    if($result['errmsg']!='')
    {
      add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss['name'] . ' ('.$rss['url'].')<br />Feed wasn´t updated, because <b>' . $result['errmsg'] .'</b>');
    }
    else
    {
      // merge arrays with new data
      $result = array_merge($rss, $result);
    }
    return $result;
  }

  /** 
   * specific lastRSS agregator MOD function  
   * returns RSS data from db if applicable, 
   * or downloads new RSS data and updates old data 
   * and returns data directly 
   */	 
  function get_rss($rss) 
  {
    global $db;
    // check if it´s time to get new data or not
    if (($this->cache_time + $rss['last_update']) > time())
    {
      $sql = 'SELECT content
              FROM ' . LASTRSS_RSSCONTENT_TABLE . '
              WHERE name = "' . ($rss['name']) . '"
              LIMIT 1';
      if(!($result = $db->sql_query($sql)))
      {
        trigger_error('ERROR getting lastRSS content from DB.', E_USER_ERROR);
      }
      $result = $db->sql_fetchrow($result);
      return unserialize($result['content']);
    }
    else
    { 
      // connect and download fresh data
      $result = $this->parse($rss);    
      // do we have some items
      if(isset($result['items']) && (sizeof($result['items']) > 0))
      {
        // update data in database
        $sql = 'UPDATE ' . LASTRSS_RSSCONTENT_TABLE . '
                SET content = "' . $db->sql_escape(serialize($result)) . '"
                WHERE name = "' . $rss['name'] . '"
                LIMIT 1 ;';   
        if(!$update = $db->sql_query($sql))
      	{
      	  trigger_error('ERROR updating lastRSS content', E_USER_ERROR);
      	}
        else
        { 
          // update time of last check
          $sql = 'UPDATE ' . LASTRSS_RSSLIST_TABLE . ' 
                  SET last_update = "' . time() . '" 
                  WHERE name = "' . $rss['name'] . '" 
                  LIMIT 1 ;';
          if(!$update = $db->sql_query($sql))
        	{
        	   trigger_error('ERROR updating lastRSS list', E_USER_ERROR);
        	}
        }  
        return $result;
      }
      else
      { 
        // update time of last check
        $sql = 'UPDATE ' . LASTRSS_RSSLIST_TABLE . ' 
                SET last_update = "' . time() . '" 
                WHERE name = "' . $rss['name'] . '" 
                LIMIT 1 ;';
        if(!$update = $db->sql_query($sql))
      	{
      	   trigger_error('ERROR updating lastRSS list', E_USER_ERROR);
      	}
        add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss['name'] . '<br />Items not found. <br />Check the URL if it is RSS feed (NO ATOM or other formats) and if yes, is the feed valid?');
        return false;
      }   
    }
  }

  /**
   * modified preg_match(); returns trimed field with index 1
   * from 'classic' preg_match() array output	 
   */   	
  function my_preg_match($pattern, $subject) 
  {
  	// start regullar expression
  	preg_match($pattern, $subject, $out);
  	// if there is some result... process it and return it
  	if(isset($out[1])) 
    {
  		// cdata
  		$out[1] = strtr($out[1], array('<![CDATA['=>'', ']]>'=>''));
  		
  		if( (isset($this->encoding)) && ($this->encoding != 'UTF-8') && ($this->encoding != '') )
  		{
  		  // recode with phpBB´s functions
        $out[1] = utf8_recode($out[1], $this->encoding);
      }
      // Return result
  		return trim($out[1]); 	
  	} 
    else 
    {
  	  // if there is NO result, return empty string
  		return '';
  	}
  }
  
  /**
  * replace HTML entities &something; by real characters
  * @param string  
  */     
  function unhtmlentities ($string) 
  {
		// Get HTML entities table
		$trans_tbl = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES);
		// Flip keys<==>values
		$trans_tbl = array_flip ($trans_tbl);
		// Add support for &apos; entity (missing in HTML_ENTITIES)
		$trans_tbl += array('&apos;' => "'");
		// Replace entities by values
		return strtr($string, $trans_tbl);
  }

  /**
  *  parse() is private method used by getrss() to load and parse RSS file    
  *  @param string (URL)  
  */     
  function parse($rss_data) 
  {
    global $rss;
  	// open and load RSS file
    // use curl if enabled 
  	if($rss->type == 'curl')
  	{ 
      $rss_content = $this->curl_get_rss($rss_data);
    } 
  	else 
    { 
      // else use fopen if possible
      if($f = @fopen($rss_data['url'], 'r')) 
      { 
  			while (!feof($f)) 
        {
  				@$rss_content['content'] .= fgets($f, 4096);
  				$rss_content = array_merge($rss_data,$rss_content);
  			}
  			fclose($f);	
      }
    }
    // if download was succesfull
  	if(isset($rss_content['content']) && (sizeof($rss_content['content'])>0))
    {	
  		// parse document encoding
  		$result['encoding'] = $this->my_preg_match("'encoding=[\'\"](.*?)[\'\"]'si", $rss_content['content']);
  		// if document encoding is specified, use it
  		if ( isset($result['encoding']) && ($result['encoding'] != '') )
  		{ 
        $this->encoding = $result['encoding'];   
      }
  		else
  		{ 
  		  // otherwise use UTF-8
        $this->encoding = 'UTF-8';     
        add_log('critical', 'LOG_ERROR_LASTRSS', 'RSS: ' . $rss_data['name'] . '<br />Feed tag "encoding" unavailable, characters can be damaged.');
      } 
  		// parse channel info
  		preg_match("'<channel.*?>(.*?)</channel>'si", $rss_content['content'], $out_channel);
  		foreach($this->channeltags as $channeltag)
  		{
  			$temp = @$this->my_preg_match("'<$channeltag.*?>(.*?)</$channeltag>'si", $out_channel[1]);
  			if (isset($temp))
        {
          $result[$channeltag] = $temp; 
        } 
  		}
  		// parse textinput info
  		// This a little strange regexp means:
  		// Look for tag <textinput> with or without any attributes, but skip truncated version <textinput /> (it's not beggining tag)
  		preg_match("'<textinput(|[^>]*[^/])>(.*?)</textinput>'si", $rss_content['content'], $out_textinfo);
  		if (isset($out_textinfo[2])) 
      {
  			foreach($this->textinputtags as $textinputtag) 
        {
  				$temp = $this->my_preg_match("'<$textinputtag.*?>(.*?)</$textinputtag>'si", $out_textinfo[2]);
  				if (isset($temp)) 
          {
            $result['textinput_'.$textinputtag] = $temp; 
          }
  			}
  		}
  		// parse images
  		preg_match("'<image.*?>(.*?)</image>'si", $rss_content['content'], $out_imageinfo);
			if (isset($out_imageinfo[1])) 
      {
				foreach($this->imagetags as $imagetag) 
        {
					$temp = $this->my_preg_match("'<$imagetag.*?>(.*?)</$imagetag>'si", $out_imageinfo[1]);
					if ($temp != '') 
          {
            $result['image_'.$imagetag] = $temp;
          }
				}
			}
			
  		// parse items
  		preg_match_all("'<item(| .*?)>(.*?)</item>'si", $rss_content['content'], $items);
  		$rss_items = $items[2];
  		// init item counter
  		$i = 0;
  		foreach($rss_items as $rss_item) 
      {  
  			// If number of items is lower then limit: parse one item
  			if ($i < $this->items_limit || $this->items_limit == 0) 
        {
  				foreach($this->itemtags as $itemtag) 
          {
  					$temp = $this->my_preg_match("'<$itemtag.*?>(.*?)</$itemtag>'si", $rss_item);
  					if (isset($temp))
            {
              $result['items'][$i][$itemtag] = $temp; 
            } 
  				}
  				// item title
  				if ($this->striphtml && isset($result['items'][$i]['title']))
  				{
            $result['items'][$i]['title'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['title'])));
          }
          // item description
					if ($this->striphtml && $result['items'][$i]['description'])
						$result['items'][$i]['description'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['description'])));
					// If pubDate exists
          if ( (isset($result['items'][$i]['pubDate']) && ($result['items'][$i]['pubDate'] != '') )) 
          {
            // ... and is valid ?
            if( (($timestamp = strtotime($result['items'][$i]['pubDate'])) !== -1) && (($timestamp = strtotime($result['items'][$i]['pubDate'])) === false) )
            {
  						// convert pubDate to specified date format
  						$result['items'][$i]['pubDate'] = $timestamp;
  					}
          }
          else
          {
            $result['items'][$i]['pubDate'] = time();
          }
  				// item counter
  				$i++;
  			}
  		}
  		$result['items_count'] = $i;
  		return $feed['content'] = $result;
  	}
  	else 
  	{
  	  // error in getting content return false
  		return $feed['error'] = true;
  	}
  }
}
?>
 :D 
Any thoughts ?

Thanks

http://www.discussuc.com

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Hi,

I have also noticed that my posts are now looking kinda weird since of done this MOD.

Any ideas ? thanks

Image

http://www.discussuc.com

User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by Smix »

Hello,

problem with redeclaring the main class lastrss is not in the class itself, but in the file, where this error message appears - is it index.php? or which one? The class is already initiated and declared - the only way how to get this error message is bad installation - duplicated edits or you´ve got installed bot mod and agregator in bad order (Agregator first - than Bot mod) ...

Did you installed AP bot and agregator mod ? ... Do you have installed both of them? If yes, remove the bot mod (all edits). Bot mod´s edits have to be the latest in the order (installed after agregator) ...

I don´t see any problems on your board now, but my mod is actually off. Anyway, if it´s correctly installed, my mod is not changing CSS globally and it´s valid xHTML code, so there is no reason, why it may damage your layout or CSS ... But I´d like to see it when you´ll switch it on (not a screen).
edit : yes, I see it as it´s shown on the attached screen - in IE7 ... but again - my mod is not in the page and my mod is not changing your style - it´s only addition to the page ...

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Thanks,

I think I will go back over my steps and de-install both mods, but how do I undo the install in SQL.?

I have turned the RSS agregator on so that you can see the issue live

http://www.discussuc.com

BTW I installed aggregator first then Bot Mod.

Cheers


Dean

User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by Smix »

You don´t need to remove SQLs ;-)

Remove the bot edits ;-) it´s possible the main problem ...
and then if you want to add it again do it this way ...

Edits for both mods are very similar ... but remember, always add bot mod edits after agregator ;-)

example of edits ordering :

Code: Select all

// added code for agregator
$example = 'This line is some code used by agregator mod';

// added code for bot mod 
$example = 'This line is used by bot mod and it´s necessary to be placed after agregator code'; 
;-)

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Thanks again

and BTW I read this somewhere else in this forum and totally agree, your responsiveness and willingness to help is awesome. Congratulations :D

User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by Smix »

Thank you :oops:
I´m glad, that somebody is using my mods :)

User avatar
deanandeva
Registered User
Posts: 138
Joined: Fri May 30, 2008 12:11 pm
Location: Australia
Contact:

Re: [RC] lastRSS agregator 2.0.0RC

Post by deanandeva »

Hi Smix,

I restored the following back to their pre mod state:

includes/contants.php
index.php
viewforum.php
viewtopic.php

This removes both the aggregator and the BOT mod edit, the files are still there at this stage.

Sadly my view topics is still messed up. I have purged and reset templates.

Any thoughts

http://www.discussuc.com/viewforum.php?f=12

zelnik44
Registered User
Posts: 40
Joined: Fri May 30, 2008 4:53 pm

Re: [RC] lastRSS agregator 2.0.0RC

Post by zelnik44 »

Hi Smix,

Can I please draw your attention to my problem, I know it's probably me that has done something stupidly wrong but I would appreciate very much some help!

Thanks

http://www.phpbb.com/community/viewtopi ... 5#p6075705

User avatar
Smix
Registered User
Posts: 482
Joined: Mon Sep 11, 2006 1:07 am

Re: [RC] lastRSS agregator 2.0.0RC

Post by Smix »

Hello,

4 deanandeva:
Well, remove the edits from overall_header.html and that´s all what can be done to remove the mod. But I´m repeating - I´m (my mods are) not changing style in any way ... :? (or I´m wrong?)
Check :arrow: validator.w3.org!

4 zelnik44 :
I was battling with this since the mod was released, please try RC2 pre-release files ...

zelnik44
Registered User
Posts: 40
Joined: Fri May 30, 2008 4:53 pm

Re: [RC] lastRSS agregator 2.0.0RC

Post by zelnik44 »

Smix wrote:4 zelnik44 :
I was battling with this since the mod was released, please try RC2 pre-release files ...
Ah brilliant at least it's not nothing I'm doing then!

I'll try the RC2 pre-rel and report back

Locked

Return to “[3.0.x] MODs in Development”