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:
For each Provider installed

  • csna_[PROVIDER_ID]_key
  • csna_[PROVIDER_ID]_secret

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 csna-7.x-1.x branch at 9912c56 that should add an initial version of the csna.variable.inc integration file which should already cover all existing module's configuration variables for each provider.
File attached as: csna-add-variable-integration-2074969-1.patch

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

  • csna_variable_info to declare the variables csna_[PROVIDER_ID]_key, csna_[PROVIDER_ID]_secret, each one with its variable type (string, boolean, select) and loop through for each installed Provider.
  • csna_variable_group_info to add a new group for the module: Chinese Social Networks Authentication (CSNA).

Additionally, while carrying these changes, to the module, I actually noticed that there might be a few more minor improvements that could be further made to module's admin configuration form, such as:

  • Adding description texts to all the Key or Secret fields.
  • Adding field validation for all the Key and Secret fields: Currently there is absolutely no validation.

But I guess these other issues could probably be added and fixed in a different ticket/issue.

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!