CSS Menu
enables expandable menus. It uses only CSS for menu (no javascript/JQuery).
Currently two types of menus are possible with CSS Menu ie. menus Vertical down fly and Vertical right fly.
CSS Menu provides a simple and powerful configurable interface using color picker to set menu color schema (menu bgcolor, menu text color, mouse over text color) with preview option. User can create colorful menu using just some mouse clicks. No need to write CSS to override menu color.
CSS Menu also gives opacity effect for sub menu item.
Each CSS Menu is a configurable block and easily associated with any existing site menu which can be place as normal block in a theme region.
Project Sandbox
http://drupal.org/sandbox/AtulBhosale/1289456
6.x-1.x Git Repository
git clone --branch 6.x-1.x http://git.drupal.org/sandbox/AtulBhosale/1289456.git css_menu
Drupal Version
Drupal 6
Live demo
CSS Menu
Click image to open in new window

Dependencies
- Menu
- Libraries
Installation instructions
- Download from colorpicker.zip from http://www.eyecon.ro/colorpicker
- Extract the downloaded .zip to the folder site/all/libraries.
- After extracting .zip, following folder structure should exist
- sites/all/libraries/colorpicker
- sites/all/libraries/colorpicker/js
- sites/all/libraries/colorpicker/css
Reviews of other projects
http://drupal.org/node/1431366#comment-5791098
http://drupal.org/node/1203186#comment-5791406
http://drupal.org/node/1424054#comment-5833494
http://drupal.org/node/1438844#comment-5833882
http://drupal.org/node/1525062#comment-6091914
http://drupal.org/node/1615188#comment-6092148
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | coder-result.txt | 4.19 KB | klausi |
Comments
Comment #1
sreynen commentedSandbox project: http://drupal.org/sandbox/AtulBhosale/1289456
Is this different enough from http://drupal.org/project/nice_menus that you couldn't collaborate? If so, please post an explanation of the differences to the project page and move this back to "needs review." If they are similar enough, you should contribute to the existing project rather than creating a new project.
Comment #2
atul.bhosale commentedProject description updated and following is interface snapshot:

Click image to open in new window
Comment #2.0
atul.bhosale commentedDescription updated and interface snapshot added
Comment #3
jthorson commentedFrom a quick glance, it appears that the only difference between this and the 'nice menus' module is the in-admin configuration of the menu css attributes. Am I correct?
If this is the case, would you consider approaching the maintainer of the 'Nice Menus' project with a patch to add the in-admin configuration of css styles to that project, rather than make end-users choose between two modules that otherwise do the same thing? (Given the choice, many end-users will choose the older, more established project ... and thus not be able to benefit from your work in this module.)
Also, can you please shrink the screenshot image which is included on your sandbox project page? It breaks the layout of the page, and hides the repository links that many of us depend on in order to perform code reviews.
If you do choose to move forward with this module, rather than simply adding the configuration enhancements to the existing 'nice menus' module, then Coder reports one trivial issue which you should fix up:
cssmenu.install
Line -1: @file block missing ( http://drupal.org/node/1354#files )Also, it appears that there are a number of cases where unsanitized data could be output to the screen, thus resulting in vulnerability to XSS attacks. Please ensure that any variable text (menu titles or descriptions, for example) are passed through a sanitization filter such as check_plain, filter_xss, or filter_xss_admin before being output to the screen.
Comment #4
atul.bhosale commented@jthorson
Thanks for review.
The difference is configuration of the menu css attributes. But I decided to move forward with this module.
Also the project description page is updated (screenshot is shrink) and @file block is added in .install file.
For vulnerability I added "check_plain" for description and check CSS menu module with the Code review and result is "Coder found 1 projects, 3 files, 0 warnings were flagged to be ignored".
Comment #5
atul.bhosale commentedComment #6
atul.bhosale commentedComment #7
jthorson commentedI see no new code in your sandbox repository since September 24th.
Comment #8
atul.bhosale commentedForget to execute "push" after "commit" :(
Now updated code is available.
Comment #9
atul.bhosale commentedForget to execute "push" after "commit" :(
Now updated code is available.
Comment #10
jthorson commentedA few more comments ...
1. Your cssmenu.info file needs a few more lines ... for example, the core version of Drupal that this is supposed to work with.
2. Can you comment on why you have multiple css files, with the same definitions appearing in multiple files? Unless there's a valid reason for this, the files should be cleaned up.
3. colorpicker.js / colorpicker images: Is this a 'stock' build of colorpicker? Generally speaking, the preference is to not include 3rd party libraries in your Drupal module ... rather, provide the user with instructions on how to obtain and install the 3rd party library separately. Consider using the Libraries API, which will i) enable multiple modules to use the same library, ii) simplify upgrades to the library code itself, and iii) avoid any potential issues with multiple versions of the same 3rd party library being installed by different modules.
4. custom.js: If this is part of colorpicker, than point 3 above applies. If it is your own code, then check out http://drupal.org/node/304255 and http://drupal.org/node/304258 for information on the 'Drupal' way with regards to custom javascript in Drupal modules.
Comment #11
jthorson commentedPlease keep your questions within the review thread, rather than email ... this way, others can learn from the discussion as well.
There is no requirement that a plugin needs to be from jquery.com ... you can add instructions in your README.txt file asking that users download the colorpicker plugin from the eyecon.ro site, and use hook_requirements to verify that it is installed.
I'd suggest looking at http://drupal.org/project/jquery_colorpicker to see how they did things ... you might even be able to create a dependency on that module (if it makes sense), and skip needing the instructions.
Comment #12
atul.bhosale commented@jthorson
module Jquery Colorpicker also use the colorpicker.js from www.eyecon.ro/colorpicker/ see "Installation Instructions" on project page.
I think instead of creating a dependency on Jquery Colorpicker, I should go with Libraries API (libraries module) way.
Comment #13
jthorson commentedLibraries API is certainly the right way to go! :)
Comment #13.0
jthorson commentedimage width and height updatec
Comment #14
atul.bhosale commentedComment #15
klausiIt appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
Comment #16
atul.bhosale commentedcode updated as per comments, except the following one
Comment should be read "Implements hook_foo()."
In Drupal 6 comment is "Implementation of hook_foo()."
"Implements hook_foo()." convention followed in Drupal7.
Comment #16.0
atul.bhosale commentedIssue description updated
Comment #16.1
atul.bhosale commentedgit link updated
Comment #17
raynimmo commentedYou still have a few minor issues being flagged by the automated code review functions, I also noticed a few style misnomers during a manual review.
Automated Review
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual Review
Had a quick glance over your code and there are however a couple of issues I feel are in need of addressing.
@charset "UTF-8";in your CSS files is not required.Comment #18
atul.bhosale commentedCode updated as per #17-Automated and Manual Review comment.
One thing I have notice about PAReview.sh
even file uses single newline (\n) and in a file no extra line after last line of code eg.
some code .....
some code .....
} <-- and this is a last line of code from file
PAReview.sh shows "All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting" message
but it works fine if one more line added after last line of code eg.
some code .....
some code .....
}
<-- this is last line
Comment #19
raynimmo commentedThe automated review scripts are still flagging you on quite a number of points.
see http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git
Comment #20
atul.bhosale commentedCode updated as per #19 Review comments, except the following one
Format should be * Implements hook_foo().
In Drupal 6 comment is "Implementation of hook_foo()."
"Implements hook_foo()." convention followed in Drupal7.
Test result: http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git-6x-1x
Latest code is available in 6.x-1.x branch
Comment #21
atul.bhosale commenteddid something wrong with branch, showing old code ... :(
Comment #22
atul.bhosale commentedBranch issue corrected and code updated to fix review comments, except the following
FILE: cssmenu.module, cssmenu.admin.inc, cssmenu.install
Doc comment for var $form_state does not match actual variable name &$form_state at position *
I am not sure about this coding standard ERROR, I never seen such type of comment in Drupal 6 code
Format should be * Implements hook_foo().
In Drupal 6 comment is "Implementation of hook_foo()."
"Implements hook_foo()." convention followed in Drupal7.
Missing parameter type at position *
Data type of return value is missing
These standard was adopted as of Drupal 8, see Data types on param/return under Notes on function documentation syntax http://drupal.org/node/1354#functions
FILE: cssmenu.js
81 | ERROR | Files must end in a single new line character
I verified twice line 81 is ended with single line character but still showing error.
Can any one help me ???
Test result:
http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git
Comment #23
raynimmo commentedThe updated reviews scripts are still flagging you on quite a number of issues, see http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git...
Most of the issues where to do with spacing within files where you have used tabs rather than spaces.
You also seem to be missing parameter types within your documentation blocks, as you have previously noted, I would say to you to add these in anyway as previous Coder reviews wont flag them as incorrect even if the standard has only been adopted for D8.
To err on the side of caution and in an attempt to make your module a little more forward compatible I would say to you to attempt to implement some of the Drupal 7/8 styles/standards with regards to commenting. If this method is employed then your reviews will surely go a lot smoother and your documentation will be top class.
Comment #24
atul.bhosale commentedCode updated as per #23 comment, see
http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git-6x-1x
Comment #25
steve.colson commentedI reran http://ventral.org/pareview/httpgitdrupalorgsandboxatulbhosale1289456git... to get the latest code, and it is still showing a few errors.
Comment #26
patrickd commentedSwitching back to needs review as there are only a few issues thrown by pareview.
Comment #27
atul.bhosale commented@stephen.colson
my last commit is on December 21, 2011 at 8:23am and at that time test result is 0 errors
Latest commit of Drupal Code Sniffer for ...enforce the usage of t() in l() calls is on January 15, 2012 6:38 that's why now it is showing error.
Following line is display in test result if any error is found
Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards). See atta.....
any ways :)
code updated as per script result (comment #25).
hope next time PAReview.sh does not show any error in my code ....
thanks patrickd for update.
Comment #27.0
atul.bhosale commentedDescription updated
Comment #28
atul.bhosale commentedChanging Priority to major as The guidelines for elevating application priority are... at http://drupal.org/node/539608
Added tag: PAReviews: review bonus as http://drupal.org/node/1410826
Comment #29
atul.bhosale commentedTag "PAReview: review bonus" removed as manual review comments not added for other project
Comment #29.0
atul.bhosale commentedReviews of other projects added
Comment #29.1
atul.bhosale commentedReviews of other projects section removed
Comment #29.2
atul.bhosale commenteddescription and screen shot updated
Comment #30
atul.bhosale commentedCode updated for
Column added to store style sheet of respective menu to generate CSS
Following issues are fixed
Demo link:
CSS Menu demo
Priority changed as 4+weeks from last review
Comment #31
atul.bhosale commentedReviewer any input/suggestions ??
it's long time after last review........
Comment #32
klausiYou have not listed any reviews of other projects in your issue summary, as strongly recommended in http://drupal.org/node/1011698
See also #1410826: [META] Review bonus.
Comment #32.0
klausiLive demo added
Comment #33
atul.bhosale commentedTag "PAReview: review bonus" added
Comment #34
luxpaparazzi commentedWould it not be nicer having HTML-Code in Theme functions?
_cssmenu_overview_tree_form($tree)
Misspelled comma ...
I reviewed the module and found no security or best practice problems. I don't see any objections for making it a "full project", even so I did not check if it is actually working.
Comment #35
atul.bhosale commentedcomma spell corrected
func "_cssmenu_overview_tree_form" gets call from 2 diff point
1st while rendering menu and
2nd in preview
also it have a recursive call
Thanks.
Comment #36
patrickd commentedComment #37
patrickd commentedvariable_get('file_directory_path', '');this will fail if no variable for this setting is set yet, use file_directory_path() insteadfollow coding standarts and make a new line between short instruction and long function description, keep the descriptions the 'does' way (please correct this everywhere):
$data = $block_data = $menu_details = array();you don't have to initialize $data here, it'll be overwritten on the next line (also I think this syntax is quite ugly)'CSS menu ( ' . $list->title . ' )'keep thing translatable:t('CSS menu (@title)', array('@title' => $list->title)$t('<strong>CSS...remember to put as few HTML as possible into t(), this will make translators life much easierwhy do you craft your own confirmation step, why don't you make use of confirm_form()?regards
Comment #38
patrickd commentedremoving review bonus tag, you can add it again after you've done 3 more reviews (remember to pick old issues).
thanks
Comment #39
atul.bhosale commentedHi patrickd,
not sure about point 12
in code confirm_form() is already used, own confirmation step is used to display title of menu on confirmation form which has to be delete
Comment #40
patrickd commentedYep sorry, I first thought your not using it, but forgot to remove the point afterwards
Comment #41
lawik commentedSetting this up on a D6 install the CSS-settings I configured didn't do anything. The menus were just flat lists without effects or any special CSS.
Am I missing something? The configuration page with colorpicking worked fine, the block was created and I've tried it both in a top or left menu position (using Garland as theme).
Needless to say the Preview-link didn't work. Oddly enough it seems to have a broken edit-path and sends me to admin/build/cssmenu/edit/void(0); which gives me an empty CSS Menu form.
Comment #42
atul.bhosale commentedHi patrickd,
code updated as per #37 suggestion.
on line 313 (now it is 310) in cssmenu.admin.inc check_markup() is used to avoid error in code review.
If check_markup() is remove code review shows following error
cssmenu.admin.inc:
[critical] Potential problem: when FAPI element '#type' is set to 'markup' (default), '#value' only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
and if check_markup() is used then it breaks Click to preview link (if and only if Drupal is setup in sub-directory) and lawik also reported this in #41
Please advice
Comment #43
patrickd commentedNote that automated review tools are pretty dumb about finding security issues - these issues should just point you to the line where a security issue is possible - this does not mean that it actually is a security issue!
As we now know it's a false positive - just ignore it.
Comment #44
xenophyle commentedI am reviewing this module now.
Comment #45
xenophyle commentedVery nice module. It seems to work well. Most of the problems I found were documentation-related.
README.txt
In "Download from colorpicker.zip from http://www.eyecon.ro/colorpicker", remove "from".
There are some more steps I would recommend adding:
- Add the step of enabling the module
- Add instructions for once the module is installed:
-- Go to admin/build/cssmenu/add to configure a new CSS menu.
-- After saving, go to admin/build/block to configure the block that has been automatically created for the menu.
There are a number of things that should be fixed in the function documentation. You should follow the guide here at http://drupal.org/node/1354.
I will also list fixes that document doesn't cover.
cssmenu.admin.inc
Some fixes to user-facing text:
"There are no css menu yet." -> "There are no CSS menus yet."
"Fail to save" -> "Failed to save"
"Fail to update" -> "Failed to update"
"The CSS menu %title have been deleted." -> "The CSS menu %title has been deleted."
Documentation fixes:
"An associated array" -> "An associative array"
I am told it is preferable to use the Form API #attached property (more info at http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_pro...) to drupal_add_js() and drupal_add_css()
cssmenu.module
"This is a simple module that enables the site to have fully configurable CSS menu for site." -> Should say "menus"
The function documentation should start with a 3rd-person verb, for example:
- Doc for cssmenu_load, "Load CSS menu block details." has extra space in front and should be "loads" instead of "load".
- Doc for cssmenu_block "Generate a CSS menu block." should say "Generates"
There are a number of misspellings: "reder" should be "render", "seperated" should be "separated", "alpha/numeric" should be "alphanumeric".
The @ingroup line should be removed, since it should only be used when it lists what groups the function belongs to.
For _cssmenu_preview:
- The first doc line should start with a capital letter and a verb (e.g., "Renders the CSS block...").
- It's hard to understand what the parameters are. Maybe they should say something like
-- Comma-separated list of property keys for the menu
-- Comma-separated list of property values for the menu
For _cssmenu_get_clean_string:
- The documentation "Returns a alpha/numeric sting in lower case" should be "Returns an alphanumeric string in lowercase"
- "String to remove non alpha/numeric characters." should be "String to remove non-alphanumeric characters from."
cssmenu.js
I could be wrong, but I think your JavaScript should have
attach: function (context, settings) {}
to contain the code that isn't function definitions.
Comment #46
atul.bhosale commentedCode updated as per review comments from #45, except following
Form API #attached property (As this is Drupal 6 module)
Comment #47
igoen commentedI do automated project review, and there some minor coding style errors.
Comment #48
atul.bhosale commentedPlease read #42 and #43 comment.
Comment #49
igoen commentedSorry guys. ;)
Comment #50
atul.bhosale commentedHi patrickd and klausi,
any further update/suggestions??
Comment #51
klausiSorry for the delay. Make sure to review more project applications and get a new review bonus and I will get this finished immediately.
Comment #51.0
klausiReviews of other projects added
Comment #52
atul.bhosale commentedTag "PAReview: review bonus" added
Priority changed as 4+weeks from last review
Comment #53
klausimanual review:
require_once dirname(__FILE__) . '/mymodule.inc';But that are no blockers, so I guess this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #54
atul.bhosale commentedHi klausi,
Thanks for updates.
I am done with point no. 1 and 3
Rebuild menu after updating code as change in hook_menu()
Comment #55
misc commentedThanks for your contribution, vaibhavjain! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
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.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #56
atul.bhosale commentedThanks all for your support :)
Comment #58
atul.bhosale commentedComment #58.0
atul.bhosale commentedNew review links added into Reviews of other projects