Пример #1
0
function save_prefs_adv_autotag($post)
{
    if (!isset($post['aa_autotag']) && !isset($post['aa_apply_u']) && !isset($post['aa_apply_a'])) {
        return;
    }
    global $prefs;
    foreach ($post['aa_pref'] as $key => $val) {
        if (empty($val['filter']) || empty($val['tag'])) {
            unset($post['aa_pref'][$key]);
        }
    }
    usort($post['aa_pref'], '_cb_prefsort');
    $prefs->set('adv_autotag', array_values($post['aa_pref']));
    $prefs->save();
    // apply?
    if (isset($post['aa_apply_u']) || isset($post['aa_apply_a'])) {
        if (isset($post['aa_apply_u'])) {
            $items = fof_get_items(fof_current_user());
        } else {
            $items = fof_get_items(fof_current_user(), null, 'all');
        }
        foreach ($items as $item) {
            $tags = fof_adv_autotag(null, $item['item_title'], $item['item_content'], $item);
            if (count($tags)) {
                fof_tag_item(fof_current_user(), $item['item_id'], $tags);
            }
        }
    }
}
Пример #2
0
/*
 * This file is part of FEED ON FEEDS - http://feedonfeeds.com/
 *
 * shared.php - display shared items for a user
 *
 *
 * 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";
$result = fof_get_items($fof_user_id, NULL, "unread", NULL, 0, 10);
header("Content-Type: text/html; charset=utf-8");
?>
<!DOCTYPE html>
<html>

   <head>
      <title>Feed on Feeds</title>
	<meta name = "viewport" content = "width=700">

      <link rel="stylesheet" href="fof.css" media="screen" />
      <style>
      .box
      {
          font-family: georgia;
          background: #eee;
Пример #3
0
$url = $prefs->get("sharedurl");
$offset = $prefs->get('tzoffset');
$which = $sharing == "all" ? "all" : "shared";
if (isset($_GET['which'])) {
    $which = $sharing == "all" || $sharing == "all_tagged" ? $_GET['which'] : "shared " . $_GET['which'];
    $extratitle = " items tagged " . $_GET['which'];
} else {
    $extratitle = '';
}
$feed = NULL;
if (isset($_GET['feed'])) {
    $feed = $_GET['feed'];
    $r = fof_db_get_feed_by_id($feed);
    $extratitle .= " from <a href='" . $r['feed_link'] . "'>" . $r['feed_title'] . "</a>";
}
$result = fof_get_items($user, $feed, $which, NULL, 0, 100);
$qv = array('user' => $user, 'which' => isset($_GET['which']) ? $_GET['which'] : NULL, 'feed' => isset($_GET['feed']) ? $_GET['feed'] : NULL);
$baseurl = 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
$shared_feed = fof_url($baseurl, array_merge($qv, array('format' => 'atom')));
$shared_link = fof_url($baseurl, $qv);
if ($format == 'atom') {
    fof_set_content_type('application/atom+xml');
    echo '<?xml version="1.0"?>';
    ?>

<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Feed on Feeds - Shared Items<?php 
    if ($name) {
        echo " from {$name}";
    }
    if ($extratitle) {
Пример #4
0
		<form id="itemform" name="items" action="view-action.php" method="post" onSubmit="return false;">
		<input type="hidden" name="action" />
		<input type="hidden" name="return" />

<?php 
$links = fof_get_nav_links($_GET['feed'], $what, $_GET['when'], $which, $_GET['howmany']);
if ($links) {
    ?>
		<center><?php 
    echo $links;
    ?>
</center>

<?php 
}
$result = fof_get_items(fof_current_user(), $_GET['feed'], $what, $_GET['when'], $which, $_GET['howmany'], $order, $_GET['search']);
$first = true;
foreach ($result as $row) {
    $item_id = $row['item_id'];
    if ($first) {
        print "<script>firstItem = 'i{$item_id}'; </script>";
    }
    $first = false;
    print '<div class="item shown" id="i' . $item_id . '"  onclick="return itemClicked(event)">';
    fof_render_item($row);
    print '</div>';
}
if (count($result) == 0) {
    echo "<p><i>No items found.</i></p>";
}
?>
Пример #5
0
</div>

<?php 
}
?>

<!-- close this form to fix first item! -->
		<form id="itemform" name="items" action="view-action.php" method="post" onSubmit="return false;">
		<input type="hidden" name="action" />
		<input type="hidden" name="return" />

<?php 
$links = fof_get_nav_links($feed, $what, $when, $which, $howmany, $search, $itemcount);
$links = ($links ? '<div class="pagination-nav">' : '') . $links . ($links ? "</div>\n" : '');
echo $links;
$items = fof_get_items(fof_current_user(), $feed, $what, $when, $which, $howmany, $order, $search);
if (!empty($items)) {
    list($first_item) = $items;
    echo "<script>firstItem = 'i" . $first_item['item_id'] . "';</script>\n";
    foreach ($items as $item) {
        fof_render_item($item, true);
    }
} else {
    echo "<p><i>No items found.</i></p>\n";
}
?>
<div id="end-of-items"></div>
		</form>


<?php 
Пример #6
0
    ?>

<?php 
    $links = fof_get_nav_links($_GET['feed'], $_GET['what'], $_GET['when'], $which, $_GET['howmany']);
    if ($links) {
        ?>
		<div class="nav"><?php 
        echo $links;
        ?>
</div>


<?php 
    }
}
$result = fof_get_items($_GET['feed'], $_GET['what'], $_GET['when'], $which, $_GET['howmany']);
foreach ($result as $row) {
    $items = true;
    $feed_link = htmlspecialchars($row['feed_link']);
    $feed_title = htmlspecialchars($row['feed_title']);
    $feed_description = htmlspecialchars($row['feed_description']);
    $item_id = $row['item_id'];
    $item_link = htmlspecialchars($row['item_link']);
    $item_title = htmlspecialchars($row['item_title']);
    $item_content = fof_balanceTags($row['item_content']);
    $item_read = $row['item_read'];
    $timestamp = date("F j, Y, g:i a", $row['timestamp'] - FOF_TIME_OFFSET * 60 * 60);
    $dccreator = $row['dccreator'];
    $dcdate = $row['dcdate'];
    $dcsubject = $row['dcsubject'];
    print '<div class="item">';