Location: PHPKode > projects > Teampopor > teampopor-0.5/teampopor/modules/message/network-tag.tpl.php
<?php
/**
 * page callback: network/%network/tag/%tag
 * arguments: $network, $tag
 */

add_js(get_path('module', 'network') . '/network_updates.js');

global $theme;
add_css(get_path('theme', $theme) . '/network_updates.css');
?>
<div class="feed">
  <div class="content">
    <div id="feed-content">
      <?php
          // joined groups
          $gids = array();
          $result = db_query("SELECT gm.gid FROM {group_members} gm LEFT JOIN {groups} g ON g.gid = gm.gid WHERE g.nid = %d AND gm.uid = %d", $network->nid, $user->uid);
          while ($row = db_fetch_object($result)) {
            $gids[] = $row->gid;
          }

          $result = db_query("SELECT m.* FROM {message_tags} mt INNER JOIN {messages} m ON m.mid = mt.mid WHERE mt.tid = %d AND m.type >= 0 AND m.thread_mid = 0 AND m.nid = %d AND m.gid IN (" . implode(',', array_merge($gids, array(0))) . ") ORDER BY m.timestamp DESC", $tag->tid, $network->nid);
      ?>
      <ul class="chron">
        <?php while ($message = db_fetch_object($result)) { ?>
          <?php message_prepare($message) ?>
          <?php print theme('feed_item', $message, $network) ?>
        <?php } ?>
      </ul>
    </div>
  </div> <!-- .content -->
</div>
Return current item: Teampopor