From 7fe6e8a4b6ade636f54073298f11a38bdc0ab104 Mon Sep 17 00:00:00 2001 From: Brian Hendrickson Date: Sat, 31 Oct 2009 17:29:09 -0700 Subject: [PATCH] rsscloud fixes --- app/omb/models/Method.php | 24 ++++++++++++++++-------- app/omb/plugins/wp.php | 15 ++++++++++++--- app/wiki/views/wiki_pages/index.html | 2 +- app/wiki/views/wikis/index.html | 2 +- wp-content/themes/p2/header.php | 4 +++- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/app/omb/models/Method.php b/app/omb/models/Method.php index ec91204..1ba448c 100644 --- a/app/omb/models/Method.php +++ b/app/omb/models/Method.php @@ -202,7 +202,7 @@ function init() { $tweets = new Collection( \'posts\', $where ); echo \' - + \'.environment(\'site_title\').\' @@ -212,7 +212,7 @@ function init() { \'.date( "D, j M Y H:i:s T" ).\' \'.date( "D, j M Y H:i:s T", strtotime( $tweets->updated )).\' - rp.ly v0.3 + OpenMicroBlogger v0.3 \'; do_action(\'rss2_head\'); echo \' @@ -289,6 +289,14 @@ function rsscloud_schedule_post_notifications() { global $db,$request,$response; + if (isset($_GET[\'challenge\'])) { + + header( \'Status: 200 OK\' ); + echo $_GET[\'challenge\']; + exit; + + } + extract($vars); $Feed =& $db->model(\'Feed\'); $f = $Feed->find_by(\'xref\',$_POST[\'url\']); @@ -461,28 +469,28 @@ function rsscloud_schedule_post_notifications() { echo \' - + - \'.environment(\'site_title\').\' + \'.htmlspecialchars(environment(\'site_title\')).\' \'.$request->base.\' - \'.environment(\'site_description\').\' + \'.htmlspecialchars(environment(\'site_description\')).\' en-us \'.date( "D, j M Y H:i:s T" ).\' \'.date( "D, j M Y H:i:s T", strtotime( $collection->updated )).\' - rp.ly v0.3 + OpenMicroBlogger v0.3 \'; do_action(\'rss2_head\'); echo \' \'; while ($p = $collection->MoveNext()) { echo \' - \'.$p->title.\' + \'.htmlspecialchars($p->title).\' \'.$p->url.\' \'.$p->url.\' \'.$p->url.\' - \'.$p->body.\' + \'.htmlspecialchars($p->body).\' \'.date( "D, j M Y H:i:s T", strtotime( $p->created )).\' \'; diff --git a/app/omb/plugins/wp.php b/app/omb/plugins/wp.php index 6aef68e..af2689b 100755 --- a/app/omb/plugins/wp.php +++ b/app/omb/plugins/wp.php @@ -2272,6 +2272,15 @@ function in_reply_to(&$the_post) { if ($user_ID) $comments = true; + +if (pretty_urls()){ + $atom = "posts.atom"; + $rss = "posts.rss"; +} else { + $atom = "?posts.atom"; + $rss = "?posts.rss"; +} + $blogdata = array( 'home'=>base_url(true), 'name'=>environment('site_title'), @@ -2279,9 +2288,9 @@ function in_reply_to(&$the_post) { 'description'=>environment('site_description'), 'wpurl'=>base_url(true), 'url'=>base_url(true), - 'atom_url'=>base_url(true)."?posts.atom", - 'rss_url'=>base_url(true)."?posts.rss", - 'rss2_url'=>base_url(true)."?posts.rss", + 'atom_url'=>base_url(true).$atom, + 'rss_url'=>base_url(true).$rss, + 'rss2_url'=>base_url(true).$rss, 'charset'=>'utf-8', 'html_type'=>'text/html', 'theme_url'=>theme_path(), diff --git a/app/wiki/views/wiki_pages/index.html b/app/wiki/views/wiki_pages/index.html index e54c864..8d99234 100644 --- a/app/wiki/views/wiki_pages/index.html +++ b/app/wiki/views/wiki_pages/index.html @@ -3,7 +3,7 @@ <?php echo environment('site_title')." | ". $wiki_title; ?> - + diff --git a/app/wiki/views/wikis/index.html b/app/wiki/views/wikis/index.html index e54c864..8d99234 100644 --- a/app/wiki/views/wikis/index.html +++ b/app/wiki/views/wikis/index.html @@ -3,7 +3,7 @@ <?php echo environment('site_title')." | ". $wiki_title; ?> - + diff --git a/wp-content/themes/p2/header.php b/wp-content/themes/p2/header.php index 778d902..683e899 100644 --- a/wp-content/themes/p2/header.php +++ b/wp-content/themes/p2/header.php @@ -59,7 +59,9 @@ function render_a_tweet(data){ if (data['comment'] == 1){ avsize="32"; tweet = tweet + '
  • '; - } + } else { + tweet = tweet + '
    '; + } tweet = tweet + '
    '; tweet = tweet + '
    '; tweet = tweet + ' ';