As per the answer I got from WorldFallz (http://drupal.org/node/131074), I'd love to contribute a PGL module to drupal which interfaces our online reservation system, planyo (http://www.planyo.com). The system itself has free and paid versions and is a highly customizable booking management system for reservations of pretty much anything (tennis courts, rental cars, holiday apartments, hostels, boats). The system is available in 8 languages and can be also translated by users to further ones. It also has an API so there are further integration possibilities for future versions of the module.
The module is 100% finished, joomla and DreamWeaver versions have been already added to their respective directories. I believe this module will be very appreciated by developers using Drupal who need a complex reservation system for their commercial customers (which includes invoicing, collaboration between different moderators, online payments, multi-language support etc. -- all this is included in planyo).
Download link and installation instructions for the Drupal module are available at http://www.planyo.com/drupal-reservation-system/
General info and tutorial movies can be found at http://www.planyo.com/
Please let me know if you find some information is missing or incomplete.
Best regards,
Rafael Zwiegincew
planyo.com
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | planyo.tar_.gz | 22.12 KB | zwieciu |
| #26 | planyo.tar_.gz | 22.29 KB | zwieciu |
| #23 | planyo.tar_.gz | 22.4 KB | zwieciu |
| #21 | planyo.tar_.gz | 22.93 KB | zwieciu |
| #19 | planyo.tar_.gz | 22.92 KB | zwieciu |
Comments
Comment #1
zwieciu commentedComment #2
avpadernoPlease change only the status, when you upload new code; other metadata is not though to be changed from the applicant.
Comment #3
avpadernoComment #4
avpadernoComment #5
zwieciu commentedHi KiamLaLuno,
I have now corrected the problems you mentioned. Attached is the updated version.
Sorry for the status, I didn't know how it works.
Cheers,
Rafael.
Comment #6
avpadernoRemember to change the status, when you upload new code.
Comment #7
dave reidJust some quick thoughts:
1. Why is ulap.php and send_http_post() necessary when drupal_http_request is included in core?
2. Functions in utils.js aren't prefixed with the module shortname and might cause conflicts with other defined JS functions (maybe they overwrite, but that would still be unintended behavior). Maybe look into depending on date.module?
3. Don't put a blank index.php in the module.
4. Don't hard-code the version in planyo.info. The drupal.org packaging system will automatically add the important information for you when you create official releases.
5. If you don't have any code in planyo.install, planyo.pages.inc, planyo.admin.inc, don't need to have the files. :)
Comment #8
avpadernoI am changing the status as per previous comment.
Comment #9
zwieciu commentedThanks for the quick reply.
Attached is an updated version. The reason for some non-standard code you found is that the Planyo module is also meant to be used independently of the Drupal system.
1. The reason for this is that ulap.php is called from Javascript via AJAX so I'm not sure if I can use drupal's functions in there (this is not within drupal's framework). This wouldn't be necessary if AJAX allowed calls to other domains. Otherwise a simple proxy is required. Should I include includes/common.inc in ulap.php instead?
2. The functions have now been prefixed
3,4,5. fixed. Thanks for the info!
Cheers,
Rafael.
Comment #10
avpadernoSee what update.php, or cron.php do to initialize, and bootstrap Drupal. Both files calls Drupal functions, and you can adopt the same strategy for your code.
Remember to change the status, when you upload new code.
Comment #11
dave reidBest way to handle this is to use jQuery's built in AJAX method to request the 'js/planyo' path on your site, when executes one of your module's hook_menu() callbacks that uses drupal_http_request() to fetch the data. There are plenty of examples on api.drupal.org (search for 'autocomplet').
Comment #12
zwieciu commentedHi,
I have now followed Dave's suggestion and got rid of the ulap.php altogether, instead creating a new path 'planyo/ulap' which in turn calls drupal_http_request.
I'm changing the status to needs review as requested.
Cheers,
Rafael.
Comment #13
avpadernoDrupal doesn't come with Mootools; why doesn't the code use what jQuery offers?
Comment #14
avpadernoDoes JavaScript have a function called
isset()?planyo-utils.js is not using any jQuery function, but it is using DOM functions. Why doesn't the code use what jQuery makes available?
Comment #15
zwieciu commentedAlberto,
Are you saying the module, in order to be accepted, cannot use Mootools? The reason for this is as mentioned before, the module is supposed to also work stand-alone or with other development tools. If this is a requirement, I can get rid of Mootools altogether and use jQuery instead, although this is rather problematic (would introduce need for multiple versions of code sent to the module from the planyo.com server via AJAX).
Comment #16
avpadernoI am just saying that I think difficult to persuade a user to download MooTools, when Drupal already comes with jQuery; it would be a not necessary requirement, and IMO it would be like write 10 custom functions that do the same task of existing 10 Drupal core functions, instead of using the existing Drupal functions.
The code could still work stand-alone, in the same way it works stand-alone using MooTools.
Comment #17
zwieciu commentedOK, I have now completely updated the module as well as code returned by the server to work with jQuery instead of MooTools. See the attached version.
Comment #18
avpadernoI think I have already reported about this.
What is wrong in that code?
Comment #19
zwieciu commentedI think I have already reported about this.
What exactly is the problem you see? As I wrote earlier, isset is a function defined in planyo-utils.js. The weekdays must be read this way because of different languages that can be used. To my knowledge there is no Javascript code that will give me short names of weekdays in Polish or Italian.
As for the other piece of code, I don't understand what problem you see there. I assume it's about using getElementById and style.display / innerHTML. I've changed this function and others I found using similar notation to the jQuery standard but please be clear about the changes that I must still make. The original code was valid javascript. Do you require using jQuery everywhere possible?
Cheers,
Rafael.
Comment #20
avpadernoSee what reported by Dave Reid:
About not using the jQuery functions, see what Apply for contributions CVS access reports:
Comment #21
zwieciu commentedPlease find the updated version.
Comment #22
avpadernoThe code is not using jQuery, as it should in such cases.
See the Drupal coding standards to understand how a module code should be written. In particular see how the code should be formatted.
The second parameter is accepted only in PHP 5, but the module doesn't declare it needs that PHP version. The code I reported is another example of code not conforming to the coding standards.
The code should use
drupal_urlencode().Comment #23
zwieciu commentedHi Alberto,
Thanks for your feedback. I really appreciate your patience and help with this. I'm posting the updated version that fixes all the issues mentioned by you:
- jQuery is used very heavily (in all places I could find). No more document.getElementById or document.createElement. The code is now also shorter because of these changes
- I've thoroughly read and implemented the coding standards and verified with the coder module using the minor level warings. I noticed all other modules (including coder :)) have lots of warnings, though
- the parse_url has been fixed (it was already fixed before but I forgot to update the module submitted last time)
- drupal_urlencode is used instead of rawurlencode
- files are tagged with // $Id$
Cheers,
Rafael.
Comment #24
solona commentedThis module doesn't seem to specify which version of Drupal it's compatible with.
Comment #25
avpaderno@teremka: The module specifies the version of Drupal it requires.
The first argument of
t()is a literal string, not a dynamic value; differently, the script to extract the strings to translate will not extract the string. Avoid also to escape the quote inside the strings that are passed tot().planyo_content()should usedrupal_add_js()to add the JavaScript code (which should be in an external file), and to pass values to that script (see http://api.drupal.org/api/function/drupal_add_js/6 to understand exactly how that is done).Comment #26
zwieciu commentedOK, the strings are reverted back to the single text without escape characters. I thought about using the multiple-line version but I don't think this would be what was intended to be passed to the t() function.
drupal_add_js() is now used to output script code in planyo_content(). Some of the calls needed to be left inline because the data comes from the module settings.
Comment #27
avpadernohttp://api.drupal.org/api/function/drupal_add_js/6 reports how to pass values to Javascript code (which is not what the module is doing).
The tag <link> should be inside the tag <head>, and there is a Drupal function to add such tags.
Comment #28
zwieciu commentedI have to admin the drupal api is incredibly rich and very well done!
The new version fixes these and some other javascript issues I found in the documentation.
Cheers,
Rafael.
Comment #29
avpadernoThat permission is already declared from a Drupal core module; a module should declare its own permissions, not the permissions it uses.
I apologize for the delay in approving this application.
Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, 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.
I thank all the dedicated reviewers as well.
Comment #30
zwieciu commentedThank you. The permissions have been changed. Still, by default the UI uses 'access content'. This used to be 'access planyo' earlier but some of the users were confused because by default (without changing permissions) the UI was not accessible to anonymous users.
Comment #33
avpaderno