Ejemplo n.º 1
0
        <link>{$sappho_path}</link>
        <description>{$rss_description}</description>
        <language>{$rss_lang}</language>

EOF;
while ($image = mysql_fetch_array($result)) {
    $title = outputxml($image['title']);
    $url = outputxml($sappho_path . '/image/' . $image['image_id'] . '/');
    $caption = empty($image['caption']) ? '' : "\n                <br /><br />" . output($image['caption']);
    $description = <<<EOF
                <img src="http://{$s3_host}/{$s3_path}a/{$image['filename']}.jpg"
                     alt="{$image['title']}"
                     width="{$image['thumb_width']}"
                     height="{$image['thumb_height']}" />{$caption}
EOF;
    $description = outputxml($description);
    echo <<<EOF
        <item>
            <title>{$title}</title>
            <link>{$url}</link>
            <guid>{$url}</guid>
            <description>
{$description}
            </description>
        </item>

EOF;
}
?>
    </channel>
</rss>
Ejemplo n.º 2
0
        $bonus = "<a href=\"http://{$ttf_cfg['address']}/thread.php?thread_id={$thread_id}#post-{$rev['ref_id']}\">view this post in the context of the thread</a>";
    } else {
        if ($rev['type'] === 'thread') {
            $bonus = "<a href=\"http://{$ttf_cfg['address']}/thread.php?thread_id={$rev['ref_id']}\">view this thread</a>";
        } else {
            if ($rev['type'] === 'profile') {
                $bonus = "<a href=\"http://{$ttf_cfg['address']}/profile.php?user_id={$rev['ref_id']}\">view this user profile</a>";
            } else {
                if ($rev['type'] === 'title') {
                    $bonus = "<a href=\"http://{$ttf_cfg['address']}/profile.php?user_id={$rev['ref_id']}\">view this user title in the context of the profile</a>";
                }
            }
        }
    }
    $title = outputxml("{$rev['type']} {$rev['ref_id']}, rid {$rev['rev_id']} by {$rev['username']}");
    $link = outputxml("http://{$ttf_cfg['address']}/revision.php?type={$rev['type']}&ref_id={$rev['ref_id']}");
    $description = outputxml(nl2br($rev['body'] . "\n\n<hr />" . $bonus));
    echo <<<EOF
        <item>
            <title>{$title}</title>
            <link>{$link}</link>
            <guid isPermaLink="false">{$ttf_cfg['address']}-{$rev['rev_id']}</guid>
            <description>{$description}</description>
        </item>

EOF;
}
?>
    </channel>
</rss>