//end foreach } //end if is_a $bloglink if (isset($_REQUEST['all'])) { $struct = new Outline(array_reverse($struct->toArray())); foreach ($struct->getNodes() as $item) { $author = $item->getField('author'); $author = is_a($author, 'Outline') ? $author->getField('name') : $author; if (stristr($author, 'noemail') || stristr($author, 'noone') || stristr($author, 'example.com')) { $author = ''; } xanga_post_action('post', $item->getField('title'), $item->getField('description') ? $item->getField('description') : $item->getField('content'), $item->getField('link'), $author, $bloglink, $blogtitle); } //end foreach nodes } else { $item = $struct->getNode(0); $author = $item->getField('author'); $author = is_a($author, 'Outline') ? $author->getField('name') : $author; if (stristr($author, 'noemail') || stristr($author, 'noone') || stristr($author, 'example.com')) { $author = ''; } xanga_post_action('post', $item->getField('title'), $item->getField('description') ? $item->getField('description') : $item->getField('content'), $item->getField('link'), $author, $bloglink, $blogtitle); } //end if isset all echo '<div><b>Posted to Xanga</b></div>'; exit; } //end if url ?> <h2>Post items from a feed to Xanga</h2> <form method="get" action="<?php
die('NO ID SPECIFIED'); } require_once 'tagFunctions.php'; require_once 'XNC/Ajax.php'; $group = XN_Content::load(intval($_REQUEST['id'])); $grouptags = explode(' ', $group->my->grouptags); foreach ($grouptags as $id => $tag) { $grouptags[$id] = str_replace('+', ' ', $tag); } if ($_REQUEST['format']) { if (!class_exists('Outline')) { XN_Application::includeFile('xoxotools', '/OutlineClasses/Outline.php'); } $struct = new Outline(); $struct->addNode($grouptags); $struct->getNode(0)->setField('title', $group->title); $struct->getNode(0)->setField('relatedtags', new Outline(fetchTags($group))); if ($_REQUEST['format'] == 'xoxo') { header('Content-Type: application/xml;charset=utf-8'); $struct->getNode(0)->setField('text', $group->title); if ($_ITEMONLY) { echo $struct->getNode(0)->toXOXO('item'); } else { echo $struct->toXOXO(); } } //end if format == xoxo if ($_REQUEST['format'] == 'json') { header('Content-Type: text/javascript;charset=utf-8'); if (!isset($_REQUEST['raw']) && !$_ITEMONLY) { if ($_REQUEST['callback']) {