Can you use an image/file attribute on a user model?
Permalink
I'm trying to add a few different image attributes to a user model, and I'm running into a couple of problems:
1) The image picker doesn't work on the profile page unless the user is given edit access for the profile edit page. It seems like this is because /tools/required/il8n_js isn't loaded unless you can edit. I can kind of hack this by giving group access to edit the page, then using a javascript hack to remove the header menu unless you are the super admin. This works, but I feel dirty doing it. Is there a way to make sure all the javascript needed is actually there if the file manager is present? The registered user group should have file manager access per the permissions in the dashboard, and can use the picker once they are given access to edit the page. But they shouldn't need edit access to use the file picker.
2) The file picker (when working) doesn't play nicely with rich text area attributes. Or rather, it plays a little _too_ nice - when you pick an image, instead of updating the image picker form field thing, it's inserting the file name and link into the rich text editor. This is a little beyond my javascript skills to fix. It works just fine if you use plain text boxes, but it would be preferable to use rich text editors on a few of the fields.
Any help on getting these two things working would be greatly appreciated.
Thanks!
1) The image picker doesn't work on the profile page unless the user is given edit access for the profile edit page. It seems like this is because /tools/required/il8n_js isn't loaded unless you can edit. I can kind of hack this by giving group access to edit the page, then using a javascript hack to remove the header menu unless you are the super admin. This works, but I feel dirty doing it. Is there a way to make sure all the javascript needed is actually there if the file manager is present? The registered user group should have file manager access per the permissions in the dashboard, and can use the picker once they are given access to edit the page. But they shouldn't need edit access to use the file picker.
2) The file picker (when working) doesn't play nicely with rich text area attributes. Or rather, it plays a little _too_ nice - when you pick an image, instead of updating the image picker form field thing, it's inserting the file name and link into the rich text editor. This is a little beyond my javascript skills to fix. It works just fine if you use plain text boxes, but it would be preferable to use rich text editors on a few of the fields.
Any help on getting these two things working would be greatly appreciated.
Thanks!
Did you ever find a solution?
Cross-posts:
http://www.concrete5.org/community/forums/customizing_c5/user-attri...
http://www.concrete5.org/index.php?cID=36650...