main -> livejournal cgi-bin/ljfeed.pl --- cvs/livejournal/cgi-bin/ljfeed.pl 2004-07-21 18:28:31.000000000 -0700 +++ cgi-bin/ljfeed.pl 2005-02-17 18:36:41.000000000 -0800 @@ -379,30 +379,30 @@ # setup userprops we will need LJ::load_user_props($u, qw{ - aolim icq yahoo jabber msn url urlname external_foaf_url + aolim icq yahoo jabber msn url urlname external_foaf_url state city country journaltitle }); # create bare foaf document, for now $ret = "\n"; $ret .= LJ::run_hook("bot_director", ""); $ret .= "\n"; # precompute some values my $digest = Digest::SHA1::sha1_hex('mailto:' . $u->{email}); - - # channel attributes - $ret .= ($comm ? " \n" : " \n"); - $ret .= " $u->{user}\n"; - if ($u->{bdate} && $u->{bdate} ne "0000-00-00" && !$comm && $u->{allow_infoshow} eq 'Y') { - my $bdate = $u->{bdate}; - $bdate =~ s/^0000-//; - $ret .= " $bdate\n"; + if (!$u->{external_foaf_url}) { + $ret .= " \n"; + $ret .= " \n"; + $ret .= " \n"; + $ret .= " \n"; } + # channel attributes + $ret .= ($comm ? " \n" : " \n"); $ret .= " $digest\n"; $ret .= " \n"; $ret .= " {user}\">\n"; @@ -435,13 +435,35 @@ } } - # include a user's journal page and web site info - $ret .= " \n"; + # include a user's journal page, name/nick and web site info + $ret .= " ".LJ::exml($u->{name})."\n" if $u->{name}; + $ret .= " $u->{user}\n"; + $ret .= " \n" if ($u->{defaultpicid}); + $ret .= " {journaltitle}) . "\"" if $u->{journaltitle}; + $ret .= "/>\n"; if ($u->{url}) { $ret .= " {url}); $ret .= "\" dc:title=\"" . LJ::exml($u->{urlname}) . "\" />\n"; } + if ($u->{bdate} && $u->{bdate} ne "0000-00-00" && !$comm && $u->{allow_infoshow} eq 'Y') { + my $bdate = $u->{bdate}; + $bdate =~ s/^0000-//; + $ret .= " $bdate\n"; + } + if ($u->{allow_contactshow} eq 'Y' && ($u->{country} || $u->{state} || $u->{city})) { + my %countries = (); + my %states = (); + my ($country, $state); + LJ::load_codes({ "country" => \%countries, "state" => \%states }); + $ret .= " \n"; + $ret .= " " . LJ::exml($u->{city}) . "\n" if $u->{city}; + $ret .= " " . LJ::exml($states{$u->{state}}) . "" if $u->{state}; + $ret .= " " . LJ::exml($countries{$u->{country}}) . "" if $u->{state}; + $ret .= " \n"; + } + # interests, please! # arrayref of interests rows: [ intid, intname, intcount ] my $intu = LJ::get_interests($u);