Travis Bell (mudpoet) wrote in lj_dev,
Travis Bell

<lj> tag 'community' attribute

I don't know if this has ever been suggested, or if I should suggest it in suggestions first, but there's a feature I thought would be useful and it was easy enough to implement, so I've created two patches. I've added a 'community' attribute to the <lj> tag so that it uses the community icon instead of the user icon and links to /community/username instead of /users/username.

<lj user="lj_dev"> --> lj_dev
<lj community="lj_dev"> --> lj_dev

I don't have a goathack account (nor can I find how to get one) so I have not tested them, but you can get both diffs here: - added LJ::ljcommunity. - checks for 'communtity' attribute and calls LJ::community if it's a valid community.
The patches shouldn't break any existing <lj user="username"> tags, in fact both would work for a community. The only problem (which really isn't a problem) that I see is that you could link a user as a community and the link wouldn't work. You could verify it's actually a community, but that requires an extra DB hit...

Please let me know what you think and especially let me know if jumping right in and writing the code was the wrong way to go about it. Do all suggestions need to go to suggestions first?? (<-- wish that used the community.gif :-p)

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded