<?php /* * This file is part of FEED ON FEEDS - http://feedonfeeds.com/ * * item.php - renders a single item (useful for Ajax) * * * Copyright (C) 2004-2007 Stephen Minutillo * steve@minutillo.com - http://minutillo.com/steve/ * * Distributed under the GPL - see LICENSE * */ include_once "fof-main.php"; include_once "fof-render.php"; fof_set_content_type(); $row = fof_get_item(fof_current_user(), $_GET['id']); fof_render_item($row);
if (empty($_POST['feed'])) { header('Status: 400 Bad Request'); echo 'Incomplete data.'; exit; } $tag = $_POST['subscription_tag']; $feed_id = $_POST['feed']; if (!empty($_POST['delete'])) { fof_untag_feed(fof_current_user(), $feed_id, $tag); } else { fof_tag_feed(fof_current_user(), $feed_id, $tag); } exit; } /** Serve out an SVG image showing a feed's activity history. */ if (!empty($_GET['feed_history'])) { include_once 'classes/svghistogram.php'; fof_set_content_type('image/svg+xml'); $history = fof_db_feed_history($_GET['feed_history']); $options = array('title' => 'Feed History', 'description' => 'Items added to feed.', 'min_items' => max(31, $fof_prefs_obj->admin_prefs['purge'] + 7), 'max_items' => 366, 'label_zero' => '↑ today', 'label_x' => 'days ago →'); if (!empty($fof_prefs_obj->admin_prefs['purge'])) { $options['shade_over'] = $fof_prefs_obj->admin_prefs['purge']; $options['max_items'] = min($options['max_items'], ceil($fof_prefs_obj->admin_prefs['purge'] * SVGHistogram::PHI)); } $graph = new SVGHistogram($options); $graph->render($history); exit; } header('Status: 400 Bad Request'); echo 'Unknown request.';