set('purge', $_POST['purge']); $prefs->set('manualtimeout', $_POST['manualtimeout']); $prefs->set('autotimeout', $_POST['autotimeout']); $prefs->set('logging', !empty($_POST['logging'])); $prefs->set('suggestadd', intval($_POST['suggestadd'])); $prefs->set('topreaders_days', intval($_POST['topreaders_days'])); $prefs->set('topreaders_count', intval($_POST['topreaders_count'])); $prefs->save(); $message[] = 'Saved admin prefs.'; if($prefs->get('logging') && !@fopen("fof.log", 'a')) { $message[] = 'Warning: could not write to log file!'; } } if (isset($_REQUEST['tagfeeds'])) { $allow_prop = array('untag' => 1, 'tag' => 1, 'filter' => 1, 'title' => 1, 'hide' => 1, 'orighide' => 1); foreach ($_REQUEST as $k => $v) { $prop = explode('_', $k); if (count($prop) < 2) continue; list($prop, $feed_id) = $prop; if (empty($allow_prop[$prop])) continue; if (!($feed = fof_db_get_feed_by_id($feed_id))) continue; // remove tags if ($prop == 'untag') { foreach ($v as $tag) { fof_untag_feed(fof_current_user(), $feed_id, $tag); $message[] = 'Dropped \''.$tag.'\' from \''.htmlspecialchars($_REQUEST["title_$feed_id"]).'\''; } } // add tags elseif ($prop == 'tag') { foreach (preg_split("/[\s,]*,[\s,]*/", $v) as $tag) { if ($tag) { fof_tag_feed(fof_current_user(), $feed_id, $tag); $message[] = 'Tagged \''.htmlspecialchars($_REQUEST["title_$feed_id"]).'\' as '.htmlspecialchars($tag); } } } // change filter elseif ($prop == 'filter') { if (fof_db_set_feedprop(fof_current_user(), $feed_id, 'filter', $v)) $message[] = 'Set filter \''.htmlspecialchars($v).'\' for feed \''.htmlspecialchars($_REQUEST["title_$feed_id"]).'\''; } // rename feed else if ($prop == 'title' && $v != $_POST['origtitle_'.$feed_id]) { if ($feed['feed_title'] == $v) $v = ''; if (fof_db_set_feedprop(fof_current_user(), $feed_id, 'feed_title', $v)) { if ($v) $message[] = 'Renamed feed \''.htmlspecialchars($feed['feed_title']).'\' to \''.htmlspecialchars($v).'\''; else $message[] = 'Feed title resetted for \''.htmlspecialchars($feed['feed_title']).'\''; } } // show item content by default else if ($prop == 'hide' && $v && empty($_POST['orighide_'.$feed_id])) { if (fof_db_set_feedprop(fof_current_user(), $feed_id, 'hide_content', true)) $message[] = 'Items of feed \''.htmlspecialchars($_REQUEST["title_$feed_id"]).'\' will be shown collapsed by default'; } // hide item content by default else if ($prop == 'orighide' && $v && empty($_POST['hide_'.$feed_id])) { if (fof_db_set_feedprop(fof_current_user(), $feed_id, 'hide_content', false)) $message[] = 'Items of feed \''.htmlspecialchars($_REQUEST["title_$feed_id"]).'\' will be shown expanded by default'; } } } if (!empty($message)) $message = join('
', $message); if(isset($_POST['prefs'])) { $prefs->set('favicons', isset($_POST['favicons'])); $prefs->set('keyboard', isset($_POST['keyboard'])); $prefs->set('tzoffset', intval($_POST['tzoffset'])); $prefs->set('dst', isset($_POST['dst'])); $prefs->set('howmany', intval($_POST['howmany'])); $prefs->set('order', $_POST['order']); $prefs->set('sharing', $_POST['sharing']); $prefs->set('sharedname', $_POST['sharedname']); $prefs->set('sharedurl', $_POST['sharedurl']); $prefs->save(fof_current_user()); if($_POST['password'] && ($_POST['password'] == $_POST['password2'])) { fof_db_change_password($fof_user_name, $_POST['password']); setcookie ("user_password_hash", md5($_POST['password'] . $fof_user_name), time()+60*60*24*365*10); $message = "Updated password."; } else if($_POST['password'] || $_POST['password2']) { $message = "Passwords do not match!"; } $message .= ' Saved prefs.'; } if(isset($_POST['plugins'])) { foreach(fof_get_plugin_prefs() as $plugin_pref) { $key = $plugin_pref[1]; $prefs->set($key, $_POST[$key]); } $plugins = array(); $dirlist = opendir(FOF_DIR . "/plugins"); while($file=readdir($dirlist)) if(substr($file, -4) == '.php') $plugins[] = substr($file, 0, -4); closedir(); foreach($plugins as $plugin) $prefs->set("plugin_" . $plugin, $_POST[$plugin] != "on"); $prefs->save(fof_current_user()); $message .= ' Saved plugin prefs.'; } if(isset($_POST['changepassword'])) { if($_POST['password'] != $_POST['password2']) { $message = "Passwords do not match!"; } else { $username = $_POST['username']; $password = $_POST['password']; fof_db_change_password($username, $password); $message = "Changed password for $username."; } } if(fof_is_admin() && isset($_POST['adduser']) && $_POST['username'] && $_POST['password']) { $username = $_POST['username']; $password = $_POST['password']; fof_db_add_user($username, $password); $message = "User '$username' added."; } if(fof_is_admin() && isset($_POST['deleteuser']) && $_POST['username']) { $username = $_POST['username']; fof_db_delete_user($username); $message = "User '$username' deleted."; } include("header.php"); ?>


Feed on Feeds - Preferences

Default display order:

Number of items in paged displays:

Display custom feed favicons? get('favicons')) echo "checked=true"; ?> >

Use keyboard shortcuts? get('keyboard')) echo "checked=true";?> >

Time offset in hours: get('dst')) echo "checked=true";?> /> use DST   (UTC time: , local time: get("tzoffset") + ($prefs->get('dst') ? date('I') : 0))*60*60) ?>)

New password: (leave blank to not change)
Repeat new password:

Share items. get('sharing') != "no") echo " (your shared page is here)";?>

Name to be shown on shared page:

URL to be linked on shared page:


Feed on Feeds - Plugin Preferences

get("plugin_" . $plugin)) echo "checked"; ?>> Enable plugin ?

: get($key)) echo "checked" ?>>



Feed on Feeds - Feeds, Tags and Filters

* Check 'Hide' if you want to hide contents of items of the corresponding feed by default.
Click 'Filter' and enter a regular expression to filter out items matching it directly into "already read" state.
Don't forget to Save preferences after making changes :-)

'; else print ''; if($row['feed_image'] && $prefs->get('favicons')) { ?>
Feed Remove tags Add tags
(separate with ,)
Preferences
' width='16' height='16' border='0' />  $tag "; $i++; } } $flt = isset($row['prefs']['filter']) ? htmlspecialchars($row['prefs']['filter']) : ''; ?> /> | Filter

Feed on Feeds - Admin Options

Enable logging? get('logging')) echo "checked" ?> />

Purge read items after days (leave blank to never purge)

Allow automatic feed updates every minutes

Allow manual feed updates every minutes

Show Top readers in last days statistics on the login page

Suggest users to subscribe to most popular feeds


Add User

Username: Password:
1"); $delete_options = ''; while($row = fof_db_get_row($result)) { $username = $row['user_name']; $delete_options .= ""; } if(isset($delete_options)) { ?>

Delete User



Change User's Password

Select user:
New password:
Repeat new password: