- Overview
- Features
- Requirements
- Known problems
- Tutorials
- Pledges
- Credits
- Get the code from Git
This module allows you to exclude certain paths from rendering the administration menu. It can be useful for example if you are using Civicrm, as it loads its own menu bar.
It creates a new tab in the administration menu configuration page to write the url's you want to exclude.
It requires to have installed Administration menu (https://www.drupal.org/project/admin_menu).
At the moment, Administration menu doesn't allow you to exclude paths.
-Install as usual, see https://www.drupal.org/documentation/install/modules-themes/modules-7
-Go to admin/config/administration/admin_menu. There you will have a new tab called Exclude. Add each url in a different line. You can use * at the end of the url as a wildcard.
-Include other filters apart of path, like exclude by content type. New features can be asked.
Leukaemia & Lymphoma Research
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sguardiola/2299429.git admin_menu_exclude
cd administration_menu_exclude
Link to the sandbox project: https://www.drupal.org/sandbox/sguardiola/2299429
Manual reviews of other projects:
https://www.drupal.org/node/2088341#comment-8963239
https://www.drupal.org/node/2301571#comment-8963245
https://www.drupal.org/node/2343401#comment-9173057
Comments
Comment #1
prafullmathur commentedProject page
Your project page is very sparse. Please take a moment to make your project page follow tips for a great project page.
So please provide Git details on project page to review your code.
Comment #2
guardiola86 commentedComment #3
guardiola86 commentedComment #4
guardiola86 commentedComment #5
guardiola86 commentedComment #6
guardiola86 commentedProject page amended. Waiting for more feedback.
Comment #7
gwprod commentedYour git command is in an incorrect format.
It should be something like this:
Comment #8
guardiola86 commentedComment #9
guardiola86 commentedComment #10
guardiola86 commentedComment #11
guardiola86 commentedChanged git command
Comment #12
gwprod commentedAutomated report from pareview.sh
FILE: /var/www/drupal-7-pareview/pareview_temp/admin_menu_exclude.module
--------------------------------------------------------------------------------
FOUND 11 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------------
2 | ERROR | [x] Additional whitespace found at start of file
25 | WARNING | [ ] A comma should follow the last multiline array item. Found:
| | )
26 | WARNING | [ ] A comma should follow the last multiline array item. Found:
| | )
32 | ERROR | [ ] Doc comment short description must end with a full stop
33 | ERROR | [ ] There must be exactly one blank line before the tags in a
| | doc comment
33 | ERROR | [ ] Missing parameter comment
33 | ERROR | [ ] Missing parameter type
34 | ERROR | [ ] Missing parameter comment
34 | ERROR | [ ] Missing parameter type
52 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
53 | ERROR | [x] Space found before comma in function call
53 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
| | but found "false"
65 | ERROR | [ ] Files must end in a single new line character
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
In admin_form_exclude.module:
I am not sure what to make of including a form element directly within another form element, as you do in
I don't recall ever seeing it before, though I do not know for certain it is 'wrong'.
admin_menu_exclude_init() does not implement hook_boot().
Also note the general rule about 120+ lines of code and 5 functions.
Comment #13
guardiola86 commentedSolved issues.
-Regarding the $form['exclude'], I'm happy to modify it if an alternative is provided.
-If in a future the module has more than 120 lines I will create a admin.inc file and move some functions there.
Comment #14
gwprod commentedIt doesn't matter much to me, and I don't know for a fact that it's wrong, but I would do this:
Comment #15
guardiola86 commentedChange applied
Comment #16
guardiola86 commentedComment #17
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 #18
Anthony Goode commentedHi Sergio,
I have reviewed the module and I did not find any problem so far. It is useful when using Administration menu. Maybe in the future you could add some token functionality for complex menus.
Cheers.
Comment #19
guardiola86 commentedThanks for the review Anthony. I'm happy to add new functionality to the module in a future.
Comment #20
guardiola86 commentedComment #21
perennial.sky commentedHello guardiola86,
I reviewed your module,
Module is not working for me, may be i configured it wrong as your project's readme file i follow everything but i don't know what i am doing wrong
Here is one point regarding with your module code
1. Here is your code
You can use break statement to stop foreach loop so that if $hide variable get its value there is no need to iterative the code further
for example
2. You are using variable_set('admin_menu_exclude_paths', $form_state['values']['paths']);
in your submit function so you should write a code to delete this variable from database when module is uninstall.
Comment #22
perennial.sky commentedComment #23
guardiola86 commentedAdded requested changes.
Comment #24
guardiola86 commentedComment #25
guardiola86 commentedAny news on this? It's almost a month since I published it and it's still in review.
Comment #26
anil280988 commentedYour git command is not in the correct format.
It should be like this : git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sguardiola/2299429.git admin_menu_exclude
Comment #27
guardiola86 commentedComment #28
guardiola86 commentedChanged git command.
Comment #29
guardiola86 commentedComment #30
geekygnr commentedGood module. Most of what I have are small suggestions. I think hook_help() should be implemented before this gets approved.
PAReview
There were no code issues from pareview.sh but it did say you did not have a default branch set.
http://pareview.sh/pareview/httpgitdrupalorgsandboxsguardiola2299429git
Documentation
Repository
There is a version specific branch. You may want to consider looking at how commit messages are formatted in Drupal so you can get into that habit.
Other Suggestions
Comment #31
guardiola86 commented-Changed description in the project page to be more detailed.
-I didn't change the Readme.txt as it's a small module, but I will change it if someone else ask me to do it.
-Added hook_help.
-Set default branch.
Comment #32
guardiola86 commentedComment #33
guardiola86 commentedAny news on this?
Comment #34
pushpinderchauhan commented@guardiola86, thankyou for your work.
Automated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None.
Manual Review
test-nodeunder Exclude paths then it works as intended but If I add node/4 then it doesn't work, can't we implement this for both cases as other drupal modules also work in similar way.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.
Thanks again for your contribution!
Comment #35
guardiola86 commentedAsked about this functionality to be implemented in Admin menu: https://www.drupal.org/node/2324583
Comment #36
guardiola86 commented-Added compatibility with url's not aliased.
-Added drupal_match_path.
-Removed custom submit handler.
Regarding the minimum 120 lines of a project I don't think this project can achieve it, so I would be grateful if after the review process ends someone approves it on my behalf.
Comment #37
guardiola86 commentedI will wait until next monday to see if this functionality will be included in Admin menu module or not, then I'll change the status to Needs review.
Comment #38
guardiola86 commentedChanging status to needs review as I didn't get any response on https://www.drupal.org/node/2324583
Comment #39
pushpinderchauhan commentedMy blocking issues from #34 have been addressed.
I am not seeing any additional blocking issues, so I am setting RTBC. As I am not a git admin, so it needs a second set of eyes from a review admin.
Thank you for your patience and hard work guardiola86!
Comment #40
guardiola86 commentedAny news on this?
Comment #41
geekygnr commentedHi guardiola86,
Having an admin review it to get the project promoted can take some time. I saw that you have two manual reviews done. One more and you can add the PAReview: review bonus tag. Two days after I added that tag my module was looked at.
Comment #42
guardiola86 commentedThanks @geekygnr, I'll try to do one more review, although I've been very busy lately.
Comment #43
guardiola86 commentedComment #44
pushpinderchauhan commentedAutomated Review
Review of the 7.x-1.x branch (commit 1a94883):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Manual Review
admin_menu_exclude_help() has a translatable string broken across lines, a single t() would be good enough here.
Else looks good to me, not seeing any blocking issues.
There is no objection for more than 3 weeks, so i think it is fine to approve now.
Thanks for your contribution, guardiola86!
I promoted this project for you: https://www.drupal.org/project/admin_menu_exclude
Now this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.
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.