Gorilla (gorillashaman) wrote in lj_dev,
Gorilla
gorillashaman
lj_dev

userinfo.gif

Help me out here...

Inspired by http://www.rosequoll.com/lj.shtml

It seems like it out to be easy enough for users to specify one of their userpics (specified by the keyword "userinfo") to be used instead of the standard userinfo.gif whenever someone does a <lj user=something> tag with their name.

So I poked at the source a little, and found two spots that looked like likely candidates. The first is livejournal/cgi-bin/LJ/User.pm, and I sort of took a stab at starting, but quickly got bogged down in userpic / userpic2 stuff. I guess I just don't understand the db schema here, and haven't done much LJ programming, so I didn't get very far. Maybe someone who knows what they're doing can finish this off in 10 minutes:


diff -r1.50 User.pm
1937c1937
<         return "</a></b></a>";
---
>         return "</a></b></a>";
1941c1941
<         return $make_tag->('community.gif', 'community', 16);
---
>         return $make_tag->('$img/community.gif', 'community', 16);
1943c1943
<         return $make_tag->('syndicated.gif', 'users', 16);
---
>         return $make_tag->('$img/syndicated.gif', 'users', 16);
1945c1945
<         return $make_tag->('newsinfo.gif', 'users', 16);
---
>         return $make_tag->('$img/newsinfo.gif', 'users', 16);
1949c1949,1957
<         return $make_tag->('userinfo.gif', 'users', 17);
---
> # TODO
> #       if (the user has a userpic named 'userinfo'
> #       {
> #          return $make_tag->('userpics/ !what goes here?! ', 'users', 17);
> #       }
> #       else
> #       {
>            return $make_tag->('$img/userinfo.gif', 'users', 17);
> #       }



The other possible spot was in ./livejournal/bin/upgrading/s2layers/core1.s2 around line 1454. Now THAT's off in S2 land I think, and I REALLY have no clue what to do there.

Can some kind soul finish this up? What are the odds it would make it into the real site?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 44 comments
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →
Previous
← Ctrl ← Alt
Next
Ctrl → Alt →