"
unless $u;
my $itemsperpage = 50;
my $ret;
my $skip = $GET{skip}+0 || 0;
my $prevcount = $skip + $itemsperpage;
my $nextcount = $skip ? $skip - $itemsperpage : -1;
my $nextlink = $nextcount != -1 ? " | Next $itemsperpage >>" : '';
my $prevlink = "<< Previous $itemsperpage";
# Filter first to a "Mobile View" friends group if they have one,
# then fall back to "Default View", and then just show them everything
my $filter;
my $groupname = "All friends";
foreach ("Mobile View", "Default View") {
if (my $grp = LJ::get_friend_group($u, { 'name' => $_ })) {
$groupname = $_;
$filter = 1 << $grp->{'groupnum'};
last;
}
}
$ret = qq {
<< Back to LiveJournal Mobile.
Friends Page
Viewing: $groupname
$prevlink$nextlink
};
sub New;
my %friends;
my @items = LJ::get_friend_items({
'remote' => $u,
'itemshow' => $itemsperpage,
'skip' => $skip,
'showtypes' => 'PYC',
'u' => $u,
'filter' => $filter,
'friends_u' => \%friends,
});
# how many characters to truncate entry at
my $max_entry_length = 400;
foreach my $ei (@items) {
next unless $ei;
# my $entry;
# if ($ei->{'ditemid'}) {
# $entry = LJ::Entry->new($ei->{'journalid'},
# ditemid => $ei->{'ditemid'});
# } elsif ($ei->{'jitemid'} && $ei->{'anum'}) {
# $entry = LJ::Entry->new($ei->{'journalid'},
# jitemid => $ei->{'jitemid'},
# anum => $ei->{'anum'});
# }
# next unless $entry;
# my $pu = $entry->poster;
# my $ju = $entry->journal;
# my $url = $entry->url;
# $url .= "?format=light";
# my $who = "$pu->{user}";
# if ($pu->{userid} != $ju->{userid}) {
# $who .= " in " . "$ju->{user}";
# }
# $ret .= "$who: " . "" . ($entry->subject_text || "(no subject)") . "
";
}
return $ret;
}
_code?>