Kindly asking for help with a plugin
I've created a plugin that is already working, but quite ugly and not finished. The plugin should do following:
1. if user1 opens profile of user2 a db entry is created
2. if user2 looks at his own profile he has a new menu entry
3. that menu entry shows links to a view that lists every user who clicked his profile
Look at the screenshots and you will see and understand. The plugin is for Vanilla 2.1b2 and can be downloaded here: https://github.com/R-J/ProfileVisitors/archive/master.zip
I already have it working but there are some things that are not working by now and here are my questions:
1. my view doesn't look like any other profilecontroller view. Could anybody tell me what I have to add or have to change?
2. my list should look like the activity list in profile but it does not. When there are no profile pictures, there is no space left free
3. in activity view there is some extra text that makes images fit into rows height. My rows are too small. I want rows with pictures be big enough and rows without picture to be smaller
4. I think it would be fine to allow that feature only for configurable roles. How can I test if a user has a special role? How about creating a special permission and apply that to rules specified in settings? But if I use the configurationmodel in settings, how can I react on a change (which I would have to do if I use permissionmodel)?
5. I hook base_render_before and test if Sender is the ProfileController. Isn't there a better hook if I want to do something whenever a profile is accessed?
6. I think a logo would be fine once the plugin is finished...
Yes, I admit I'm a bit lazy. I haven't looked at other plugins to find my answers, but I'm a little bit short of time and would like to finish that plugin soon.
Many thanks for any help!