Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 10:49 pm EST
Geeklog Forums
Limiting rss stories in portal block
Page navigation
drali
Anonymous
Text Formatted Code
$RDFheadlines = array_splice($RDFheadlines, 0, -5);okay, using that...i think i got it to grab the right headlines.
BUT...it works oddly on some feeds (i think depending on how they are published)
for some feeds..there are still many more entries...and on some feeds...wired news for instance....there are only 2 that now show up on my block.
dah...slowly, slowly.
26
30
Quote
drali
Anonymous
Text Formatted Code
if( !$rdferror )
{
$RDFheadlines = array_slice($RDFheadlines,0,5);
$blockcontent = COM_makeList( $RDFheadlines );
$blockcontent = preg_replace( "/(\015\012)|(\015)|(\012)/", '',
$blockcontent );
$result = DB_change( $_TABLES['blocks'], 'content', $blockcontent,
'bid', $bid);
OKAY
i think i finally have it.
instead of array SPLICE
use array SLICE
(no P)
that seems to work perfectly now.
(well, until i find out i'm missing somethign again.)
i hope this helps SOMEONE in the future.
26
29
Quote
Status: offline
1000ideen
Forum User
Full Member
Registered: 08/04/03
Posts: 1298
If I change this from 0 to 3 I'm receiving an error
Parse error: parse error in /srv/www/htdocs/web393/html/lib-common.php on line 3712
Warning: main(lib-story.php): failed to open stream: No such file or directory in /srv/www/htdocs/web393/html/index.php on line 38
Fatal error: main(): Failed opening required 'lib-story.php' (include_path='.:/usr/share/php') in /srv/www/htdocs/web393/html/index.php on line 38
Then I tried drali's code and it worked. Is this still a bug in 1.3.11sr2 ? You had been talking about 1.3.10 before.
Basically I think that there should be an editable limit in lines displayed in a block. This is also desireable for some more variables. These
$_CONF['newstoriesinterval'] $_CONF['newcommentsinterval'] $_CONF['newlinksinterval'] should rather have a limit in lines displayed than days, hours etc. This may be true for some more things like events etc.
Text Formatted Code
$maxheadlines = 0; // set to something > 0 to limit max. number of headlinesParse error: parse error in /srv/www/htdocs/web393/html/lib-common.php on line 3712
Warning: main(lib-story.php): failed to open stream: No such file or directory in /srv/www/htdocs/web393/html/index.php on line 38
Fatal error: main(): Failed opening required 'lib-story.php' (include_path='.:/usr/share/php') in /srv/www/htdocs/web393/html/index.php on line 38
Then I tried drali's code and it worked. Is this still a bug in 1.3.11sr2 ? You had been talking about 1.3.10 before.
Basically I think that there should be an editable limit in lines displayed in a block. This is also desireable for some more variables. These
$_CONF['newstoriesinterval'] $_CONF['newcommentsinterval'] $_CONF['newlinksinterval'] should rather have a limit in lines displayed than days, hours etc. This may be true for some more things like events etc.
19
29
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by 1000ideen: Parse error: parse error in /srv/www/htdocs/web393/html/lib-common.php on line 3712
Check that line then ...
Quote by 1000ideen: Basically I think that there should be an editable limit in lines displayed in a block.
Already in CVS and will be in 1.3.12.
bye, Dirk
27
21
Quote
Status: offline
johnjr
Forum User
Chatty
Registered: 02/08/04
Posts: 68
I've got
but, I'm still getting more than 10 'headlines' from RSS feeds (in particular from the National Weather Service - 58 'headlines').
Any ideas as to why this isn't limiting the feeds to 10?
John
Text Formatted Code
$maxheadlines = 10; // set to something > 0 to limit max. number of headlinesbut, I'm still getting more than 10 'headlines' from RSS feeds (in particular from the National Weather Service - 58 'headlines').
Any ideas as to why this isn't limiting the feeds to 10?
John
20
24
Quote
Page navigation
All times are EST. The time is now 10:49 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content