Vulnerability in EPiServer.Forms
I would like to add an image to each room in a forum. The images will be shown when the rooms are listed etc. What is the best way to do this? I did some testing with attributes but couldn't find a way to set their values from the admin interface? Administrators need to be able to set and change the images.
There is something they call Icons that can be attached to rooms, where you upload a bunch of images that the administrator can assign to forums and rooms. Then you need to write the code to render the images I think. I havent looked into this myself, but that may be a possible solution.
The icons are mentioned in the Functions Manual, p. 19 ->I can't find any documentation on it beyond the few lines of fluff that is written in the Functions Manual, so you need to ask around or test yourself. The feature is undocumented in the Programmer Manual AFAIK. TheSDK is no better...
So you try, and repost a solution ;)
I'm afraid icons is a attribute for Topics and not for Rooms (correct me if I'm wrong). If you need images for rooms and they should be administrated like you describe I think you're best off extending the admin interface with a custom user control which you link to in \EPiServerCommunity\Menu.ascx. It will require some work though.
If you don't use the Topic-icons functionality for topics you could possibly create a special topic in each room which you don't list when listing the rooms topics but use to fetch the image from. It wouldn't exactly be pretty but you won't have to extend the admin interface.
Ahh.. I see the Topic class has an Icon, so it seems you are right Joel. But couldnt you extend the Room class to have the same Icon properties as Topic? Dunno how to do this, but it may be an option.
As Joel mentioned, making an extension to the admin interface is a possibility. I did this for my project, and if you need some pointers, I've written up a summary here
You could definetly extend the Room class to have a Icon property, but it won't show in the admin interface :(
Icons for rooms is actually a feature I've recalled needing myself. Feature request submitted :)
I will submit the feature request to the community team.
Thanks for all the tips and feedback!
It turns out that I need to add more attributes than the image to the Rooms, so at the moment I'm considering creating a page type for "room settings" which editors can use to set image etc for each room (i.e. when a room is created in the community, they also set up a room settings page for it). Any suggestions or comments on this? The other option is of course to extend the admin interface.