* Distributed under the GPL - see LICENSE * */ include_once "fof-main.php"; $items = array(); while (list($key, $val) = each($_POST)) { if ($val == "checked") { $key = substr($key, 1); $items[] = $key; } } /* update a view's sorting settings, removes the view if it matches user's current default */ if (!empty($_POST['view_order'])) { $feed = empty($_POST['view_feed']) ? NULL : $_POST['view_feed']; $what = empty($_POST['view_what']) ? NULL : $_POST['view_what']; $prefs =& FoF_Prefs::instance(); $order = $prefs->get('order'); $tag_ids = fof_db_get_tag_name_map(explode(' ', $what)); $feed_ids = array_filter(array($feed)); $settings = fof_db_view_settings_get(fof_current_user(), $tag_ids, $feed_ids); $settings['order'] = $_POST['view_order']; if ($order == $_POST['view_order']) { /* As there's only one view option currently, just remove view entirely if desired order matches default. */ fof_db_view_expunge(fof_current_user(), $tag_ids, $feed_ids); echo '<span title="Your default sort order has been reinstated for viewing this collection of items.">♥</span>'; } else { fof_db_view_settings_set(fof_current_user(), $tag_ids, $feed_ids, $settings); echo '<span title="The current sort order will now be used for viewing this collection of items.">♥</span>'; } exit; }
function fof_init_plugins() { global $fof_item_filters, $fof_item_prefilters, $fof_tag_prefilters, $fof_plugin_prefs; $fof_item_filters = array(); $fof_item_prefilters = array(); $fof_plugin_prefs = array(); $fof_tag_prefilters = array(); $p =& FoF_Prefs::instance(); $dirlist = opendir(FOF_DIR . "/plugins"); while ($file = readdir($dirlist)) { fof_log("considering " . $file); if (ereg('\\.php$', $file) && !$p->get('plugin_' . substr($file, 0, -4))) { fof_log("including " . $file); include FOF_DIR . "/plugins/" . $file; } } closedir(); }
* This file is part of FEED ON FEEDS - http://feedonfeeds.com/ * * update.php - updates feeds with feedback * * * Copyright (C) 2004-2007 Stephen Minutillo * steve@minutillo.com - http://minutillo.com/steve/ * * Distributed under the GPL - see LICENSE * */ include "header.php"; print "<br>"; $feed = $_GET['feed']; $feeds = array(); $p =& FoF_Prefs::instance(); $admin_prefs = $p->admin_prefs; if ($feed) { $feed = fof_db_get_feed_by_id($feed); $feeds[] = $feed; } else { if ($fof_user_id == 1) { $result = fof_db_get_feeds(); } else { $result = fof_db_get_subscriptions(fof_current_user()); } while ($feed = fof_db_get_row($result)) { if (time() - $feed["feed_cache_date"] < $admin_prefs["manualtimeout"] * 60) { $title = $feed['feed_title']; list($timestamp, ) = fof_nice_time_stamp($feed['feed_cache_date']); print "{$title} was just updated {$timestamp}!<br>";
function fof_init_plugins() { global $fof_item_filters, $fof_item_prefilters, $fof_tag_prefilters, $fof_plugin_prefs, $fof_render_filters; $fof_item_filters = array(); $fof_item_prefilters = array(); $fof_plugin_prefs = array(); $fof_tag_prefilters = array(); $fof_render_filters = array(); $p =& FoF_Prefs::instance(); $plugin_dir = FOF_DIR . DIRECTORY_SEPARATOR . 'plugins'; $active_plugins = array(); $dirlist = opendir($plugin_dir); while (($file = readdir($dirlist)) !== false) { $info = pathinfo($file); if ($info['extension'] !== 'php' || $info['filename'][0] === '.') { continue; } if ($p->get('plugin_' . $info['filename'])) { continue; } $active_plugins[] = $info['filename']; include $plugin_dir . DIRECTORY_SEPARATOR . $file; } closedir($dirlist); fof_log('included plugins: ' . implode(', ', $active_plugins)); }