?> </th> </tr> </thead> <tbody> <?php $i = 0; if ($this->entries != null) { foreach ($this->entries as $entry) { ?> <tr class="<?php echo $i++ % 2 ? "even" : "odd"; ?> "> <td class="wordbridge_col1"><?php echo WordbridgeHelper::wordBridgeStrftime('j.m.y', $entry['date'], true); ?> </td> <td class="wordbridge_col2"><?php echo sprintf('<a href="%s">%s</a>', JRoute::_($this->blogLink . '&p=' . $entry['postid'] . '&slug=' . $entry['slug'] . '&view=entry'), $this->escape($entry['title'])); ?> </td> </tr> <?php } } ?> </tbody> </table> <?php
?> <?php } ?> </div> <div class="wordbridge_entry"> <h2 class="wordbridge_title contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?> "> <?php echo $this->escape($this->title); ?> </h2> <span class="wordbridge_date"><?php echo WordbridgeHelper::wordBridgeStrftime('%B %e, %Y', $this->date); ?> </span> <div class="wordbridge_content"> <?php if ($this->params->get('wordbridge_show_links') == 'no') { $br_pos = strrpos($this->content, '<br />'); if ($br_pos > 0) { echo substr($this->content, 0, $br_pos); } else { echo $this->content; } } else { echo $this->content; } ?>
?> </th> </tr> </thead> <tbody> <?php $i = 0; if ($this->entries != null) { foreach ($this->entries as $entry) { ?> <tr class="<?php echo $i++ % 2 ? "even" : "odd"; ?> "> <td class="wordbridge_col1"><?php echo WordbridgeHelper::wordBridgeStrftime('%e.%m.%y', $entry['date'], true); ?> </td> <td class="wordbridge_col2"><?php echo sprintf('<a href="%s">%s</a>', JRoute::_($this->blogLink . '&p=' . $entry['postid'] . '&slug=' . $entry['slug'] . '&view=entry'), $this->escape($entry['title'])); ?> </td> </tr> <?php } } ?> </tbody> </table> <?php
?> <?php } ?> </div> <div class="wordbridge_entry"> <h2 class="wordbridge_title contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?> "> <?php echo $this->escape($this->title); ?> </h2> <span class="wordbridge_date"><?php echo WordbridgeHelper::wordBridgeStrftime('F j, Y', $this->date, true); ?> </span> <div class="wordbridge_content"> <?php if ($this->params->get('wordbridge_show_links') == 'no') { $br_pos = strrpos($this->content, '<br />'); if ($br_pos > 0) { echo substr($this->content, 0, $br_pos); } else { echo $this->content; } } else { echo $this->content; } ?>
echo JText::_('COM_WORDBRIDGE_BRIDGE_MSG'); ?> </p> <?php foreach ($this->stats as $blog) { ?> <div> <?php echo sprintf('<h3><a href="http://%s/" target="_blank">%s</a></h3>', $this->escape(WordbridgeHelper::fqdnBlogName($blog->blog_name)), $this->escape(WordbridgeHelper::fqdnBlogName($blog->blog_name))); ?> <blockquote id="wordbridge_blog_<?php echo $blog->blog_name; ?> "> <span class="wordbridge_updated"><?php echo JText::sprintf('COM_WORDBRIDGE_LAST_UPDATED', $blog->updated == null ? JText::_('COM_WORDBRIDGE_NEVER') : WordbridgeHelper::wordBridgeStrftime('%c', $blog->updated)); ?> </span><br /> <?php // Truncate the last post value, so it doesn't swamp the page $last_post = ''; if (strlen($blog->last_post) > 51) { $last_post = $this->escape(substr($blog->last_post, 0, 50)) . '…'; } else { $last_post = $this->escape($blog->last_post); } ?> <span class="wordbridge_last_post"><?php echo JText::sprintf('COM_WORDBRIDGE_LAST_POST', $last_post); ?> </span><br />
function storeBlogEntries($entries, $blog_uuid) { $db =& JFactory::getDBO(); foreach ($entries as $entry) { // Update the locally cached post $post_query = sprintf('REPLACE INTO #__com_wordbridge_posts VALUES (%d, %s, %s, %s, %s, %s)', $entry['postid'], $db->Quote($blog_uuid, true), $db->Quote($entry['title'], true), $db->Quote($entry['content'], true), $db->Quote(WordbridgeHelper::wordBridgeStrftime('%F %T %Z', $entry['date']), true), $db->Quote($entry['slug'], true)); $db->setQuery($post_query); $db->query(); // Update the post category settings $db->setQuery(sprintf('DELETE FROM #__com_wordbridge_post_categories WHERE post_id = %d AND blog_uuid = %s', $entry['postid'], $db->Quote($blog_uuid, true))); $db->query(); if (count($entry['categories'])) { foreach ($entry['categories'] as $category) { $db->setQuery(sprintf('INSERT INTO #__com_wordbridge_post_categories VALUES (%d, %s, %s)', $entry['postid'], $db->Quote($blog_uuid, true), $db->Quote($category, true))); $db->query(); } } } }
<div class="wordbridge_entries"> <?php if ($this->entries && count($this->entries)) { foreach ($this->entries as $entry) { ?> <div class="wordbridge_entry"> <h2 class="wordbridge_title contentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?> "> <?php echo sprintf('<a href="%s">%s</a>', JRoute::_($this->blogLink . '&p=' . $entry['postid'] . '&slug=' . $entry['slug'] . '&view=entry'), $this->escape($entry['title'])); ?> </h2> <span class="wordbridge_date"><?php echo WordbridgeHelper::wordBridgeStrftime('%B %e, %Y', $entry['date'], true); ?> </span> <div class="wordbridge_content"> <?php $blogContent = $entry['content']; if ($this->params->get('wordbridge_show_links') == 'no') { $br_pos = strrpos($entry['content'], '<br />'); if ($br_pos > 0) { $blogContent = substr($entry['content'], 0, $br_pos); } } // Look for more-link if (preg_match('/^(.+?)<span\\s+id="more-(\\d+)"><\\/span>(.*)/is', $blogContent, $matches)) { $blogContent = $matches[1]; $blogContent .= sprintf('<a href="%s#more-%s">%s</a>', JRoute::_($this->blogLink . '&p=' . $entry['postid'] . '&slug=' . $entry['slug'] . '&view=entry'), $matches[2], JText::_('COM_WORDBRIDGE_READ_THE_REST'));