'title' => sprintf(_('Feed for friends of %s'), $this->user->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'all', array('nickname' => $this->user->nickname));
+ }
+
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'favorited');
}
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'favorited');
+ }
}
$this->page, 'groupmembers',
array('nickname' => $this->group->nickname));
}
-}
\ No newline at end of file
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'groupmembers', array('nickname' => $this->group->nickname));
+ }
+}
$gbm = new GroupsByMembersSection($this);
$gbm->show();
}
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'groups', array('nickname' => $this->group->nickname));
+ }
}
}
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'inbox', array('nickname' => $this->user->nickname));
+ }
+
/**
* Retrieve the messages for this user and this page
*
}
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'outbox', array('nickname' => $this->user->nickname));
+ }
+
/**
* retrieve the messages for this user and this page
*
var $page = null;
+ /**
+ * Number of notices being shown on this page.
+ */
+ // Does this need to be here? Should it be?
+ // If it does, this property needs to be
+ // added to other actions as well, like $page.
+ // I'm trying to find a way to capture the
+ // output of the $cnt variable from this
+ // action's showContent() method but need
+ // to do so earlier, I think...?
+ var $count = null;
+
function isReadOnly()
{
return true;
'title' => _('Public Stream Feed')));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'public');
+ }
+
/**
* Extra head elements
*
'title' => $rsstitle));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'replies', array('nickname' => $this->user->nickname));
+ }
+
/**
* show the personal group nav
*
'title' => $feedtitle));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showfavorites', array('nickname' => $this->user->nickname));
+ }
+
+
/**
* show the personal group nav
*
$this->group->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showgroup', array('nickname' => $this->group->nickname));
+ }
+
/**
* Fill in the sidebar.
*
$this->user->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showstream', array('nickname' => $this->user->nickname));
+ }
+
function extraHead()
{
// FOAF
'title' => sprintf(_('Feed for tag %s'), $this->tag)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'tag', array('tag' => $this->tag));
+ }
+
function showPageNotice()
{
return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);
$this->showTitle();
$this->showStylesheets();
$this->showScripts();
+ $this->showRelationshipLinks();
$this->showOpenSearch();
$this->showFeeds();
$this->showDescription();
}
}
+ /**
+ * Show document relationship links
+ *
+ * SHOULD overload
+ *
+ * @return nothing
+ */
+ function showRelationshipLinks()
+ {
+ // output <link> elements with appropriate HTML4.01 link types:
+ // http://www.w3.org/TR/html401/types.html#type-links
+ }
+
/**
* Show OpenSearch headers
*
$this->elementEnd('div');
}
}
+
+ /**
+ * Generate document metadata for sequential navigation
+ *
+ * @param boolean $have_before is there something before?
+ * @param boolean $have_after is there something after?
+ * @param integer $page current page
+ * @param string $action current action
+ * @param array $args rest of query arguments
+ *
+ * @return nothing
+ */
+ function sequenceRelationships($have_next, $have_previous, $page, $action, $args=null)
+ {
+ // Outputs machine-readable pagination in <link> elements.
+ // Pattern taken from $this->pagination() method.
+
+ // "next" is equivalent to "after"
+ if ($have_next) {
+ $pargs = array('page' => $page-1);
+ $newargs = $args ? array_merge($args, $pargs) : $pargs;
+ $this->element('link', array('rel' => 'next',
+ 'href' => common_local_url($action, $newargs),
+ 'title' => _('Next')));
+ }
+ // "previous" is equivalent to "before"
+ if ($have_previous=true) { // FIXME
+ $pargs = array('page' => $page+1);
+ $newargs = $args ? array_merge($args, $pargs) : $pargs;
+ $this->element('link', array('rel' => 'prev',
+ 'href' => common_local_url($action, $newargs),
+ 'title' => _('Previous')));
+ }
+ }
}