Log in

No account? Create an account
20 November 2006 @ 01:58 am
paidmembers link  
the paidmembers join link that you see on its userinfo page is generated by the following code:
LJ::register_hook("userinfo_join_community", sub {
    my $o = shift;
    my $r = $o->{'ret'};
    my $u = $o->{'u'};
    $$r .= BML::ml('/userinfo.bml.membership.paidmembers2', {'aopts1' => "href='$LJ::SITEROOT/paidaccounts/'", 'aopts2' => "href='$LJ::SITEROOT/paidaccounts/joincommunity.bml'"}) if $u->{'user'} eq "paidmembers";

slightly related to permmembers because we were interested in seeing the same thing happen for us.

there's some other function somewhere that i haven't found yet that automatically adds paid users as a member to the paidmembers community.
Stevestevieg on November 20th, 2006 10:45 am (UTC)
(under sub add_paid_time)
$LJ::CACHE_PAIDGROUP ||= LJ::get_userid("paidmembers");

if ($u->{'journaltype'} eq "P" && $LJ::CACHE_PAIDGROUP) {
# add as friend to paidmembers group (if it exists on this server)
LJ::add_friend($LJ::CACHE_PAIDGROUP, $userid);
kunzitekunzite1 on November 20th, 2006 10:45 am (UTC)
thanks! :D
Stevestevieg on November 20th, 2006 10:46 am (UTC)
No problem! :D
Yáng Yuǎn Zhìadudeabides on November 21st, 2006 08:41 pm (UTC)
Awesome. With specifics on this, now, how do we go about getting this implemented? :D suggestions?
kunzitekunzite1 on November 22nd, 2006 01:19 am (UTC)
most likely.

with something along the lines of "there's LJ.com-specific code to do this for paidmembers, so, code could be written to do it for permmembers as well."

however, the "automatically add as friend" (in this case, being a member of the community) would only benefit future permanent accounts and not pre/already-existing ones. :\
Yáng Yuǎn Zhìadudeabides on December 3rd, 2006 06:33 pm (UTC)
But that could still be beneficial.

And if they announce permmembers in news, we might could get a few stragglers.

So...how can we convince those who read suggestions (and the site head honchos) that they should implement this for a non-official community?

(Would you be willing to jointly write the suggestion?)
Yáng Yuǎn Zhìadudeabides on November 21st, 2006 08:44 pm (UTC)
Oh...and now we need to get all permanent accounts automatically added to permmembers, as is done with paidmembers. hehe