?

Log in

No account? Create an account
April 23rd, 2002 - LiveJournal Development — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

April 23rd, 2002

getinterests mode [Apr. 23rd, 2002|10:41 am]
LiveJournal Development

lj_dev

[wolfieboy]
So, why isn't there a mode to get the interests for a user.
I figure that it should be that difficult to put the following into cgi-bin/ljprotocol.pl:
# Note - this is untested code - but the code is trivial
#
sub getinterests
{
my ($dbs, $req, $err, $flags) = @_;
return undef unless authenticate($dbs, $req, $err, $flags);

my $res = [];
my $dbr = $dbs->{'reader'};

my $sth = $dbr->prepare("SELECT i.interest, i.intcount, i.intid " .
"FROM interests i, userinterests ui " .
"WHERE i.intid=ui.intid AND ui.userid=$u->{'userid'}"
);
$sth->execute;
my %interests = ();
while ($_ = $sth->fetchrow_hashref) {
push @$res, { interest => $_->{'interest'},
};
}
$sth->finish;
return $res;
}

As I said, this code is untested but would be trivial to check. If this is something that would be desired, I can make sure this works and update protocol.dat once someone tells me how.
link8 comments|post comment

tellafriend.bml bug [Apr. 23rd, 2002|11:21 am]
LiveJournal Development

lj_dev

[supersat]
As pointed out here, there's a bug in the tellafriend.bml page where it won't show the username in the template e-mail it provides (It simply says "Check this out... I saw this journal entry while reading 's journal:"). This patch fixes that. Tested.
link4 comments|post comment

Search patch [Apr. 23rd, 2002|07:23 pm]
LiveJournal Development

lj_dev

[freso]
[mood |accomplished]
[music |Mikal the Ram - Gather Ye Pipers]

I've been thinking about how wonderful it'd be if I could search for Y! nicks and M$N addresses for while, like one can search for ICQ and AIM users... so... I just wrote a small patch to do it...
Test it here: http://lj.teencity.org/
Patch here: http://www.teencity.org/search.patch
(thanks to supersat for hosting it :))
If someone has any arguments against having it committed (or can think of a better wording than 'Y! Nick' ('Yahoo! SN'?), 'MSN Address', and 'Jabber Address') please let me know... I'll send it to Brad if there's no complains or bugs... :P

Oh, yeah... and I added Jabber while I was at it... :)

Update: It's now 'Yahoo! ID', 'MSN Username', and 'Jabber', to comply/stay consistent with what is asked for/shown at the userinfo-page.
link21 comments|post comment

navigation
[ viewing | April 23rd, 2002 ]
[ go | Previous Day|Next Day ]