Esempio n. 1
0
 private function feed_list($result, $mode)
 {
     if ($result instanceof DBObject) {
         Backend::add('title', ConfigValue::get('Title'));
         Backend::add('link', SITE_LINK . '/?q=content');
         Backend::add('description', ConfigValue::get('Description'));
         if (!empty($result->list) && is_array($result->list)) {
             $list = array();
             foreach ($result->list as $item) {
                 if (ConfigValue::get('CleanURLs', false)) {
                     $item['link'] = SITE_LINK . '/content/' . $item['id'];
                 } else {
                     $item['link'] = SITE_LINK . '/?q=content/' . $item['id'];
                 }
                 $item['body'] = Content::createPreview($item['body'], false);
                 $list[] = $item;
             }
         } else {
             $list = false;
         }
         Backend::add('list', $list);
     }
     return $result;
 }
Esempio n. 2
0
 private function feed_display($result, $mode)
 {
     if (!$result instanceof DBObject) {
         return $result;
     }
     Backend::add('title', $result->array['name']);
     Backend::add('link', SITE_LINK . '/?q=tag/' . $result->array['id']);
     Backend::add('description', $result->array['description']);
     if (!empty($result->array['list']) && is_array($result->array['list'])) {
         $list = array();
         $max_time = 0;
         foreach ($result->array['list'] as $item) {
             $link = SITE_LINK;
             if (Value::get('clean_urls', false)) {
                 $link .= $result->array['foreign_table'] . '/' . $item['id'];
             } else {
                 $link .= '?q=' . $result->array['foreign_table'] . '/' . $item['id'];
             }
             $item['link'] = $link;
             if ($result->array['foreign_table'] == 'contents') {
                 $item['body'] = Content::createPreview($item['body']);
             }
             $list[] = $item;
             $max_time = strtotime($item['modified']) > $max_time ? strtotime($item['modified']) : $max_time;
         }
         Backend::add('AtomLastDate', gmdate('Y-m-d\\TH:i:s\\Z', $max_time));
     } else {
         $list = false;
     }
     Backend::add('list', $list);
     return $result;
 }
Esempio n. 3
0
<div class="content_preview box">
	<h3><a href="?q=content/<?php 
echo $content['name'];
?>
">
	    <?php 
echo $content['title'];
?>
    </a></h3>
	<div>
		<?php 
echo Content::createPreview($content['body'], 100);
?>
	</div>
	<div class="bottom">
		<a href="?q=content/<?php 
echo $content['name'];
?>
">Read More</a>
	</div>
</div>
Esempio n. 4
0
?>
	<?php 
if ($list) {
    foreach ($list as $item) {
        ?>
		<entry>
			<title><?php 
        echo htmlspecialchars($item['title']);
        ?>
</title>
			<link href="<?php 
        echo $item['link'];
        ?>
" />
			<summary type="html"><![CDATA[<?php 
        echo Content::createPreview($item['body']);
        ?>
]]></summary>
			<updated><?php 
        echo gmdate('Y-m-d\\TH:i:s\\Z', strtotime($item['modified']));
        ?>
</updated>
			<id><?php 
        echo $item['link'];
        ?>
</id>
		</entry>
	<?php 
    }
}
?>
    foreach ($db_object->array['list'] as $item) {
        $tags = Tag::getTags('contents', $item['id']);
        $link = '?q=content/' . $item['name'];
        ?>
		<h3>
			<a href="<?php 
        echo $link;
        ?>
"><?php 
        echo plain($item['title']);
        ?>
</a>
		</h3>
		<p>
			<?php 
        echo Content::createPreview($item['body'], false);
        ?>
		</p>
		<div class="clear">
			<div class="span-3">
				<a href="<?php 
        echo $link;
        ?>
">Read more</a>
			</div>
			<div class="span-6">
				<?php 
        if ($tags) {
            foreach ($tags as $tag) {
                ?>
					<a  href="?q=tag/<?php