You are probably out of compliance with your software licences.
This isn't tech-related in the least, but my family just got back from staying at the Ramada Inn in Kearney, Nebraska. It wasn't pretty.
Not that Kearney is a likely destination for Slashdotters, but for those who might find yourselves there: you've been warned.
Refactoring relationships
Right now, relationships are embedded into the comments section of story pages with tags like:
<span class="zooicon"><a href="//science.slashdot.org/zoo.pl?op=check&uid=198669"><img src="//images.slashdot.org/fof.gif" alt="Friend of a Friend" title="Friend of a Friend"></a></span>
This is ugly for a few reasons. First, it's a mess. Second, it means that every visitor has to have their own custom-rendered comments sections so you can't apply aggressive caching to the page-generation code. I would replace this with per-user CSS.
First, create a CSS file for each user like this:
/* Default class */
a.relationship {
background: url(neutral.gif);
width: 12px;
height: 12px;
display: inline-block;
text-decoration: none;
}
/* User-specific values start here: */
/* Friends */
a.user3352,a.user42 { background: url(friend.gif); }
/* Foes */
a.user666 { background: url(foe.gif); }
Next, replace the HTML in the comments section with generic relationship information such as:
<link rel="stylesheet" type="text/css" href="relationships.css">
[...]
<p>by neutral (1234) <a href="bar" class="user1234 relationship"> </a> on 2008-01-20</p>
<p>by Just Some Guy (3352) <a href="bar" class="user3352 relationship"> </a> on 2008-01-20</p>
<p>by foe (666) <a href="bar" class="user666 relationship"> </a> on 2008-01-20</p>
All "a" tags with the "relationship" class get the default CSS values. If there is also a corresponding "user*" selector in the visitor's stylesheet, then the values in that selector override the defaults. For a sad user with no friends, this means that everyone gets the neutral.gif icon. As that user accumulates more specific relationships, those CSS definitions are applied instead.
This benefits Slashdot because suddenly they don't have to generate a brand new comments section for every visitor. The per-user CSS would also be extremely simple to generate. In any case, it would be no more difficult than the current method of embedding all that information directly into the comments section.
Finally, those CSS files could also be cached very easily. Since they would only change whenever a user's relationships are modified, Slashdot would no longer have to query that information every single time it creates a page.
There are two drawbacks to this idea. First, there are no more alt attributes on images, so users don't see a "Friend" popup if they hover over the relationship button. If that's a problem, replace the icons with little smiley or frowny faces as appropriate. Second, it would take slightly more work to support putting users in multiple categories at the same time ("Friend" + "Freak"). The fix is to create a whole set of graphics like "friend_freak.gif" and "foe_friendoffriend.gif" and corresponding CSS classes. There aren't that many categories, though, so it would require only minimal extra work to cover every possible combination.
How 'bout it, Taco - could you use something like that? Less code, less bandwidth, and less processing should be pretty easily reachable goals.
UbuntuDupe screwed up an Ubuntu installation almost two years ago. He still hasn't gotten over it.
UD, let me give you some free advice: move on. Really. You don't even have to admit that you were wrong. Just stop yapping about it and move on.
Do you notice that every time you bring this up, everyone opposes you? It's not because we don't like you, but because even if you were in the right (which you weren't), after two years we simply don't want to hear it anymore. Stop embarrassing yourself and let it die already, OK?
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the Poster. The Rest © 1997-2008 SourceForge, Inc.