News - Features - Downloads - Forum - Team - Support - Switch View: Screen
Login - Registrierung - Passwort vergessen

Antworten: 3
Seite [1]
microz


Rock the board




Beiträge: 86
# Thema - 19.05.2008 um 10:56 Uhr
Hi

As limit the amount of rss in navlist?

grettings


rss_reader/navlist.php
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
1. / 2. / ... 
<?php <?php
// RSS-Reader Navlist
// nerv 19.04.2007

require_once ('lastRSS.php');
$rss = new lastRSS;
$rss->cache_dir="./mods/rss_reader/cache"
$data = array();

if(!empty(
$_GET['rss_id'])) $where "id='"$_GET['rss_id'] ."'";
else 
$where 0;

$rss_list cs_sql_select(__FILE__,'rss_reader','*',$where,0,0,0);
$loop count($rss_list);

for(
$run=0$run<$loop$run++) {    
    
$rss->cache_time $rss_list[$run]['rss_refresh'];
    
$rss->items_limit $rss_list[$run]['rss_read'];
    
$rss->cp 'ISO-8859-1';
    if (
$rs $rss->get($rss_list[$run]['rss_url'])) {
        
$items $rs['items'];
        
$loop2 count($items);        
        for(
$run2=0$run2<$loop2$run2++) {
            
$l strlen($items[$run2]['title']);
            if (
$l >= 45 ){
                
$items[$run2]['title'] = substr($items[$run2]['title'],0,150);
                
$items[$run2]['title'] .='';
            }
            if(!empty(
$rss_list[$run]['rss_name'])) $data['rss_name'][$run]['name'] = $rss_list[$run]['rss_name'];
            if(!empty(
$rs['image_urls'])) $data['rss_name'][$run]['image_url'] = $rs['image_urls'];
            if(!empty(
$rs['link']))$data['rss_name'][$run]['link'] = $rs['link'];
            if(!empty(
$rs['description']))$data['rss_name'][$run]['description'] = $rs['description'];
            if(!empty(
$items[$run2]['title']))$data['rss_name'][$run]['rss'][$run2]['title'] = $items[$run2]['title'];
            if(!empty(
$items[$run2]['link']))$data['rss_name'][$run]['rss'][$run2]['link'] = $items[$run2]['link'];
            if(!empty(
$items[$run2]['description']))$data['rss_name'][$run]['rss'][$run2]['description'] = $items[$run2]['description'];            
        }
      }
?>
Inaktiv
microz
Thread-Ersteller


Rock the board




Beiträge: 86
# Antwort: 1 - 07.06.2008 um 11:12 Uhr
:(


Inaktiv
|
Ramires ClanSphere Team

Supporter
Supporter



Herkunft: Waldeck
Beiträge: 1900
# Antwort: 2 - 07.06.2008 um 14:29 Uhr
i'm not sure, but ist maybe this

$rss_list = cs_sql_select(__FILE__,'rss_reader','*',$where,0,0,4);

for example


------------------

Verschwende keine Energie an Dinge die Du nicht ändern kannst...


Inaktiv
|
Pred


Poststar




Herkunft: Bischofsmais
Beiträge: 762
# Antwort: 3 - 07.06.2008 um 17:40 Uhr
$loop2 = count($items);
for($run2=0; $run2<$loop2; $run2++) {

IMHO its the part with $loop2 = count($items);

because it says $run2<loop2
and if $run2= or > then loop2 it stops...

try this:
$loop2 = 5; (< but in a number u want and it should be repeating that often!)

Sorry for bad english ^^


------------------


Inaktiv
|
Antworten: 3
Seite [1]


Sie müssen sich registrieren, um zu antworten.


ClanSphere Project - Mailus - Imprint - Disclaimer - Scriptinfo