User variables in UserList components

Everything about the SmartFoxBits UI Components for SmartFoxServer 1.x. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

Post Reply
patso
Posts: 380
Joined: 13 Nov 2006, 13:44
Location: Sofia, Bulgaria

User variables in UserList components

Post by patso »

I think it'll be useful if it's possible to display user variables next to the user name in the UserList component. For example if it can display the user rating next to the user name. May be if there is component property in which you can state the variables you want to be displayed.

And if the list can be sorted not only by the user name but also by the user variables (the rating in your case) it'll be awesome.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: User variables in UserList components

Post by Bax »

patso wrote:I think it'll be useful if it's possible to display user variables next to the user name in the UserList component. For example if it can display the user rating next to the user name. May be if there is component property in which you can state the variables you want to be displayed.
Both UserList & RoomList components have the "labelFunction" & "iconFunction" properties, which are very useful to do what you mention: display user/room properties. You just have to set those properties to your own functions, to which an "item" object is passed at render time. This object contains a reference to the SFS Room object (for the RoomList component) or to the SFS User object (for the UserList), so you can retrieve any info you need to display, also room/user variables. Check this example in the docs.
patso wrote:And if the list can be sorted not only by the user name but also by the user variables (the rating in your case) it'll be awesome.
Currently you can't set a custom sorting function... we will keep this suggestion for the next release! :)
Paolo Bax
The SmartFoxServer Team
Post Reply