TorrentFlux.com Hey, OppTupacShakur, you have 11 messages, 0 are new.
06-27-2007, 12:47:24
Home Help Search Profile Logout donate chat
News:


+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  RSS Hack
« previous next »
Pages: 1 2 [All] Go Down Reply Notify of replies Send this topic Print
Author Topic: RSS Hack  (Read 4484 times)
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« on: 05-12-2006, 18:46:51 » Reply with quote

I wrote a little hack to the RSS system that tf is using.
It's not complete. Hopefully this weekend i will be able to finish up.
Here is a hint:

Report to moderator   Logged
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #1 on: 05-14-2006, 15:56:45 » Reply with quote

Finish up the new rss system... hopefully without any bugs.

The new system uses feed on feeds as base and store every rss on db.
The user can mark the rss as read or unread.
The updates are done on a crontab or the admin can do it.

Two new tables:

-- Table "tf_rss_item" DDL

CREATE TABLE `tf_rss_item` (
  `id` int(11) NOT NULL auto_increment,
  `feed_id` int(11) NOT NULL default '0',
  `link` text,
  `title` varchar(250) default NULL,
  `content` text,
  `dcdate` text,
  `dccreator` text,
  `dcsubject` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM ;

and

-- Table "tf_rss_item_read" DDL

CREATE TABLE `tf_rss_item_read` (
  `id` int(11) NOT NULL auto_increment,
  `uid` int(10) NOT NULL default '0',
  `item_id` int(11) NOT NULL default '0',
  `timestamp` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `read` tinyint(4) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM ;

And some changes on tf_rss

-- Table "tf_rss"

CREATE TABLE `tf_rss` (
  `rid` int(10) NOT NULL auto_increment,
  `url` varchar(255) NOT NULL default '',
  `title` varchar(250) NOT NULL default '',
  `link` varchar(250) default NULL,
  `description` varchar(250) default NULL,
  PRIMARY KEY  (`rid`)
) ENGINE=MyISAM ;

I have created a new update21_new_rss.php but haven't test it... sorry :|

The crontab is run as you like. For example,

20 * * * * /usr/bin/php /path/to/updaterss.php


any bugs let me know.

thk

fulgas

http://rapidshare.de/files/20464582/torrentflux_2.1_new_RSS.tar.gz.html
« Last Edit: 05-14-2006, 17:41:40 by fulgas » Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #2 on: 05-14-2006, 16:24:28 » Reply with quote

Looks sweet enough. Now all we have to do is work in the RSSAD code for matching torrents and we have a winner Smiley
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #3 on: 05-14-2006, 16:54:31 » Reply with quote

humm... haven't check RSSAD but if it what i'm think i could be simple to add...

Does it match a torrent and added to dl or smth like that ?

Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #4 on: 05-14-2006, 17:02:01 » Reply with quote

The second table doesn't work with mysql 4 it seems. Removing the trigger lets it go in though I haven't figure out the effect it'll have yet as I'm still diffing the php files to get this into my version.

You really should have done diff's or similiar yourself instead of just uploading the whole dir.

RSSAD scans the feeds and adds matching torrents to TF that match. I tend to get too many positives so what I've been looking at doing it having the same matching just display in the feeds, stored like you have so that I can view whenever and pick the torrent I want. s
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #5 on: 05-14-2006, 17:21:51 » Reply with quote

humm
i could make a diff not problem on that Smiley

RSSAD seems a filter then... humm from i have done i can say it seems easy to add... got to look into it...

I'm using mysql mysql  Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i386) so it should work.. Smiley

http://rapidshare.de/files/20471400/newrss.patch.html
Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #6 on: 05-14-2006, 17:31:41 » Reply with quote

Cool thanks for the patch. Helping me find whats needed.

Have you modified the layout of tf_rss? One query is looking for tf_rss.title which isn't in the default 2.1 install.
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #7 on: 05-14-2006, 17:33:44 » Reply with quote

that only returns a title nothing more Smiley

the layout is the same or not Cheesy can't remember... ehehe

but it should be the same only removed the border=1... not very fond of border... like tables to make borders and other effects...

Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #8 on: 05-14-2006, 17:37:29 » Reply with quote

Looking at some of these queries you seem to have really changes the tf_rss table so can you do a dump of it's structure and post it up please?
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #9 on: 05-14-2006, 17:41:12 » Reply with quote

yah... sorry about that.... i did change the tf_rss table :|



-- Table "tf_rss"

CREATE TABLE `tf_rss` (
  `rid` int(10) NOT NULL auto_increment,
  `url` varchar(255) NOT NULL default '',
  `title` varchar(250) NOT NULL default '',
  `link` varchar(250) default NULL,
  `description` varchar(250) default NULL,
  PRIMARY KEY  (`rid`)
) ENGINE=MyISAM ;


let me know if any bugs ... will try to integrate the RSSAD so that it can filter the rss to add to tf...

Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #10 on: 05-14-2006, 18:14:10 » Reply with quote

Right have it up and working now. Looking pretty nice. Few suggestions for changes to make in your version which I've just made.

Age, Title with Capitol latters on the begining Smiley
The title link opens in a new window
One of my feeds seems to add a \n on each line even though it's not read as a new line. Cause an n to be at the front of every line in the drop down details. Following was added to ScrubDescription, top line

Code:
$desc = str_replace('\n', "", $desc);

Other than that is seems to be working perfectly so far.
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Anglachel
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 35



View Profile Personal Message (Offline)
« Reply #11 on: 05-23-2006, 21:56:22 » Reply with quote

Following was added to ScrubDescription, top line

Code:
$desc = str_replace('\n', "", $desc);

Other than that is seems to be working perfectly so far.

Got it up and working did $desc = str_replace('\n', "<BR>", $desc); though so I would actually be able to see the line breaks, makes reading lists put into RSS feeds so much easier.
Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #12 on: 05-24-2006, 03:11:52 » Reply with quote

I can still see line breaks on my feeds, well at least of them. The other I use tend to only have one line of detail per torrent. Can you pm me the rss link and I'll take a look?
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
fulgas
Newbie
*
Offline Offline

Posts: 8



View Profile Personal Message (Offline)
« Reply #13 on: 05-25-2006, 10:01:08 » Reply with quote

I'm won't be developing anymore on this hack but if bugs occurs let me know.

I have found what i've been lookin' for. Smiley

don't wanna spam but it does the job i was lookin' for Smiley a C++ bt client with www ui Smiley

Let me know if any bugs occurs. Smiley

fulgas
Report to moderator   Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #14 on: 05-25-2006, 11:05:26 » Reply with quote

I'm won't be developing anymore on this hack but if bugs occurs let me know.

I have found what i've been lookin' for. Smiley

don't wanna spam but it does the job i was lookin' for Smiley a C++ bt client with www ui Smiley

Let me know if any bugs occurs. Smiley

fulgas

No worries. Thanks for the work you've done though.
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
phatback
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 3



View Profile Email Personal Message (Offline)
« Reply #15 on: 08-01-2006, 20:52:46 » Reply with quote

dead link repost?
Report to moderator   Logged
abadaba
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 18



View Profile Personal Message (Offline)
« Reply #16 on: 08-20-2006, 10:38:24 » Reply with quote

Hrrrm can someone REUP? Rapid says the file has been deleted  Undecided
Report to moderator   Logged
Delusion
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 8



View Profile Personal Message (Offline)
« Reply #17 on: 10-23-2006, 19:47:53 » Reply with quote

anyone can reupload or pase the code of the new rss file here please Smiley
using attchaments for storage would be nice.

seems like a really nice hack.

thanks.
« Last Edit: 10-24-2006, 16:58:44 by Delusion » Report to moderator   Logged
somlioy
Newbie
*
Offline Offline

Posts: 7



View Profile Personal Message (Offline)
« Reply #18 on: 02-07-2007, 18:56:58 » Reply with quote

Bump, can someone upload or past the code here Cheesy  TF Love
Report to moderator   Logged
jav
Newbie
*
Offline Offline

Posts: 15



View Profile Personal Message (Offline)
« Reply #19 on: 02-25-2007, 14:31:01 » Reply with quote

Some one please post source, I'd like to do an autodownloader, and woudldn't want to reinvent the wheel Wink
Report to moderator   Logged

Gentoo Linux
Lighttpd
PostgreeSQL
Torrentflux 2.1
total pwnage
morsub4u
Newbie
*
Offline Offline

Posts: 40

morsub4u



View Profile Personal Message (Offline)
« Reply #20 on: 03-21-2007, 15:07:16 » Reply with quote

does anyone have this php file?  The link is dead (as has been posted previously).  Please up it somewhere if you have it.  Thanks!
Report to moderator   Logged

Linux distrobution - Mandrake 10.2 (3.4.3-3mdk)
TorrentFlux version - 2.3
Python version - 2.4
PHP Version - 4.3.10
BitTornado Version - 0.3.13
Webserver software and version - Apache 2.0
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile Personal Message (Offline)
« Reply #21 on: 05-28-2007, 18:16:35 » Reply with quote

http://www.redbrick.dcu.ie/~ryaner/web/drop/tor.tar

That is a tar of my own personal install with the rss hack in it. Be warned that this is an old version [2.1]. I haven't time to go through the code myself and pull out the parts the do that hack but that should hopefully help someone.
Report to moderator   Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Pages: 1 2 [All] Go Up Reply Notify of replies Send this topic Print 
« previous next »
Jump to:  


Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP