Skip to content
Snippets Groups Projects
Commit 08fbcdad authored by Bèr Kessels's avatar Bèr Kessels
Browse files

This module is no longer maintained, HEAD has been removed from CVS. Please...

This module is no longer maintained, HEAD has been removed from CVS. Please look at to Feedparser instead http://drupal.org/project/feedparser
parent d01a99d2
No related branches found
No related tags found
No related merge requests found
Many thanks to Bert Dijkman who did all the hard work.
If you have any questions you can get to the current maintainer: ber@webschuur.com
INSTALL
=========
0. (IMPORTANT) remove the files node_aggregator_convert.php from your root and the module directory if you are not converting from the old aggregator module (IMPORTANT)
1. Delete the aggregator.module from your drupal installation:
rm /my/drupal/dir/modules/import.module
2. Drop the tables in mysql:
DROP TABLE item;
DROP TABLE feed;
DROP TABLE bundle;
3. install the new tables:
mysql -p database < naggregator.mysql
4. Edit your .htaccess. Put a # in fron of this line:
php_value allow_call_time_pass_reference Off
5. Copy the naggregator directory to the modules directory
6. Go to the admin section, then module selector and enable feed and item modules.
The import module is optional.
7. Ensure cron is being called by either by your platform's cron facility or the poormanscron module.
See cron instructions at http://drupal.org/book/view/288
8. Add feeds in 'admin/feed'
9. Optional. Tag feeds with taxonomy terms. All incoming RSS items inherit
the same taxonomy terms as their corrosponding feed.
enjoy!
bje@dijkman.nl / ber@webschuur.com
README for node_aggregator_convert.php
========
This script allows you to update to the node-based aggregator, without losing all old feeds.
1) BACKUP THE OLD DATABASE FIRST!
2) de�stall the old aggregator.module
3) intall the new naggregator.module but DO NOT install the MYSQL tables! yupdate takes care of that.
4) Simply copy the naggregator_convert.php file to your root folder of the drupal installation.
5) Point your browser to: http://example.com/node_aggregator_convert.php
6) IMPORTANT: remove the files naggregator_convert.php from your root and the module directory
7) If you skipped step 6, go back and do that now.
8) update all feeds and import all items by running cron.php
9) If you somehow forgot step six or seven, you should now remove naggregator_convert.php ;)
FEATURES
==========
- creates new database structure for items
- removes all old imported items
- renames old feed table to old_feed
- creates a nodes for each feed
- each node is published, not promoted and has author 1, or superuser.
TODO
==========
- use old bundles to create new taxonomy
- place all appropriate feeds in those taxonomies
BUGS, COMMENTS, QUESTIONS ETC.
================================
Please send to ber@webschuur.com
\ No newline at end of file
README.txt
==========
Previously this module was called node_aggregator.
This is an alternative version of the aggregate module that comes with Drupal.
Read the INSTALL file carefully.
The main advantage of the node_aggregate module suite is that RSS items are stored as first class nodes. That means that they can be promoted to home page, queued, commented upon, etc.
Further, RSS item nodes inherit the taxonomy terms that are assigned
to their corrosponding feed. This rich tagging of items with taxonomy tags creates interesting opportunities for pages consisting of composite feeds from various sites and even composite RSS feeds from multiple sites.
All options you have for nodes (advanced browsing interfaces, permissions, free tagging etcetc) is available for all these items/ You understand that this is a huge advantage over the hardcoded aggregator in core. Ever tried to post an aggregated item on your frontpage? Indeed, that involves a lot of cutting and pasting :)
FEATURES
==========
- Reads RSS 0.9x, 1.0 and 2.0 files
- a block for each feed
- (optional) auto-promotion of news items
BUGS, COMMENTS, QUESTIONS ETC.
================================
Please send to bje@dijkman.nl
Or ber@webschuur.com
This diff is collapsed.
# MySQL dump 8.16
#
# Host: localhost Database: breyten
#--------------------------------------------------------
# Server version 3.23.54
#
# Table structure for table 'feed'
#
CREATE TABLE feed (
nid int(10) unsigned NOT NULL default '0',
url varchar(255) NOT NULL default '',
refresh int(10) NOT NULL default '0',
link varchar(255) NOT NULL default '',
data text,
expire int(10) NOT NULL default '0',
PRIMARY KEY (nid),
KEY link (link),
KEY url (url)
) TYPE=MyISAM;
#
# Dumping data for table 'feed'
#
# MySQL dump 8.16
#
# Host: localhost Database: breyten
#--------------------------------------------------------
# Server version 3.23.54
#
# Table structure for table 'item'
#
CREATE TABLE item (
nid int(10) unsigned NOT NULL default '0',
parent int(10) unsigned NOT NULL default '0',
weight int(10) unsigned NOT NULL default '0',
link varchar(255) default '',
guid varchar(255) default '',
data text,
PRIMARY KEY (nid,parent),
KEY link (link),
KEY guid (guid)
) TYPE=MyISAM;
#
# Dumping data for table 'item'
#
<?
include_once "includes/bootstrap.inc";
include_once "includes/common.inc";
function generate_prepare_feed($feed) {
$node->uid = 1;
$node->type = 'feed';
$node->title = $feed->title;
$node->body = $feed->description;
$node->status = 1;
$node->url = $feed->url;
$node->refresh = $feed->refresh;
$node->link = $feed->link;
$node->promote = 0;
$node->comment = 2;
$node->created = $feed->checked;
$node->changed = $feed->modified;
return $node;
}
db_query("TRUNCATE TABLE `item`");
db_query("ALTER TABLE `item`
CHANGE `iid` `nid` INT( 10 ) DEFAULT '0' NOT NULL ,
CHANGE `fid` `parent` INT( 10 ) DEFAULT '0' NOT NULL,
DROP `author` ,
DROP `description` ,
DROP `timestamp` ,
DROP `attributes`,
ADD `weight` INT( 10 ) DEFAULT '0' NOT NULL AFTER `parent`,
ADD `guid` VARCHAR( 255 ) AFTER `link`,
ADD `data` TEXT AFTER `guid` ,
DROP PRIMARY KEY ,
ADD PRIMARY KEY ( nid, parent ) ,
ADD KEY link( link ) ,
ADD KEY guid( guid )");
db_query("ALTER TABLE `feed` RENAME `old_feed`");
db_query("CREATE TABLE feed (
nid int(10) unsigned NOT NULL default '0',
url varchar(255) NOT NULL default '',
refresh int(10) NOT NULL default '0',
link varchar(255) NOT NULL default '',
data text,
expire int(10) NOT NULL default '0',
PRIMARY KEY (nid),
KEY link (link),
KEY url (url)
) TYPE=MyISAM");
db_query("TRUNCATE TABLE `feed`");
$result = db_query("SELECT * FROM `old_feed`");
while($feed = db_fetch_object($result)){
$node = generate_prepare_feed($feed);
$node->nid = node_save($node);
db_query("INSERT INTO feed (nid, url, refresh, link, expire, data) VALUES(%d, '%s', %d, '%s', %d, '%s')", $node->nid, $node->url, $node->refresh, $node->link, $node->expire, $data);
print "inserted feed ".$nid." : ".$node->title."<br/>\n";
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment