$blogtitle = $struct->getField('title'); $bloglink = $struct->getField('link'); if (is_a($bloglink, 'Outline')) { foreach ($bloglink->getNodes() as $links) { if ($links->getField('rel') == 'alternate') { $bloglink = $links->getField('href'); break; } //end if alternate } //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 = ''; }
echo ' <li id="home">' . "\n"; echo ' <a class="feed-title" rel="home bookmark"'; if ($site['href']) { echo ' href="' . htmlentities($site['href']) . '"'; } if ($site['title']) { echo ' title="' . htmlentities($site['title']) . '"'; } echo '>' . str_replace("\n", ' ', str_replace("\r", ' ', htmlentities($site['text']))) . '</a>' . "\n"; if (in_array('alternate', explode(' ', $site['rel#1']))) { echo ' <a rel="alternate" href="' . htmlentities($site['href#1']) . '">[site post feed]</a>' . "\n"; } echo ' </li>' . "\n\n"; } //end if site foreach ($struct->getNodes() as $node) { if ($node->getField('title')) { $node->setField('title', (int) ($node->getField('title') / 1000000000 < 1000 ? $node->getField('title') : $node->getField('title') / 1000000000)); } echo ' <li class="hentry"'; if ($node->getField('title')) { echo ' id="post-' . htmlentities($node->getField('title')) . '"'; } echo '>' . "\n"; echo ' <a class="entry-title" rel="bookmark"'; if ($node->getField('href')) { echo ' href="' . htmlentities($node->getField('href')) . '"'; } if ($node->getField('title')) { echo ' title="' . htmlentities($node->getField('title')) . '"'; }