View own content
mikesir87 - July 9, 2009 - 19:34
| Project: | Coherent Access |
| Version: | 6.x-1.0 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Jump to:
Description
I've been working on a project that requires me to be able to list all the nodes that a particular user can view or edit, in order of content type. The Shared Posts tab currently only shows the nodes in which you are sharing privileges, but doesn't include the content that you've authored yourself. So, this patch creates another page (?q=view_own_content) that displays all nodes available to the current user by type, with their permission level. I'm just publishing this so anyone can use it, or build off of it. Let me know what you think, as it's my first patch I've ever made. Thanks!
| Attachment | Size |
|---|---|
| viewOwn.patch | 2.6 KB |

#1
A few quick observations.
Is the patch against the latest 6.x-1.x-dev code? If not, can you roll a new patch against 6.x-1.x-dev - the most recent code?
The code in the patch doesn't meet drupal coding standards, so before rerolling it it needs to be fixed up.
The stylesheet isn't included in the patch, so its difficult to see whats intended. But I am not sure the css should be added in this new function. Usually modules implement a hook_init() function to do that.
I also think the own content page would have to be themable (i.e. the patch should provide a default theme implementation), like theme_node_editors and theme_node_viewers in the current code, to allow a theme to modify/override the output.
These are some of the technical problems I saw when reading through the current patch. I haven't actually checked to see how well it functions or considered how it would enhance the module, but thought I should point these problems out since you indicated it was your first patch. Thanks for contributing!
#2
Thanks for the feedback! It's kinda weird how this post was never marked as updated on my "Recent Posts" until just now. Oh well...
I don't think it was put against the dev version, but I can work on that. As far as drupal coding standards, I'll be sure to fix that. Not too hard to do that.
I might need some help with allowing it to be themable. Do you have references on that? I took a look at the api, but do you know of any other good references?
Thanks again, and I should get back to you soon!