function generate_breadcrumb_admin($level, $id = 0)
{
    switch ($level) {
        case 'collections':
            $breadcrumbs = '<strong>' . plog_tr('Collections') . '</strong>';
            break;
        case 'albums':
            $collection = get_collection_by_id($id);
            $collection_name = SmartStripSlashes($collection['name']);
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; <strong>' . $collection_name . '</strong>';
            break;
        case 'pictures':
            $album = get_album_by_id($id);
            $album_link = SmartStripSlashes($album['name']);
            $collection_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=albums&amp;id=' . $album['parent_id'] . '">' . SmartStripSlashes($album['collection_name']) . '</a>';
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . '<strong>' . $album_link . '</strong>';
            break;
        case 'comments':
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "pictures` WHERE `id`='" . $id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $picture_link = '<strong>' . SmartStripSlashes(basename($row['path'])) . '</strong>';
            $album_id = $row['parent_album'];
            $collection_id = $row['parent_collection'];
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "albums` WHERE `id`='" . $album_id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $album_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=pictures&amp;id=' . $album_id . '">' . SmartStripSlashes($row['name']) . '</a>';
            $query = "SELECT * FROM `" . PLOGGER_TABLE_PREFIX . "collections` WHERE `id`='" . $collection_id . "'";
            $result = run_query($query);
            $row = mysql_fetch_assoc($result);
            $collection_link = '<a href="' . $_SERVER['PHP_SELF'] . '?level=albums&amp;id=' . $collection_id . '">' . SmartStripSlashes($row['name']) . '</a>';
            $breadcrumbs = '<a href="' . $_SERVER['PHP_SELF'] . '">' . plog_tr('Collections') . '</a> &raquo; ' . $collection_link . ' &raquo; ' . $album_link . ' &raquo; ' . $picture_link . ' - ' . '<strong>' . plog_tr('Comments') . ':</strong>';
            break;
        default:
            $breadcrumbs = '<strong>' . plog_tr('Collections') . '</strong>';
    }
    return "\n\t\t" . '<div id="breadcrumb_links">' . $breadcrumbs . '</div>';
}
Beispiel #2
0
function generate_title()
{
    switch ($GLOBALS['plogger_level']) {
        case 'collection':
            $row = get_collection_by_id($GLOBALS['plogger_id']);
            $breadcrumbs = SmartStripSlashes($row["name"]);
            if ($GLOBALS['plogger_mode'] == "slideshow") {
                $breadcrumbs .= ' &raquo; Slideshow';
            }
            break;
        case 'slideshow':
        case 'album':
            $row = get_album_by_id($GLOBALS['plogger_id']);
            $album_name = SmartStripSlashes($row["name"]);
            $row = get_collection_by_id($row["parent_id"]);
            if ($GLOBALS['plogger_mode'] == "slideshow") {
                $breadcrumbs = SmartStripSlashes($row["name"]) . ' &raquo; ' . $album_name . ' &raquo; ' . ' Slideshow';
            } else {
                $breadcrumbs = SmartStripSlashes($row["name"]) . ' &raquo; ' . $album_name;
            }
            break;
        case 'picture':
            $row = get_picture_by_id($GLOBALS['plogger_id']);
            $picture_name = basename($row["path"]);
            $row = get_album_by_id($row["parent_album"]);
            $album_name = SmartStripSlashes($row["name"]);
            $row = get_collection_by_id($row["parent_id"]);
            $collection_name = SmartStripSlashes($row["name"]);
            $breadcrumbs = $collection_name . ' &raquo; ' . $album_name . ' &raquo; ' . $picture_name;
            if ($GLOBALS['plogger_mode'] == "slideshow") {
                $breadcrumbs .= ' &raquo; Slideshow';
            }
            break;
        default:
            $breadcrumbs = ' Collections';
    }
    return $breadcrumbs;
}
function plog_edit_collection_form($collection_id)
{
    global $thumbnail_config;
    $output = '';
    $collection_id = intval($collection_id);
    $output .= '<form class="edit" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
    $collection = get_collection_by_id($collection_id);
    $auto_graphic = "../graphics/auto.gif";
    $images = '<option class="thumboption" value="0" style="padding-left: 100px; background-image: url(' . $auto_graphic . '); background-repeat: no-repeat;">' . plog_tr('automatic') . '</option>';
    // create a list of all pictures in the collection. Should I create a separate
    // function for this as well?
    $sql = "SELECT p.id AS id,caption,p.path AS path,a.name AS album_name\r\n\t\t\tFROM " . TABLE_PREFIX . "pictures p\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "albums AS a ON p.parent_album = a.id\r\n\t\t\tWHERE p.parent_collection = '" . $collection_id . "'\r\n\t\t\tORDER BY a.name,p.date_submitted";
    $result = run_query($sql);
    while ($row = mysql_fetch_assoc($result)) {
        $selected = $row["id"] == $collection["thumbnail_id"] ? " selected" : "";
        $style = 'class="thumboption" style="padding-left: ' . ($thumbnail_config[THUMB_SMALL]["size"] + 5) . 'px; background-image: url(' . generate_thumb(SmartStripSlashes($row["path"]), $row["id"]) . '); background-repeat: no-repeat;"';
        $images .= "<option {$style} value='" . $row["id"] . "'" . $selected . ">";
        $images .= SmartStripSlashes($row["album_name"]) . " : ";
        $images .= !empty($row["caption"]) ? SmartStripSlashes($row["caption"]) : SmartStripSlashes(basename($row["path"]));
        $images .= "</option>\n";
    }
    $output .= '<label accesskey="n" for="name"><em>N</em>ame:</label><br/><input size="30" name="name" id="name" value="' . SmartStripSlashes($collection['name']) . '"><br/>
				    <label accesskey="d" for="description"><em>D</em>escription:</label><br/><input size="80" name="description" id="description" value="' . SmartStripSlashes($collection['description']) . '"><br/>
				    Thumbnail:<br/><select name="thumbnail_id" onchange="updateThumbPreview(this)" 
				    class="thumbselect" id="thumbselect">' . $images . '</select>
				    <script type="text/javascript">updateThumbPreview(document.getElementById(\'thumbselect\'));</script>';
    $output .= '<input type="hidden" name="pid" value="' . $collection_id . '">
					<input type="hidden" name="action" value="update-collection">
					<button class="submit" type="submit">' . plog_tr('Update') . '</button>';
    $output .= '</form>';
    return $output;
}
Beispiel #4
0
                    $limitType = "pictures";
                } else {
                    if (!empty($_GET["comments"])) {
                        $limitType = "comments";
                    } else {
                        $limit = 0;
                        $limitType = '';
                    }
                }
            }
        }
    }
}
if (isset($_GET["collections"]) || isset($_GET["albums"]) || isset($_GET["pictures"]) || isset($_GET["comments"]) || isset($_GET["collection_id"]) || isset($_GET["album_id"]) || isset($_GET["picture_id"]) || isset($_GET["comment_id"])) {
    if (isset($_GET["collection_id"])) {
        $collections = array(get_collection_by_id($_GET["collection_id"]));
    } else {
        if (isset($_GET["collections"])) {
            $collections = get_collections("mod", "DESC");
        } else {
            if (isset($_GET["albums"]) || isset($_GET["album_id"]) || isset($_GET["pictures"]) || isset($_GET["picture_id"]) || isset($_GET["comments"]) || isset($_GET["comment_id"])) {
                $collections = get_collection_ids("mod", "DESC");
            } else {
                $collections = array();
            }
        }
    }
    // $total counts the number of items that are being limited that have been returned.
    // When total equals the limit, we're done.
    $total = 0;
    foreach ($collections as $collection) {
Beispiel #5
0
function plogger_generate_seo_meta_tags()
{
    global $config;
    switch ($GLOBALS['plogger_level']) {
        case 'collection':
            $collection_info = get_collection_by_id($GLOBALS['plogger_id']);
            $keyword = $collection_info['name'];
            $description = $collection_info['description'];
            break;
        case 'album':
            $album_info = get_album_by_id($GLOBALS['plogger_id']);
            $keyword = $album_info['name'];
            $description = $album_info['description'];
            break;
        case 'picture':
            $picture_info = get_picture_by_id($GLOBALS['plogger_id']);
            if (!empty($picture_info['caption'])) {
                $keyword = $picture_info['caption'];
            } else {
                $keyword = basename($picture_info['path']);
            }
            $description = $picture_info['description'];
            break;
        case 'search':
            $keyword = isset($_REQUEST['searchterms']) ? str_replace(' ', ',', $_REQUEST['searchterms']) : '';
            $description = plog_tr('Search results from ') . $config['gallery_name'];
            break;
        default:
            $keyword = SmartStripSlashes($config['gallery_name']);
            // used on gallery entry page
            $description = plog_tr('This is ') . $config['gallery_name'];
            // used on gallery entry page
            break;
    }
    return "\t" . '<meta name="keywords" content="' . htmlspecialchars($keyword) . '" />
	<meta name="description" content="' . htmlspecialchars($description) . '" />' . "\n";
}
Beispiel #6
0
<?php

$head = array('body_class' => 'feed-importer primary', 'title' => 'Feed Importer -- new', 'content_class' => 'horizontal-nav');
head($head);
$collection = get_collection_by_id($feedimporter_feed->collection_id);
$importTable = get_db()->getTable('FeedImporter_Import');
$lastImport = $importTable->getMostRecentImportForFeedId($feedimporter_feed->id);
?>


<div id="primary">

<?php 
echo flash();
?>
<table>
	<thead>
		<tr>
			<th>Id</th>
			<th>Feed Name</th>
			<th>Feed Description</th>
			<th>Collection</th> <!-- Link to the collection -->
			<th>Items Imported</th> <!--# of items, with link to list of items -->
			<th>Last Import</th>
			<th>Import Status</th> <!-- Show the status of the import -->
			<th>Import Now?</th>
			<th>Edit?</th> <!-- Link to the edit view -->
			<th>History</th>
		</tr>
	</thead>
	<tbody>
function plog_edit_collection_form($collection_id)
{
    global $config, $thumbnail_config;
    $output = '';
    $collection_id = intval($collection_id);
    $output .= "\n\t\t" . '<form class="edit width-700" action="' . $_SERVER['PHP_SELF'] . '" method="post">';
    $collection = get_collection_by_id($collection_id);
    $auto_graphic = $config['gallery_url'] . 'plog-admin/images/auto.gif';
    $images = "\n\t\t\t\t\t" . '<option class="thumboption" value="0" style="padding-left: 100px; background-image: url(' . $auto_graphic . ');">' . plog_tr('automatic') . '</option>';
    // Create a list of all pictures in the collection. Should I create a separate function for this as well?
    $sql = "SELECT p.id AS id, caption, p.path AS path, a.name AS album_name\n\t\t\tFROM " . PLOGGER_TABLE_PREFIX . "pictures p\n\t\t\tLEFT JOIN " . PLOGGER_TABLE_PREFIX . "albums AS a ON p.parent_album = a.id\n\t\t\tWHERE p.parent_collection = '" . $collection_id . "'\n\t\t\tORDER BY a.name, p.date_submitted";
    $result = run_query($sql);
    while ($row = $result->fetch()) {
        $selected = $row['id'] == $collection['thumbnail_id'] ? ' selected="selected"' : '';
        $style = 'class="thumboption" style="padding-left: ' . ($thumbnail_config[THUMB_SMALL]['size'] + 5) . 'px; background-image: url(' . generate_thumb(SmartStripSlashes($row['path']), $row['id']) . ');"';
        $images .= "\n\t\t\t\t\t" . '<option ' . $style . ' value="' . $row['id'] . '"' . $selected . '>';
        $images .= SmartStripSlashes($row['album_name']) . ": ";
        $images .= !empty($row['caption']) ? SmartStripSlashes($row['caption']) : SmartStripSlashes(basename($row['path']));
        $images .= "</option>";
    }
    $output .= "\n\t\t\t" . '<div>
				<div class="strong">' . plog_tr('Edit Collection Properties') . '</div>
				<p>
					<label class="strong" accesskey="n" for="name">' . plog_tr('<em>N</em>ame') . ':</label><br />
					<input size="68" name="name" id="name" value="' . htmlspecialchars(SmartStripSlashes($collection['name'])) . '" />
				</p>
				<p>
					<label class="strong" accesskey="d" for="description">' . plog_tr('<em>D</em>escription') . ':</label><br />
					<input size="68" name="description" id="description" value="' . htmlspecialchars(SmartStripSlashes($collection['description'])) . '" />
				</p>
				<p>
					<span class="strong">Thumbnail:</span><br />
					<select name="thumbnail_id" onchange="updateThumbPreview(this)" class="thumbselect width-500" id="thumbselect">' . $images . '
					</select>
					<script type="text/javascript">updateThumbPreview(document.getElementById(\'thumbselect\'));</script>
				</p>
				<input type="hidden" name="pid" value="' . $collection_id . '" />
				<input type="hidden" name="action" value="update-collection" />
				<input class="submit" name="update" value="' . plog_tr('Update') . '" type="submit" />
				<input class="submit-cancel" name="cancel" value="' . plog_tr('Cancel') . '" type="submit" />
			</div>
		</form>' . "\n";
    return $output;
}
Beispiel #8
0
                    $limitType = 'pictures';
                } else {
                    if (!empty($_GET['comments'])) {
                        $limitType = 'comments';
                    } else {
                        $limit = 0;
                        $limitType = '';
                    }
                }
            }
        }
    }
}
if (isset($_GET['collections']) || isset($_GET['albums']) || isset($_GET['pictures']) || isset($_GET['comments']) || isset($_GET['collection_id']) || isset($_GET['album_id']) || isset($_GET['picture_id']) || isset($_GET['comment_id'])) {
    if (isset($_GET['collection_id'])) {
        $collections = array(get_collection_by_id($_GET['collection_id']));
    } else {
        if (isset($_GET['collections'])) {
            $collections = get_collections('mod', 'DESC');
        } else {
            if (isset($_GET['albums']) || isset($_GET['album_id']) || isset($_GET['pictures']) || isset($_GET['picture_id']) || isset($_GET['comments']) || isset($_GET['comment_id'])) {
                $collections = get_collection_ids('mod', 'DESC');
            } else {
                $collections = array();
            }
        }
    }
    // $total counts the number of items that are being limited that have been returned.
    // When total equals the limit, we're done.
    $total = 0;
    foreach ($collections as $collection) {
Beispiel #9
0
function generate_RSS_feed($level, $id, $search = '')
{
    global $config;
    $config['feed_title'] = SmartStripSlashes($config['feed_title']);
    // remove plog-rss from the end, if present .. is there a better way to determine the full url?
    $is_rss = strpos($config['baseurl'], 'plog-rss.php');
    if ($is_rss !== false) {
        $config['baseurl'] = substr($config['baseurl'], 0, $is_rss);
    }
    if (!empty($search)) {
        $level = 'search';
    }
    // Aggregate feed of all albums with collection specified by id
    if ($level == 'collection') {
        if ($config['feed_content'] == 0) {
            plogger_init_albums(array('collection_id' => $id, 'sortby' => 'id', 'sortdir' => 'DESC', 'from' => 0, 'limit' => $config['feed_num_entries']));
        } else {
            plogger_init_pictures(array('type' => 'collection', 'value' => $id, 'limit' => $config['feed_num_entries'], 'sortby' => 'id'));
        }
        $collection = get_collection_by_id($id);
        $config['feed_title'] .= ': ' . $collection['name'];
    } else {
        if ($level == 'album') {
            plogger_init_pictures(array('type' => 'album', 'value' => $id, 'limit' => $config['feed_num_entries'], 'sortby' => 'id'));
            $album = get_album_by_id($id);
            $config['feed_title'] .= ': ' . $album['album_name'];
        } else {
            if ($level == 'picture') {
                plogger_init_picture(array('id' => $id, 'comments' => 'DESC'));
                $picture = get_picture_by_id($id);
                $config['feed_title'] .= ': ' . basename($picture['path']);
            } else {
                if ($level == 'search') {
                    plogger_init_search(array('searchterms' => $search, 'limit' => $config['feed_num_entries']));
                } else {
                    if ($level == 'collections' or $level == '') {
                        plogger_init_albums(array('collection_id' => -1, 'sortby' => 'id', 'sortdir' => 'DESC', 'from' => 0, 'limit' => $config['feed_num_entries']));
                        $config['feed_title'] .= ': ' . plog_tr('Entire Gallery');
                    }
                }
            }
        }
    }
    // generate RSS header
    $rssFeed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
    $rssFeed .= "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:media=\"http://search.yahoo.com/mrss/\">\n";
    $rssFeed .= "<channel>\n";
    $rssFeed .= "<title>" . $config['feed_title'] . "</title>\n";
    $rssFeed .= "<description>" . plog_tr('Plogger RSS Feed') . "</description>\n";
    $rssFeed .= "<language>" . $GLOBALS['locale'] . "</language>\n";
    $rssFeed .= "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";
    $rssFeed .= "<generator>Plogger</generator>\n";
    $rssFeed .= "<link>" . $config['gallery_url'] . "</link>\n";
    $rssFeed .= "<atom:link href=\"http://" . $_SERVER['HTTP_HOST'] . str_replace('&', '&amp;', $_SERVER['REQUEST_URI']) . "\" rel=\"self\" type=\"application/rss+xml\" />\n";
    $header = 1;
    while (plogger_has_albums()) {
        plogger_load_album();
        if ($header) {
            $submitdate = date('D, d M Y H:i:s O');
            $rssFeed .= "<pubDate>" . $submitdate . "</pubDate>\n";
            $rssFeed .= "<lastBuildDate>" . $submitdate . "</lastBuildDate>\n";
            $header = 0;
        }
        $sql = "SELECT UNIX_TIMESTAMP(`date_modified`) AS `pubdate` FROM `" . PLOGGER_TABLE_PREFIX . "pictures` WHERE `parent_album` = '" . plogger_get_album_id() . "' ORDER BY `date_modified` DESC LIMIT 1";
        $result = run_query($sql);
        $row = mysqli_fetch_assoc($result);
        $pubdate = date('D, d M Y H:i:s O', $row['pubdate']);
        $title = plogger_get_album_name();
        $num = plogger_album_picture_count();
        $num_pictures = $num == 1 ? plog_tr('image') : plog_tr('images');
        $pagelink = plogger_get_album_url();
        $thumbpath = str_replace(array('%2F', '%3A'), array('/', ':'), rawurlencode(plogger_get_album_thumb()));
        $descript = '&lt;p&gt;&lt;a href="' . $pagelink . '"
		title="' . $title . '"&gt;
		&lt;img src="' . $thumbpath . '" alt="' . $title . '" style="border: 2px solid #000;" /&gt;
		&lt;/a&gt;&lt;/p&gt;&lt;p&gt;' . $title . ' (' . $num . ' ' . $num_pictures . ')&lt;/p&gt;&lt;p&gt;' . htmlspecialchars(plogger_get_album_description()) . '&lt;/p&gt;';
        $rssFeed .= "<item>\n";
        $rssFeed .= "\t<pubDate>" . $pubdate . "</pubDate>\n";
        $rssFeed .= "\t<title>" . $title . "</title>\n";
        $rssFeed .= "\t<link>" . $pagelink . "</link>\n";
        $rssFeed .= "\t<description>" . $descript . "</description>\n";
        $rssFeed .= "\t<guid isPermaLink=\"false\">" . $thumbpath . "</guid>\n";
        $rssFeed .= "\t<media:content url=\"" . $thumbpath . "\" type=\"image/jpeg\" />\n";
        $rssFeed .= "\t<media:title>" . $title . "</media:title>\n";
        $rssFeed .= "</item>\n";
    }
    while (plogger_has_pictures()) {
        plogger_load_picture();
        // If at picture level, check to make sure it has comments first
        if ($level != 'picture' || plogger_picture_has_comments()) {
            if ($header) {
                $submitdate = plogger_get_picture_date('D, d M Y H:i:s O', 1);
                $takendate = plogger_get_picture_date();
                $rssFeed .= "<pubDate>" . $submitdate . "</pubDate>\n";
                $rssFeed .= "<lastBuildDate>" . $submitdate . "</lastBuildDate>\n";
                $header = 0;
            }
            $rssFeed .= "<item>\n";
            if ($config['allow_fullpic']) {
                $urlPath = str_replace(array('%2F', '%3A'), array('/', ':'), rawurlencode(plogger_get_source_picture_url()));
            } else {
                $urlPath = str_replace(array('%2F', '%3A'), array('/', ':'), rawurlencode(plogger_get_picture_thumb(THUMB_LARGE)));
            }
            $caption = plogger_get_picture_caption();
            $thumbpath = plogger_get_picture_thumb(THUMB_RSS);
            $pagelink = plogger_get_picture_url();
            if ($caption == '' || $caption == '&nbsp;') {
                $caption = plog_tr('New Image (no caption)');
            }
            $caption .= ' - ' . $takendate;
            $descript = '&lt;p&gt;&lt;a href="' . $pagelink . '"
			title="' . $caption . '"&gt;
			&lt;img src="' . $thumbpath . '" alt="' . $caption . '" style="border: 2px solid #000;" /&gt;
			&lt;/a&gt;&lt;/p&gt;&lt;p&gt;' . $caption . '&lt;/p&gt;';
            $descript .= '&lt;p&gt;' . htmlspecialchars(plogger_get_picture_description()) . '&lt;/p&gt;';
            $rssFeed .= "\t<pubDate>" . $submitdate . "</pubDate>\n";
            $rssFeed .= "\t<title>" . $caption . "</title>\n";
            $rssFeed .= "\t<link>" . $pagelink . "</link>\n";
            $rssFeed .= "\t<description>" . $descript . "</description>\n";
            $rssFeed .= "\t<guid isPermaLink=\"false\">" . $thumbpath . "</guid>\n";
            $rssFeed .= "\t<media:content url=\"" . $urlPath . "\" type=\"image/jpeg\" />\n";
            $rssFeed .= "\t<media:title>" . $caption . "</media:title>\n";
            $rssFeed .= "</item>\n";
            if ($level == 'picture') {
                while (plogger_picture_has_comments()) {
                    plogger_load_comment();
                    $rssFeed .= "<item>\n";
                    $rssFeed .= "\t<pubDate>" . plogger_get_comment_date('D, d M Y H:i:s O') . "</pubDate>\n";
                    $rssFeed .= "\t<title>Comment by " . plogger_get_comment_author() . "</title>\n";
                    $rssFeed .= "\t<link>" . $pagelink . "</link>\n";
                    $rssFeed .= "\t<description>" . plogger_get_comment_text() . "</description>\n";
                    $rssFeed .= "\t<guid isPermaLink=\"true\">" . $pagelink . "#Comment-" . plogger_get_comment_id() . "</guid>\n";
                    $rssFeed .= "</item>\n";
                }
            }
        }
    }
    $rssFeed .= "</channel>\n</rss>";
    echo $rssFeed;
}
Beispiel #10
0
function generate_RSS_feed($level, $id, $search = "")
{
    global $config;
    $config["feed_title"] = SmartStripSlashes($config["feed_title"]);
    if (!empty($search)) {
        $level = "search";
    }
    if ($level == "collection") {
        // aggregate feed of all albums with collection specified by id
        plogger_init_pictures(array('type' => 'collection', 'value' => $id, 'limit' => $config['feed_num_entries'], 'sortby' => 'id'));
        $collection = get_collection_by_id($id);
        $config["feed_title"] .= ": " . $collection['collection_name'] . "Collection";
    } else {
        if ($level == "album") {
            plogger_init_pictures(array('type' => 'album', 'value' => $id, 'limit' => $config['feed_num_entries'], 'sortby' => 'id'));
            $album = get_album_by_id($id);
            $config["feed_title"] .= ": " . $album['album_name'] . " Album";
        } else {
            if ($level == "search") {
                plogger_init_search(array('searchterms' => $search, 'limit' => $config['feed_num_entries']));
            } else {
                if ($level == "") {
                    plogger_init_pictures(array('type' => 'latest', 'limit' => $config['feed_num_entries'], 'sortby' => 'id'));
                    $config["feed_title"] .= ": Entire Gallery";
                }
            }
        }
    }
    $header = 1;
    // generate RSS header
    $rssFeed = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rss version=\"2.0\">";
    $rssFeed .= "<channel>\n";
    $rssFeed .= "<title>" . $config['feed_title'] . "</title>\n";
    $rssFeed .= "<description>Plogger RSS Feed</description>\n";
    $rssFeed .= "<language>" . $config['feed_language'] . "</language>\n";
    $rssFeed .= "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";
    $rssFeed .= "<generator>Plogger</generator>\n";
    $rssFeed .= "<link>" . $config['gallery_url'] . "</link>\n";
    while (plogger_has_pictures()) {
        plogger_load_picture();
        $date = plogger_get_picture_date("D, d M Y H:i:s O", 1);
        if ($header) {
            $rssFeed .= "<pubDate>" . $date . "</pubDate>\n";
            $rssFeed .= "<lastBuildDate>" . $date . "</lastBuildDate>\n";
            $header = 0;
        }
        $rssFeed .= "<item>\n";
        $caption = plogger_get_picture_caption();
        $thumbpath = plogger_get_picture_thumb(THUMB_SMALL);
        $pagelink = plogger_get_picture_url();
        if ($caption == "" || $caption == "&nbsp;") {
            $caption = "New Photograph (no caption)";
        }
        $discript = '&lt;p&gt;&lt;a href="' . $pagelink . '"  
		title="' . $caption . '"&gt;
		&lt;img src="' . $thumbpath . '" alt="' . $caption . '" style="border: 1px solid #000000;" /&gt;
		&lt;/a&gt;&lt;/p&gt;&lt;p&gt;' . $caption . '&lt;/p&gt;';
        $discript .= '&lt;p&gt;' . htmlspecialchars(plogger_get_picture_description()) . '&lt;/p&gt;';
        $rssFeed .= "<pubDate>" . $date . "</pubDate>\n";
        $rssFeed .= "<title>" . $caption . "</title>\n";
        $rssFeed .= "<link>" . $pagelink . "</link>\n";
        $rssFeed .= "<description>" . $discript . "</description>\n";
        $rssFeed .= "<guid isPermaLink=\"false\">" . $thumbpath . "</guid>";
        $rssFeed .= "</item>\n";
    }
    $rssFeed .= "</channel></rss>";
    echo $rssFeed;
}
Beispiel #11
0
				<th>Import Status</th> <!-- Show the status of the import -->
				<th>Import Now?</th>
				<th>Edit?</th> <!-- Link to the edit view -->
				<th>History</th>
			</tr>
		</thead>
		<tbody>
		
		
<?php 
if ($feedimporter_feeds) {
    ?>
		
<?php 
    foreach ($feedimporter_feeds as $feed) {
        $collection = get_collection_by_id($feed->collection_id);
        $importTable = get_db()->getTable('FeedImporter_Import');
        $lastImport = $importTable->getMostRecentImportForFeedId($feed->id);
        ?>
	<tr>
		<td><?php 
        echo $feed->id;
        ?>
</td>
		<td><?php 
        echo $feed->feed_title;
        ?>
</td>
		<td><?php 
        echo $feed->feed_description;
        ?>