Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module creates a block, which displays a list of links to admin tasks for an OG group, for an OG group administrator. The OG context must be set to the group you want the links to relate to on the page(s) the block is displayed.
More information on the project page:
https://drupal.org/sandbox/__cj/1926754
git clone --branch 7.x-1.x http://git.drupal.org:/sandbox/__cj/1926754.git og_admin_block
Comment | File | Size | Author |
---|---|---|---|
#13 | og_renamed_content_type.png | 9.9 KB | er.pushpinderrana |
#13 | og_new_content_type.png | 7.11 KB | er.pushpinderrana |
#13 | og_admin_block_notices.png | 5.59 KB | er.pushpinderrana |
Comments
Comment #1
robin.ingelbrecht CreditAttribution: robin.ingelbrecht commentedHi __cj ,
Pareview shows some errors in your code:
http://pareview.sh/pareview/httpgitdrupalorgsandboxcj1926754git
- You should delete your master branche
- Add a README file
- Apply all coding standards.
Comment #2
ydahiWould like to take a moment to promote this project - very useful and works like a charm!
Comment #3
__cj CreditAttribution: __cj commentedThanks Robin - I've done these bits.
Thanks ydahi, for the review, and for adding the issues.
EDIT:
Add links to issues ydahi added
Comment #4
__cj CreditAttribution: __cj commentedComment #5
PA robot CreditAttribution: PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #6
dimduj CreditAttribution: dimduj commentedHi __cj,
Here are some observations on your module (this is part of the review bonus workflow ;) ).
1
--
You should remove your username (prefix) from your git clone instruction:
git clone --branch 7.x-1.x http://git.drupal.org:/sandbox/__cj/1926754.git og_admin_block
2
--
You use some variable in your code but there is no admin to define theme:
variable_get('og_admin_block_exclude_' . $node_type, 0);
You should also clean your variable in a hook_uninstall
3
--
Your caching strategy for your block is quite heavy. the granularity is in fact not per role per page but per role per og_context right ?
Maybe you should consider using a DRUPAL_CACHE_CUSTOM and implement the caching mechanism in your
in your hook_block_view() ?
Useful module BTW, this definitively lack on og module ... (maybe you should try to merge your code in the existing OG module ?)
Regards,
Dimitri
Comment #7
__cj CreditAttribution: __cj commentedComment #8
__cj CreditAttribution: __cj commentedHi Dimitri,
Thanks for the in depth review.
1 - Sorted.
2 - Uninstall hook added.
3 - Good spot! I've done as you suggested and am using DRUPAL_CACHE_CUSTOM, and caching per user og role(s), per og context.
Chris.
Comment #9
johnennew CreditAttribution: johnennew commentedThe API file, the document above each hook should describe the hook, not just say Implements hook!
Otherwise, great module - you are my hero.
Comment #10
Angry Dan CreditAttribution: Angry Dan commentedHi Chris,
I'd suggest renaming this variable to og_admin_block_include_…. It'll help you avoid double negatives
Comments like this are often superfluous.
This module appears to be tied to nodes; it's not compatible with OG's wider entity support. That's probably fine because most people don't use OG for anything other than nodes, but you might want to note it on the project page. I don't think you have a bug with this because I'm pretty sure that
og_context()
only returns if the current group is a node.You should always declare globals at the top of a function body.
Nice module!
Comment #11
__cj CreditAttribution: __cj commentedThanks ceng - I've added the document comment in the api file.
Thanks Angry Dan I've changed the variable to include as suggested, updated the module page, and moved global $user to the top of the function.
I think that gives me the required number of reviews - thanks everyone!
Chris.
Comment #12
johnennew CreditAttribution: johnennew commentedI personally feel this is good to go now.
Comment #13
er.pushpinderrana CreditAttribution: er.pushpinderrana commented@__cj, thankyou for this nice module.
I have use OG module in number of my projects and its flow is little bit complex but your module gives a block that helpful for admin users to play with OG from one place.
Automated Review
Best practice issues identified by pareview.sh / drupalcs / coder. One minor issue found.
Manual Review
Now I renamed Test New Content Type with Rename New OG Content Type as shown below.
And again check the OG Admin block but it still appears the same.
Rename Content type is not updated here still previous label is coming that looks wired and need to be fix.
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
As I am not a git administrator, so I would recommend you, please help to review other project applications to get a review bonus. This will put you on the high priority list, then git administrators will take a look at your project right away :-)
Thanks Again!
Comment #14
__cj CreditAttribution: __cj commentedThanks er.pushpinderrana.
I've updated the coding standards
Coding style & Drupal API usage
I think that takes me to 6 reviews! Thanks everyone!
Comment #15
johnennew CreditAttribution: johnennew commentedI personally feel this is good to go now. I've been using this module for some time now and would like to see it available as a full release!
Comment #16
Angry Dan CreditAttribution: Angry Dan commentedThis is also RTBC in my opinion. This is a useful module, and I think it's time to release it to the wider community!
Comment #17
mike.davis CreditAttribution: mike.davis commentedI've been using this for a while now and it works great. Would be great to get this out as a full release.
Comment #18
johnennew CreditAttribution: johnennew commentedThe whole world needs a full release of this module!
Comment #19
kscheirerIn og_admin_block_form_node_type_form_alter(), shouldn't this
variable_get('og_admin_block_include_' . $node_type, 1)
have a default of 0 instead since the user hasn't enabled anything when the module is installed? Or is it your intent that content types will show up by default unless disabled?Checked for security, licensing, Drupal API, duplication, and individual account, no blocking issues found.
Thanks for your contribution, __cj!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.