Welcome to Geeklog, Anonymous Thursday, April 18 2024 @ 04:38 am EDT

Geeklog Forums

Limit items in RDF feeds?


Anonymous

Anonymous
First, I think it's really great how easy it is to set up blocks to get RDF feeds. Is there any way to limit the number of items that are listed in the block display? For some sites, I may only want to display the three latest new stories.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In lib-common.php, search for the function named COM_rdfImport(). You will see code that reads the entire RDF file and counts the number of 'item' entries in there. After that, this 'for' statement for ($i = 1; $i <= $di; $i++) will loop over all the items and add them to the portal block. So, instead of $di simply put the max. number you want in there (of course you need to check that you have at least that many items in the RDF file ...). bye, Dirk
 Quote

Anonymous

Anonymous
Thanks Dirk,

A Would Like feature would be to allow an option to be specified when the block is created.
Just something to add to the feature request list.

Blaine

 Quote

Status: offline

squatty

Forum User
Full Member
Registered: 01/21/02
Posts: 269
Kind of off topic but, have you noticed that some RDF feeds have backslashes? Instead of what's you will get what\s. I assume this too is in the COM_rdfImport? Any ideas on how to fix this?
In a world without walls and fences, who needs Windows and Gates?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

Sounds like a job for stripslashes() ...

bye, Dirk

 Quote

Status: offline

squatty

Forum User
Full Member
Registered: 01/21/02
Posts: 269
nicely done ;-)
In a world without walls and fences, who needs Windows and Gates?
 Quote

t.bag

Anonymous
Anonymous is right, I\'m missing the possibility to limit the number of imported rdf feed titles too. It may be possible to change the code but why not include this feature in the admin settings? It would be much easier and more comfortable, especially for users with little or no programming experience. It would be also cool to be able to set the number of titles for every rdf feed individually (if you have more than one) ...
 Quote

All times are EDT. The time is now 04:38 am.

  • 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