function showContent() { #TODO: controls here. $offset = ($this->page - 1) * PEOPLETAGS_PER_PAGE; $limit = PEOPLETAGS_PER_PAGE + 1; $ptags = $this->tagged->getOtherTags($this->scoped, $offset, $limit); $pl = new PeopletagList($ptags, $this); $cnt = $pl->show(); if ($cnt == 0) { $this->showEmptyListMessage(); } $this->pagination($this->page > 1, $cnt > PEOPLETAGS_PER_PAGE, $this->page, 'peopletagsforuser', array('nickname' => $this->tagged->id)); }
function showContent() { $offset = ($this->page - 1) * PEOPLETAGS_PER_PAGE; $limit = PEOPLETAGS_PER_PAGE + 1; $ptags = $this->profile->getTagSubscriptions($offset, $limit); $pl = new PeopletagList($ptags, $this); $cnt = $pl->show(); $this->pagination($this->page > 1, $cnt > PEOPLETAGS_PER_PAGE, $this->page, 'peopletagsubscriptions', array('nickname' => $this->profile->id)); }
function showContent() { #TODO: controls here. $pl = new PeopletagList($this->tags, $this); $cnt = $pl->show(); if ($cnt == 0) { $this->showEmptyListMessage(); } $this->pagination($this->page > 1, $cnt > PEOPLETAGS_PER_PAGE, $this->page, 'peopletagsbyuser', $this->getSelfUrlArgs()); }
function showContent() { $offset = ($this->page - 1) * PEOPLETAGS_PER_PAGE; $limit = PEOPLETAGS_PER_PAGE + 1; $ptags = new Profile_list(); $ptags->tag = $this->tag; $user = common_current_user(); if (empty($user)) { $ckey = sprintf('profile_list:tag:%s', $this->tag); $ptags->private = false; $ptags->orderBy('profile_list.modified DESC'); $c = Cache::instance(); if ($offset + $limit <= PEOPLETAG_CACHE_WINDOW && !empty($c)) { $cached_ptags = Profile_list::getCached($ckey, $offset, $limit); if ($cached_ptags === false) { $ptags->limit(0, PEOPLETAG_CACHE_WINDOW); $ptags->find(); Profile_list::setCache($ckey, $ptags, $offset, $limit); } else { $ptags = clone $cached_ptags; } } else { $ptags->limit($offset, $limit); $ptags->find(); } } else { $ptags->whereAdd('(profile_list.private = false OR (' . ' profile_list.tagger =' . $user->id . ' AND profile_list.private = true) )'); $ptags->orderBy('profile_list.modified DESC'); $ptags->find(); } $pl = new PeopletagList($ptags, $this); $cnt = $pl->show(); $this->pagination($this->page > 1, $cnt > PEOPLETAGS_PER_PAGE, $this->page, 'peopletag', array('tag' => $this->tag)); }