Example #1
0
            <select id="tattler_topic_selector" name="myselectbox" tabindex="2">
              <?php 
    $selected = empty($_GET['topic']) ? 'selected' : '';
    ?>
              <option value="all" <?php 
    print $selected;
    ?>
><?php 
    print t('All Topics');
    ?>
</option>
              <?php 
    $topics = tattlerui_get_topic_titles('array');
    $topic_id = $_GET['topic'];
    foreach ($topics as $key => $topic) {
        $title = ttlr_trim($topic, 30);
        $selected = $key == $topic_id ? 'selected="selected"' : '';
        ?>
            	  <option value="<?php 
        print $key;
        ?>
" <?php 
        print $selected;
        ?>
 ><?php 
        print $title;
        ?>
</option>
          	  <?php 
    }
    ?>
    $favico = '<img src="' . $favico_url . '" class="source_favicon" />';
} else {
    $favico = '<img src="' . path_to_theme() . '/images/clear.gif' . '" class="source_favicon" />';
}
$post_date = $row->feedapi_node_item_timestamp;
if (empty($post_date)) {
    //Not all RSSes provide this
    $post_date = $row->node_created;
}
if (!empty($post_date)) {
    $time_ago = format_interval(time() - $post_date) . ' ' . t('ago');
}
$orig_url = $row->feedapi_node_item_url;
$comment_img = theme('image', path_to_theme() . '/images/actbar/icon_comment.gif', 'Comment', 'Comment');
$comments_link = l($comment_img . ' ' . t('Comment'), "node/{$row->nid}", array('html' => TRUE, 'query' => drupal_get_destination()));
$mention_title = ttlr_trim($row->node_title, 140);
$tweet_img = theme('image', path_to_theme() . '/images/actbar/icon_tweet.gif', 'Tweet', 'Tweet');
$tweet_link = l($tweet_img . ' ' . t('Tweet'), $orig_url, array('html' => TRUE, 'attributes' => array('class' => 'retweet', 'title' => $mention_title, 'target' => '_blank')));
$delete_img = theme('image', path_to_theme() . '/images/actbar/icon_remove.gif', 'Remove', 'Remove');
$delete_link = l($delete_img . ' ' . t('Delete'), "node/{$row->nid}/delete", array('html' => TRUE, 'query' => drupal_get_destination()));
$votes = $row->votingapi_cache_node_points_vote_sum_value;
$votes = empty($votes) ? 0 : $votes;
$mention_title_safe = str_replace('\'', '"', $mention_title);
$addthis = "<div class=\"addthis_default_style float-left\"><a addthis:url=\"{$orig_url}\"  addthis:title=\"{$mention_title_safe}\" href=\"http://www.addthis.com/bookmark.php?v=250&amp;pub=xa-4a948c0b1cb90fd5\" class=\"addthis_button float-left\" style=\"color: #fe6d4c;\">Share</a>&nbsp;|&nbsp;</div>\n\n";
?>

<li class="entry clearfix">

  <div class="entry_summary clearfix">
  <div class="float-left">
    <div class="float-left">
* @TODO This is an extremely simplistic implementation, done in a hurry
* to just support commeting functionality. Needs more work.
*/
$post_date = $node->feedapi_node->timestamp;
if (empty($post_date)) {
    //Not all RSSes provide this
    $post_date = $node->created;
}
if (!empty($post_date)) {
    $time_ago = format_interval(time() - $post_date) . ' ' . t('ago');
}
$orig_url = $node->feedapi_node->url;
$source_nid = $node->field_source[0]['nid'];
$source = node_load($source_nid);
$stitle = empty($source->title) ? $source->field_url[0]['value'] : $source->title;
$stitle = ttlr_trim($stitle, 70);
$source_link = t('Source:') . ' ' . l($stitle, 'node/' . $source->nid);
?>

<div id="mention-detail">

  <h1><?php 
print l($node->title, $orig_url, array('attributes' => array('target' => '_blank')));
?>
</h1>
  
  <div class="source_and_time"><?php 
print $source_link;
?>
 | <?php 
print $time_ago;