Qondio
Front
Intel
IntelMart
Shares
My Qondio
Account
Cube 3 Design, LLC > Intel > Yet Another Content Generator

qondio.com/JATz PRINT EMAIL

Yet Another Content Generator

This allows you to assign random RSS/Atom feeds to your site, allowing for a variety of content every time you refresh. For YACG.

Qassia members: You must first sign up for forums.getyacg.com to get a copy of YACG (Yet Another Content Generator). Then search the forums for "RSS Aggregator 1.0".
///////////////////////////////////////////////////////////
| |
| RSS ATOM FEED AGGREGATOR 1.0 (FOR YACG 2.1) |
| By: bill@cube3design.com |
| www.cube3design.com |
| |
///////////////////////////////////////////////////////////

README***

This has only been tested on YACG 2.1 as of this writing.

*********************************************************
Description:
RSS ATOM FEED AGGREGATOR 1.0 allows you to add unlimited RSS blog posts to your YACG-generated pages.
The frontpage (index) will display only the first BLOG feed,
to keep your index page static (only updates frontpage content when the blog submits new content).
The rest of your dynamically-generated pages will randomly display one of your blogs when the page is accessed.
This will help with unique content on those pages that normally pull duplicate content / little information.
Enjoy!

Step 1:
Unzip RSS-YACG.ZIP to your yacg root folder.

Step 2:chmod 777 the following files:
rss_cache.inc
rss_fetch.inc
rss_parse.inc
rss_utils.inc
extlib/Snoopy.class.inc

Step 3:Open config.inc.php and add the following lines:
define('BLOG_1', 'xxxxxxxxxxxxxx.xml'); // BLOG 1 (Front Page) *atom feed
define('BLOG_2', 'xxxxxxxxxxxxxx.xml'); // BLOG 2 (Random Pages) *atom feed
define('BLOG_3', 'xxxxxxxxxxxxxx.xml'); // BLOG 3 (Random Pages) *atom feed
define('BLOG_4', 'xxxxxxxxxxxxxx.xml'); // BLOG 4 (Random Pages) *atom feed

note: you can add as many of these as you'd like, just continue the numbering i.e. BLOG_5, BLOG_6... etc.
note 2: YOU MUST NOT LEAVE ANY OF THESE AS XXXX.XML, or you will get errors. make sure you include atleast 4 blogs!

Step 4:Open template/index.php:

Add the following after "<? table('6') ?>" :

<?php
require_once('rss_fetch.inc');

$rss = fetch_rss( BLOG_1 );
//display latest blog content:
$item = $rss->items[0];
$content = $item['atom_content'];
echo "

Latest Blog Entry:
$content</p>\n";
?>

^^This part adds BLOG_1 to your index page.

Step 5:Open template/page.php:

Add the following after "<? flickr(THIS_PAGE_KEYWORD,"7") ?>":

<?php
require_once('rss_fetch.inc');
$blog = rand(1,4);
switch ($blog) {
case 1:
$blog = BLOG_1;
break;
case 2:
$blog = BLOG_2;
break;
case 3:
$blog = BLOG_3;
break;
case 4:
$blog = BLOG_4;
break;
}
$rss = fetch_rss( $blog );
//display latest blog content:
$item = $rss->items[0];
$content = $item['atom_content'];
echo "

Latest Blog Entry:
$content</p>\n";
?>

^^If you added more BLOG_XXX, add new cases for each of these blogs, *don't forget to set rand(1,XXX) where XXX = the maximum number of BLOG_XXX 's.

Step 6:
If you liked the aggregator, feel free to post a backlink to www.cube3design.com - it'll mean a lot!


Advanced:
To display older posts from a blog, change items[0] to items[1], items[2], etc. My next iteration will allow for multiple blog posts per page, with random alignments and css.


Any questions please post on forums.getyacg.com.
Thanks!

Contributed by Cube 3 Design, LLC on April 1, 2008, at 00:19 AM UTC.

Reactions

No reactions yet.

Rate This Intel

Please login or sign up to rate this intel.

Comments

Please login or sign up to add a comment.

Share

Copyright Notice

The copyright for this content entitled "Yet Another Content Generator" has been specified by the contributor as:

Public Domain

The copyright for this content has been relinquished by the author. The content may be used freely by anyone.

Login Here with
Any Email Address
Any Password
No account? Sign up.

Intel Contributor
This intel was contributed by Cube 3 Design, LLC


Cube 3 Design, LLC

Qondio Archive
May, 2012
123456
78910111213
14151617181920
21222324252627
28293031


2008
January, February, March, April, May, June, July, August, September, October, November, December
2009
January, February, March, April, May, June, July, August, September, October, November, December
2010
January, February, March, April, May, June, July, August, September, October, November, December
2011
January, February, March, April, May, June, July, August, September, October, November, December
2012
January, February, March, April, May

Sign Up
Not a member yet? Qondio is a powerful network for making it online. If you have a website to promote, we can help. Sign up and get in on the action.

About Qondio
Welcome to Qondio! Discover the awesome power this network can deliver by going to our About page. Or you could skip straight to the Sign Up form.

ABOUT
SUCCESS GUIDE
FEATURES
FAQ
ADVERTISE
CONTACT
USAGE POLICY
PRIVACY POLICY


TWITTER
FACEBOOK