Jadzia (jadziahp) wrote in component_help,
Jadzia
jadziahp
component_help

friends list

Hi all,
first, thanks for all the tutorials and all, I've been able to custumize my journal in just a couple of days with them, starting from absolutely knowing nothing about S2.

But now, and sorry to bother, I've got this problem I'm really really not getting anywhere with.

I wanto to make a component with all my friends listed...

which I could do manually, but then, everytime I add a friend or a community, I'd have to manually update it. Now, what I could understand is: there is embedded into the core layer, the Friend class, one of its members is the username var, which, if I understood correctly, is a string containing all the username of my friends.

Now, using something like this ((keep in mind it's just an idea, it doesn't work at all)) inside the pint_free_text function:

print_comp_header("friends");
foreach var int i (0 .. ((size $username) - 1)) {
"""<a href="$*SITEROOT/users/$username">$username</a><br />""";
}
print_comp_footer();

I should be able to do it and then improove it using the journal_type variable to make separate lists for friends and comms.
Problem is, I don't understand what is the proper name to call the variable...I mean, I think this is the problem...when you call journal_type the one that is member of the Page class, you call it $p.journal_type...right??? (again, still trying to learn it all so I don't know if I'm understanding it correctly)

So, if any of you has asny idea at all, it would be much appreciated.
Jadzia
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 10 comments