How to add "reputation" under userpics?

Oct 24, 2007 13:04

So I chat a lot on vBulletin type of forums, and what i really like there is "reputation" which users can give to each other. At the bottom one can see how this reputation accumulates, and can also determine who is "popular ( Read more... )

lj icons:userinfo, misc:extra content, advanced

Leave a comment

Comments 15

summertea October 24 2007, 18:11:01 UTC
in forums, that sort of thing is stored in a database per user. we don't have that sort of thing on lj, afaik, so i doubt we can do something like that. @_@

Reply

duseg October 24 2007, 18:23:25 UTC
ok, fair enough.
what about some additional line under the userpic, which i could edit myself? would it be possible to add an additional information, or replace the lj user tag with a custom-made something (maybe an lj user icon, repeat it several times...)

Reply

av8rmike October 24 2007, 19:16:54 UTC
They do something a little like this in component_help, although I'm not sure how. You'd have to re-compile the layout code each time you want to change a user's "rating". Obviously, the community account would have to be Paid or Permanent.
You can change the ljuser images through CSS, but it would be an equal pain to do that for individual users.

Reply

duseg October 24 2007, 19:33:01 UTC
my account is paid.
will check out what they are saying in that community. thank you

Reply


av8rmike October 25 2007, 04:24:58 UTC
OK, here's some code for your community's theme layer. What this will do is replace the icons for your maintainers with the strawberry, but (I think) it'll only work in IE 7, Firefox, Safari, and other browsers that support attribute selectors. Every other icon will be the default LJ ones. If you leave in the CSS you have from before, people viewing the community in IE 6 and other old browsers will still the strawberry next to all the user names. The CSS is based on ephi's tutorial. You can customize it by changing the user names in the quotes, or using a different icon.

function Page::print_custom_head() {
var string[] maintainers = ["duseg", "elladkin", "lentyajka_01"];
var string new_usericon = "http://img522.imageshack.us/img522/73/buonappetitoberrytx2.gif";
var string old_usericon = "http://stat.livejournal.com/img/userinfo.gif";
"""""";
}Let me know if ( ... )

Reply

duseg October 25 2007, 12:30:24 UTC
wow! thank you! let me try this...
i appreciate your attention! :)

Reply

duseg October 25 2007, 12:46:13 UTC
now please bear with me. could a similar layer be set up for another group of users, who would have not strawberry, not baldyman, rather something different? and then another layer? i see around 4-5 groups i would like to set up. and could i move those users from one layer to another any time?

Reply


av8rmike October 25 2007, 17:56:21 UTC
OK, this is going to look really complicated, but it's not. ;) Replace the previous code I gave you with this one.
Basically, the users and their corresponding group is stored in the $users_groups{} associative array. The user name goes in the first column, the group to which they belong goes in the second (The => "points to" the user's group). In the array $new_usericons{}, put the group name first, then the URL to the icon you want to use for that group. I've done "maintainers" as an example. You can add as many groups as you want to each array; however, a user can't be in more than one group at once. Similarly, you can't have more than one icon per group.
function Page::print_custom_head() {
# User name first, then the corresponding group name
var string{} users_groups = { "duseg" => "maintainers ( ... )

Reply

duseg October 25 2007, 18:24:23 UTC
wow. i love ya :)
thank you!

/you are going to laugh at me now, but asking this made me actually go into tutorial and learn more about s2, and the layers. as i tried adding your code into a new layer, and it didn't work. i will get it soon, and will let you know how it worked, with the screenshot/

Reply

duseg October 26 2007, 02:46:25 UTC
i don't know what i am doing wrong. maybe i didn't comprehand the basics. if i have a "custom css", none of my changes in the layers are visible.

if i delete custom user layer, and work in customizing a theme layer, still nothing is visible and... what am i doing wrong? not only this code doesn't work, none of my other changes show up
... )

Reply

av8rmike October 26 2007, 13:22:27 UTC
Yes, LiveJournal just yesterday ended the beta test phase of the new customization section and made it active for everyone. And there was much grumbling (not just you, lots of people). =(

There's a tutorial here about making a theme layer for Expressive. The only thing that's different now is how you access the Advanced area:
  1. Go to customize page, then click on "Developer Area" on the left. This section's design hasn't changed at all.
  2. Click "Your Layers"
  3. Select the community in the "Work as user:" pull-down box and hit Switch.
  4. You can either create a new theme layer or use an existing one, if you still have one. Add in the code I gave you to the theme layer and compile. Just make sure you include these lines at the top of the layer along with the layerinfo lines:
    set base_theme = "holiday-stripes-green";
    set theme_designer = "Lilia Ahner";
    set theme_designer_type = "outside";
  5. I haven't found if there's an easy way to apply a custom theme in the new system. So, we do this the old way. Back to the "Advanced" section and click "Your ( ... )

Reply


Leave a comment

Up