exit(1);
}
-require_once INSTALLDIR.'/lib/profilelist.php';
-
/**
* This class outputs a paginated list of profiles self-tagged with a given tag
*
$this->tag = $this->trimmed('tag');
if (!common_valid_profile_tag($this->tag)) {
- $this->clientError(sprintf(_('Not a valid people tag: %s'),
+ $this->clientError(sprintf(_('Not a valid people tag: %s.'),
$this->tag));
return;
}
$profile->query(sprintf($qry, $this->tag, $lim));
- $pl = new ProfileList($profile, $this);
- $cnt = $pl->show();
+ $ptl = new PeopleTagList($profile, $this); // pass the ammunition
+ $cnt = $ptl->show();
$this->pagination($this->page > 1,
$cnt > PROFILES_PER_PAGE,
*/
function title()
{
- return sprintf(_('Users self-tagged with %s - page %d'),
+ return sprintf(_('Users self-tagged with %1$s - page %2$d'),
$this->tag, $this->page);
}
}
+
+class PeopleTagList extends ProfileList
+{
+ function newListItem($profile)
+ {
+ return new PeopleTagListItem($profile, $this->action);
+ }
+}
+
+class PeopleTagListItem extends ProfileListItem
+{
+ function linkAttributes()
+ {
+ $aAttrs = parent::linkAttributes();
+
+ if (common_config('nofollow', 'peopletag')) {
+ $aAttrs['rel'] .= ' nofollow';
+ }
+
+ return $aAttrs;
+ }
+
+ function homepageAttributes()
+ {
+ $aAttrs = parent::linkAttributes();
+
+ if (common_config('nofollow', 'peopletag')) {
+ $aAttrs['rel'] = 'nofollow';
+ }
+
+ return $aAttrs;
+ }
+}
+