Integration with the Variable module enables modules, like the Contextual Variables and Configuration builder modules, to expand the functionality of this module, allowing for things like variable switching based on environment or customized configuration pages and more.

Additionally Variables could be integrated with Features module as well for export.

It seems currently, module would have a few configuration variables that could be integrated:

  • nice_menus_number
  • nice_menus_js
  • nice_menus_sf_delay
  • nice_menus_sf_speed

Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this issue, I would be glad to provide more information or explain in more details.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DYdave’s picture

Quick follow-up on this issue:

Please find attached to this comment a patch against nice_menus-7.x-2.x branch at 1c97577 that should add an initial version of the nice_menus.variable.inc integration file which should already cover all existing module's configuration variables.
File attached as: nice_menus-add-variable-integration-2074415-1.patch

The patch adds a new file called nice_menus.variable.inc which contains the implementation of two hooks from the Variables API:

  • nice_menus_variable_info to declare the variables nice_menus_number, nice_menus_js, nice_menus_sf_delay, nice_menus_sf_speed, each one with its variable type (string, boolean, select).
    The validation callback for the nice_menus_number field was taken from the existing nice_menus.admin.inc.
  • nice_menus_variable_group_info to add a new group for the module.

Additionally, while carrying these changes, to the module, I actually noticed that there might be a few minor improvements that could be further made to the admin configuration form.
Therefore, this patch also makes a few small changes to the file nice_menus.admin.inc.

This patch has been tested and seems to work as expected, but I would greatly appreciate to have your feedback, questions, comments, reviews, suggestions, recommendations, improvements and testing for this patch.

Feel free to let me know if you would have any further comments, issues, questions, objections, recommendations, suggestions, testing, reporting or concerns on the attached patch or any other aspects of this ticket in general, I would be glad to provide more information or explain in further details.

Thanks in advance to all for your feedback, reviews, testing and reporting.
Cheers!

DYdave’s picture

Quick fix on previous patch.

Please ignore previous patch and review the new one attached in this comment as:
nice_menus-add-variable-integration-2074415-2.patch

Quick fix for coding standards: there were some wrong indents in previous patch.

Thanks in advance to all for your feedback, reviews, testing and reporting.
Cheers!

xiukun.zhou’s picture

Status: Needs review » Fixed

Thanks DYdave.
commit:
7.x-2.x 40ec8f3
7.x-3.x bbab781

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.