lastRSS 2.0.BETA1 -> BETA2 CHANGELIST

Main forum
Forum rules
Forum about lastRSS agregator
Locked
User avatar
Smix
admin
admin
Posts: 799
Joined: 16.2.2007 16:34:59
SmiX .MODs user: Yes
Location: 127.0.0.1
Contact:

lastRSS 2.0.BETA1 -> BETA2 CHANGELIST

Post by Smix » 26.11.2007 00:11:38

This is short list of changes between BETA1 and BETA2 package.
It´s recommended to copy all files from BETA2 package over old ones.

File includes/functions_lastrss.php
Find :

Code: Select all

$template->assign_vars(array(
      'LASTRSS_TITLE'       => $user->lang['LASTRSS_TITLE'],
		  'LASTRSS_NUM_LIST'				=> $length,
Add after :

Code: Select all

'SAFARI' =>  strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') ? true : false,
Find:

Code: Select all

'LASTRSS_NOTAVAILABLE'  => $user->lang['LASTRSS_NOTAVAILABLE'],
Replace with :

Code: Select all

'LASTRSS_NOTAVAILABLE'  => $rsslist[$i]['name'] . $user->lang['LASTRSS_NOTAVAILABLE'],
File /includes/class_lastrss.php
Find:

Code: Select all

curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt( $ch, CURLOPT_TIMEOUT, 0);
Replace with:

Code: Select all

curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt( $ch, CURLOPT_TIMEOUT, 5);
Replace totally the curl function with this code:

Code: Select all

/**
* Get RSS (URL) with curl 
*/
function lastrss_curl_get_rss($url)
{
  //initiate and set options
  $ch = @curl_init($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_agregator');
  @curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 2);
  @curl_setopt( $ch, CURLOPT_TIMEOUT, 5);
  @curl_setopt( $ch, CURLOPT_MAXREDIRS, 0);

  //get content
  $content = @curl_exec($ch);
  $err = @curl_errno($ch);
  $errmsg = @curl_error($ch);
  $header = @curl_getinfo($ch);
  @curl_close($ch);
  
  $header['errno']   = $err;
  $header['errmsg']  = $errmsg;
  $header['content'] = $content;
  //we don´t need all headers - return only content
  return $header['content'];
}
Find

Code: Select all

//else use fopen if possible
    if($f = fopen($rss_url, 'r')) 
Replace with

Code: Select all

//else use fopen if possible
    if($f = @fopen($rss_url, 'r')) 
Find

Code: Select all

		// If code page is set convert character encoding to required
		if(isset($this->cp))
		{
			$out[1] = iconv($this->rsscp, $this->cp.'//TRANSLIT', $out[1]);
    }
replace with

Code: Select all

		// If code page is set convert character encoding to required
		if(isset($this->cp))
		{
		  if(function_exists(iconv))
		  {
        $out[1] = iconv($this->rsscp, $this->cp.'//TRANSLIT', $out[1]);
      }
    }
File /styles/prosilver/lastrss.html
Replace all with this code :

Code: Select all

<div id="lastrss" class="forabg">
	<div class="inner"><span class="corners-top"><span></span></span>
		<ul class="topiclist">
			<li class="header">
				<dl class="icon">
					<dt>{LASTRSS_TITLE}</dt>
				</dl>
			</li>
		</ul>
		<dl>
			<dd class="bg2" style="height:20px;line-height:20px;">
        <img src="images/lastrss.png" alt="{LASTRSS_TITLE}" style="float:left; margin:auto;" /> 
        <marquee style="height:20px;line-height:20px;<!-- IF SAFARI -->position:relative;top:-20px;margin-left:87px;<!-- ENDIF -->" onmouseover="stop();" onmouseout="start()";>
          <!-- BEGIN lastrssrow -->
            <!-- IF lastrssrow.HASITEMS -->
            | <a style="font-weight:bold;" href="{lastrssrow.LINK}" target="_blank">{lastrssrow.TITLE}</a>
              <!-- BEGIN itemsrow -->
                &bull; <a href="{lastrssrow.itemsrow.LINK}" title="{lastrssrow.itemsrow.TITLE}" target="_blank">{lastrssrow.itemsrow.TITLE}</a>
              <!-- END itemsrow -->
            <!-- ELSE -->
                &bull; {LASTRSS_NOTAVAILABLE}
            <!-- ENDIF -->
          <!-- END lastrssrow -->
        </marquee>
			</dd>
		</dl>
	<span class="corners-bottom"><span></span></span></div>
</div>
Since I´m @ work, I´m very busy ... If you like my work, please reconsider a small donation ;-)
Follow development on
github
@smixmods
Image

Locked

Who is online

Users browsing this forum: No registered users and 0 guests