Skip to content

Commit 3c94fa2

Browse files
author
steveminutillo
committed
Initial import
0 parents  commit 3c94fa2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+11928
-0
lines changed

LICENSE

+340
Large diffs are not rendered by default.

add-tag.php

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/*
3+
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
4+
*
5+
* add.php - displays form to add a feed
6+
*
7+
*
8+
* Copyright (C) 2004-2007 Stephen Minutillo
9+
* [email protected] - http://minutillo.com/steve/
10+
*
11+
* Distributed under the GPL - see LICENSE
12+
*
13+
*/
14+
ob_start("ob_gzhandler");
15+
16+
header("Content-Type: text/plain; charset=utf-8");
17+
18+
include_once("fof-main.php");
19+
20+
$tag = $_GET['tag'];
21+
$item = $_GET['item'];
22+
$remove = $_GET['remove'];
23+
24+
if($remove == 'true')
25+
{
26+
fof_untag_item(fof_current_user(), $item, $tag);
27+
}
28+
else
29+
{
30+
fof_tag_item(fof_current_user(), $item, $tag);
31+
}
32+
33+
?>

add.php

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
/*
3+
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
4+
*
5+
* add.php - displays form to add a feed
6+
*
7+
*
8+
* Copyright (C) 2004-2007 Stephen Minutillo
9+
* [email protected] - http://minutillo.com/steve/
10+
*
11+
* Distributed under the GPL - see LICENSE
12+
*
13+
*/
14+
15+
include("header.php");
16+
17+
$url = $_POST['rss_url'];
18+
if(!$url) $url = $_GET['rss_url'];
19+
$opml = $_POST['opml_url'];
20+
$file = $_POST['opml_file'];
21+
$feeds = array();
22+
?>
23+
24+
<BR><br>
25+
<form method="post" action="add.php" enctype="multipart/form-data">
26+
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
27+
28+
RSS or weblog URL: <input type="text" name="rss_url" size="40" value="<?php echo $url ?>"><input type="Submit" value="Add a feed"><br><br>
29+
</form>
30+
31+
<form method="post" action="add.php" enctype="multipart/form-data">
32+
OPML URL: <input type="hidden" name="MAX_FILE_SIZE" value="100000">
33+
34+
<input type="text" name="opml_url" size="40" value="<?php echo $opml ?>"><input type="Submit" value="Add feeds from OPML file on the Internet"><br><br>
35+
</form>
36+
37+
<form method="post" action="add.php" enctype="multipart/form-data">
38+
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
39+
OPML filename: <input type="file" name="opml_file" size="40" value="<?php echo $file ?>"><input type="Submit" value="Upload an OPML file">
40+
41+
</form>
42+
43+
<?php
44+
if($url) fof_subscribe(fof_current_user(), $url);
45+
46+
if($opml)
47+
{
48+
if(!$content_array = file($opml))
49+
{
50+
echo "Cannot open $opml<br>";
51+
return false;
52+
}
53+
54+
$content = implode("", $content_array);
55+
56+
$feeds = fof_opml_to_array($content);
57+
}
58+
59+
if($_FILES['opml_file']['tmp_name'])
60+
{
61+
if(!$content_array = file($_FILES['opml_file']['tmp_name']))
62+
{
63+
echo "Cannot open uploaded file<br>";
64+
return false;
65+
}
66+
67+
$content = implode("", $content_array);
68+
69+
$feeds = fof_opml_to_array($content);
70+
}
71+
72+
if(isset($feeds))
73+
{
74+
foreach ($feeds as $feed)
75+
{
76+
fof_subscribe(fof_current_user(), $feed);
77+
echo "<hr size=1>";
78+
flush();
79+
}
80+
}
81+
82+
include("footer.php");
83+
?>

delete.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/*
3+
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
4+
*
5+
* delete.php - deletes a feed and all items
6+
*
7+
*
8+
* Copyright (C) 2004-2007 Stephen Minutillo
9+
* [email protected] - http://minutillo.com/steve/
10+
*
11+
* Distributed under the GPL - see LICENSE
12+
*
13+
*/
14+
15+
include_once("fof-main.php");
16+
17+
$feed = $_GET['feed'];
18+
19+
fof_delete_subscription(fof_current_user(), $feed);
20+
21+
include("header.php");
22+
?>
23+
24+
Deleted.
25+
26+
<?php include("footer.php") ?>

fof-config.php

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/*
3+
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/
4+
*
5+
* config.php - modify this file with your database settings
6+
*
7+
*
8+
* Copyright (C) 2004-2007 Stephen Minutillo
9+
* [email protected] - http://minutillo.com/steve/
10+
*
11+
* Distributed under the GPL - see LICENSE
12+
*
13+
*/
14+
15+
16+
// Difference, in hours, between your server and your local time zone.
17+
18+
define('FOF_TIME_OFFSET', 0);
19+
20+
21+
// Database connection information. Host, username, password, database name.
22+
23+
define('FOF_DB_HOST', "host.example.com");
24+
define('FOF_DB_USER', "username");
25+
define('FOF_DB_PASS', "password");
26+
define('FOF_DB_DBNAME', "database");
27+
28+
29+
// The rest you should not need to change
30+
31+
32+
// How many posts to show by default in paged mode
33+
34+
define('FOF_HOWMANY', 50);
35+
36+
37+
// DB table names
38+
39+
define('FOF_DB_PREFIX', "fof_");
40+
41+
define('FOF_FEED_TABLE', FOF_DB_PREFIX . "feed");
42+
define('FOF_ITEM_TABLE', FOF_DB_PREFIX . "item");
43+
define('FOF_ITEM_TAG_TABLE', FOF_DB_PREFIX . "item_tag");
44+
define('FOF_SUBSCRIPTION_TABLE', FOF_DB_PREFIX . "subscription");
45+
define('FOF_TAG_TABLE', FOF_DB_PREFIX . "tag");
46+
define('FOF_USER_TABLE', FOF_DB_PREFIX . "user");
47+
48+
49+
// Find ourselves and the cache dir
50+
51+
if (!defined('DIR_SEP')) {
52+
define('DIR_SEP', DIRECTORY_SEPARATOR);
53+
}
54+
55+
if (!defined('FOF_DIR')) {
56+
define('FOF_DIR', dirname(__FILE__) . DIR_SEP);
57+
}
58+
59+
?>

0 commit comments

Comments
 (0)