Info
- 3 posts
- 2 voices
- Started 5 years ago by CMoseley
- Latest reply from CMoseley
- This topic is not resolved
Integrating Aggrss into bbPress theme?
-
- Posted 5 years ago #
I use aggrss to do syndication of my own website's RSS feeds to the front page (OncTalk) and I want to be able to do the same thing on my bbPress theme (which is nearly identically to my WordPress theme). I've setup integration between the two theme systems, and I know it works becuase all of my WordPress Conditional tags and things I'm using in my bbPress theme are working, but when I put in aggrss, I get this error:
Fatal error: Call to undefined function: get() in /usr/home/josh/domains/onctalk.com/public_html/wp-content/plugins/aggrss.php on line 127When looking up the code on that, I didn't seen anything blatantly obvious that would cuase a screw up, but im still a beginner at this.
This is the code around line 127 from aggrss.php:
(From line 123-131)
function aggrss($rssurl,$striptags=false,$num=0) {
global $lastRSS;
$lastRSS->CDATA= ($striptags) ? "strip" : "content" ;
$lastRSS->items_limit=$num;
if ($aggr = $lastRSS->Get($rssurl))
return $aggr;
else
return 0;
}Full view of the code can be found here.
Any help in getting this fixed/solved would be much appreciated.
-
- Posted 5 years ago #
It can't find the function get() because no such function exists - unless you're sure it exists in your wordpress plugins or something? Are you sure that's the function you want to be calling in that template file on line 127?
-
- Posted 5 years ago #
I'm not sure exactly what your asking. I copied and pasted the code in my WordPress template into my bbPress template. Works fine in WordPress, gives me the above error in bbPress.
The code I used was:
<?php if ($rs = aggrss('http://onctalk.com/wp-commentsrss2-custom.php')) { // dump the structure //echo "<pre>"; //print_r($rs); //echo "</pre>"; echo "<a href='" . $rs[link] . "' style='color: #000000; font-weight: bold;' >" . $rs[title] . "</a>"; echo $rs[description] . "<br />"; foreach ($rs['items'] as $item) { echo "<p><a href='" .$item['link']. "'>" . $item['title'] . "</a><br/>" .html_entity_decode($item['description']). "</p>"; } if ($rs['items_count'] <= 0) { echo "Sorry, no items found in the RSS file <img src='http://www.soderlind.no/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> "; } } else { echo "<!-- It's not possible to reach RSS file -->"; } ?> -
You must log in to post.