Skip to content

Commit

Permalink
rsscloud fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hendrickson committed Nov 1, 2009
1 parent acf737e commit 7fe6e8a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
24 changes: 16 additions & 8 deletions app/omb/models/Method.php
Expand Up @@ -202,7 +202,7 @@ function init() {
$tweets = new Collection( \'posts\', $where );
echo \'<?xml version="1.0"?>
<!-- RSS generated by rp.ly v0.3 on \'.date( "n/j/Y; g:i:s A e" ).\' -->
<!-- RSS generated by OpenMicroBlogger v0.3 on \'.date( "n/j/Y; g:i:s A e" ).\' -->
<rss version="2.0">
<channel>
<title>\'.environment(\'site_title\').\'</title>
Expand All @@ -212,7 +212,7 @@ function init() {
<copyright></copyright>
<pubDate>\'.date( "D, j M Y H:i:s T" ).\'</pubDate>
<lastBuildDate>\'.date( "D, j M Y H:i:s T", strtotime( $tweets->updated )).\'</lastBuildDate>
<generator>rp.ly v0.3</generator>
<generator>OpenMicroBlogger v0.3</generator>
\';
do_action(\'rss2_head\');
echo \'
Expand Down Expand Up @@ -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\']);
Expand Down Expand Up @@ -461,28 +469,28 @@ function rsscloud_schedule_post_notifications() {
echo \'<?xml version="1.0"?>
<!-- RSS generated by rp.ly v0.3 on \'.date( "n/j/Y; g:i:s A e" ).\' -->
<!-- RSS generated by OpenMicroBlogger v0.3 on \'.date( "n/j/Y; g:i:s A e" ).\' -->
<rss version="2.0">
<channel>
<title>\'.environment(\'site_title\').\'</title>
<title>\'.htmlspecialchars(environment(\'site_title\')).\'</title>
<link>\'.$request->base.\'</link>
<description>\'.environment(\'site_description\').\'</description>
<description>\'.htmlspecialchars(environment(\'site_description\')).\'</description>
<language>en-us</language>
<copyright></copyright>
<pubDate>\'.date( "D, j M Y H:i:s T" ).\'</pubDate>
<lastBuildDate>\'.date( "D, j M Y H:i:s T", strtotime( $collection->updated )).\'</lastBuildDate>
<generator>rp.ly v0.3</generator>
<generator>OpenMicroBlogger v0.3</generator>
\';
do_action(\'rss2_head\');
echo \'
\';
while ($p = $collection->MoveNext()) {
echo \'<item>
<title>\'.$p->title.\'</title>
<title>\'.htmlspecialchars($p->title).\'</title>
<link>\'.$p->url.\'</link>
<guid>\'.$p->url.\'</guid>
<comments>\'.$p->url.\'</comments>
<description>\'.$p->body.\'</description>
<description>\'.htmlspecialchars($p->body).\'</description>
<pubDate>\'.date( "D, j M Y H:i:s T", strtotime( $p->created )).\'</pubDate>
</item>
\';
Expand Down
15 changes: 12 additions & 3 deletions app/omb/plugins/wp.php
Expand Up @@ -2272,16 +2272,25 @@ 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'),
'subtitle'=>environment('site_subtitle'),
'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(),
Expand Down
2 changes: 1 addition & 1 deletion app/wiki/views/wiki_pages/index.html
Expand Up @@ -3,7 +3,7 @@
<title><?php echo environment('site_title')." | ". $wiki_title; ?></title>

<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $wiki_rss; ?>" />
<meta name="generator" content="rp.ly v0.3"></head>
<meta name="generator" content="OpenMicroBlogger v0.3"></head>

<?php content_for_layout(); ?>
</body>
Expand Down
2 changes: 1 addition & 1 deletion app/wiki/views/wikis/index.html
Expand Up @@ -3,7 +3,7 @@
<title><?php echo environment('site_title')." | ". $wiki_title; ?></title>

<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $wiki_rss; ?>" />
<meta name="generator" content="rp.ly v0.3"></head>
<meta name="generator" content="OpenMicroBlogger v0.3"></head>

<?php content_for_layout(); ?>
</body>
Expand Down
4 changes: 3 additions & 1 deletion wp-content/themes/p2/header.php
Expand Up @@ -59,7 +59,9 @@ function render_a_tweet(data){
if (data['comment'] == 1){
avsize="32";
tweet = tweet + ' <li style="clear:both;margin-left:40px;padding:0px;">';
}
} else {
tweet = tweet + '<hr />';
}
tweet = tweet + ' <div>';
tweet = tweet + ' <div class="tweet_avatar">';
tweet = tweet + ' <a href="'+data['profile_url']+'">';
Expand Down

0 comments on commit 7fe6e8a

Please sign in to comment.