Should google-api-php-client be a library?
Hi folks, I'm creating a new Drupal module for the connection to Google Calendar using Google API. I know the main aim of Drupal libraries is for CSS and JS instead of google-api-php-client is mainly a PHP library. Do you suggest to me to put google-api-php-client files in sites/all/libraries anyway or to ship google-api-php-client in my module? Thanks, Fair
It really depends on the licensing of the library. If the library is licensed under GPL family licenses, you can ship it with your module. Otherwise, you will have to put the library in sites/all/libraries. See these links: Related issue - http://drupal.org/node/1294060 More info - http://drupal.org/licensing/faq#q7 On 5 December 2011 17:29, webmaster <fairsayan@gmail.com> wrote:
Hi folks, I'm creating a new Drupal module for the connection to Google Calendar using Google API. I know the main aim of Drupal libraries is for CSS and JS instead of google-api-php-client is mainly a PHP library. Do you suggest to me to put google-api-php-client files in sites/all/libraries anyway or to ship google-api-php-client in my module? Thanks, Fair
Hi Fair, Third party code shouldn't be added to your Drupal.org project in most circumstances, see the official policy here: http://drupal.org/node/422996 You should use the excellent libraries module (http://drupal.org/project/libraries) to allow end users to put the library's code in one of many places and you just ask libraries module for that location. It doesn't matter if that library contains CSS/JS or PHP code. Note that there is another 'library' concept in Drupal, that of hook_library (http://api.drupal.org/api/drupal/modules--system--system.api.php/function/ho...) but that is unrelated to the 1.x branch of the libraries module. Hope that helps! Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 024 7666 7277 Mobile : 07702 131 576 Twitter : darthsteven http://www.computerminds.co.uk On 5 December 2011 12:21, Vaidik Kapoor <kapoor.vaidik@gmail.com> wrote:
It really depends on the licensing of the library. If the library is licensed under GPL family licenses, you can ship it with your module. Otherwise, you will have to put the library in sites/all/libraries.
See these links: Related issue - http://drupal.org/node/1294060 More info - http://drupal.org/licensing/faq#q7
On 5 December 2011 17:29, webmaster <fairsayan@gmail.com> wrote:
Hi folks, I'm creating a new Drupal module for the connection to Google Calendar using Google API. I know the main aim of Drupal libraries is for CSS and JS instead of google-api-php-client is mainly a PHP library. Do you suggest to me to put google-api-php-client files in sites/all/libraries anyway or to ship google-api-php-client in my module? Thanks, Fair
Thank you very much for your answers. I have another doubt: is there a Drupal function to show that my module requires a particular library as it is for module's dependancy? Fair 2011/12/5 webmaster <fairsayan@gmail.com>
Hi folks, I'm creating a new Drupal module for the connection to Google Calendar using Google API. I know the main aim of Drupal libraries is for CSS and JS instead of google-api-php-client is mainly a PHP library. Do you suggest to me to put google-api-php-client files in sites/all/libraries anyway or to ship google-api-php-client in my module? Thanks, Fair
participants (3)
-
Steven Jones -
Vaidik Kapoor -
webmaster