The Click to Schedule module allows visitors to your web site to schedule appointments for phone calls or meetings with your sales or service team. This module is sponsored by TimeTrade and it works with their appointment scheduling system. To use this module the site builder can use an existing free or paid account, or they can create a new account through the module config page.
The site builder would then create a block that contains a button that visitors can click to schedule an appointment using a calendar widget.
Sandbox page: http://drupal.org/sandbox/xenophyle/1362590
Git : http://git.drupal.org/sandbox/xenophyle/1362590.git (PAReview)
This is a D7 module.
The code for Fancybox 1.3.4 is included, as TimeTrade is working with Acquia to make this module available on Drupal Gardens, and I wanted to avoid depending on a module (i.e., Fancybox) that might not be available there. I don't like that I did it this way and I welcome suggestions for better ways to do it. The licensing infomation is in jquery.fancybox-1.3.4.js
I know the code should have a branch but I'm not sure about what it should be called. Should it be 7.x-betax or 7.x-1.x?
My experience with Drupal: I have been working with Drupal for almost 3 years and am always looking to improve my coding style and learn the Drupal way of doing things. My previous contributions include some code patches but mainly I have focused on improving documentation.
Reviews of other projects:
http://drupal.org/node/1483532#comment-5922132
http://drupal.org/node/1289484#comment-5951722
http://drupal.org/node/1176740#comment-5957540
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | yarg.jpg | 184.75 KB | augenbrauezug |
Comments
Comment #1
chertzogQuick things:
1. All of the constants defined at the beginning of your module should be namespaced.
2. As for including Fancybox in your module, im not familiar with whats available in Drupal gardens, but the Fancy box library should be removed, and added back in using Libraries API.
3. The version should be 7.x-1.x.
Comment #2
jthorson commentedA few items discussed over IRC:
Please note: The Coder module currently has an unresolved flaw which will prompt you to add file declarations to your .info file even when it's not necessary to do so. Please do not try to make this warning go away by declaring files which do not contain classes or interfaces.
Comment #3
xenophyle commentedThanks for your very fast feedback, I really appreciate it.
Comment #4
jthorson commentedLeave the issue at 'needs work' until your updates have been added to the repository ... just so that we don't get people double-reviewing the same code. ;)
Comment #5
xenophyle commentedIt seems that the status automatically updates to "needs review" when I submit a comment, I guess to discourage me from submitting comments without having the project ready to review...
I have made as many of the suggested changes as I could.
My CTS_PATH constant is built using drupal_get_path(). Should I get rid of it anyway?
I was not able to find a way to clear just the block cache. Is there a way to do this?
As for the ventral results that still come up,
- There are some suggestions to use filter_xss() where is is already being used.
- There are some messages about array indentation that I don't know how to fix.
Again, thanks so much for reviewing this.
Comment #6
tonybuckingham commentedLine 33, click_to_schedule.module:
Should be:
Line 9, click_to_schedule.info:
Refers to a file that no longer exists ( probably needs to be removed now that you are using the Libraries API )
Line 13, click_to_schedule.install:
If you enable the module before putting the fancybox scripts in the libraries folder, the message thrown by the click_to_schedule_set_files() function actually appears on the drupal "modules" page, but I missed it the first time around, since I went directly to the module config page afterwards. Subsequently, on the config page, the following error messages appear:
At this point, the variable "click_to_schedule_fancybox_files" is never set, even if you have now installed the fancybox script in the right place. The only way to set the "click_to_schedule_fancybox_files" variable is to call the "click_to_schedule_set_files", which only happens on install. In other words, if the user doesn't place the fancybox scripts *before* installing the module, the only way to get the module to work is to uninstall and re-install the module. Any easy fix might be to detect the files in click_to_schedule_admin():
Line 20, click_to_schedule.admin.inc:
Replace with:
Other than that, the module seemed to function well for me, and I was able to create a "click to schedule" button that worked.
Comment #7
jthorson commentedxenophyle,
Sorry, I wasn't answering emails while at Drupalcon. In any case, your best bet, if you want to shortcut the process, is to find someone with 'create full project' access to create the project for you; but as noted above, there are a few outstanding items which should be addressed before it should be promoted (even if you were to take this shortcut).
Comment #8
xenophyle commentedI have made the changes suggested by tonybuckingham, and will look into finding someone with the "create full project" access.
Once the dust settles I will be sure to review other project applications to keep my karma in good standing.
Comment #9
xenophyle commentedI'm actually not sure where to find someone with "create full project" access. How can I find such a person?
Comment #10
luxpaparazzi commentedAdded http://git.drupal.org/sandbox/xenophyle/1362590.git
Comment #11
luxpaparazzi commentedwell, first someone needs to give you the status "reviewed and tested by the community" before such people will check and eventually grant you access. Short: You don't need to search for them, they will find you.
You should reread the project application docs ....
Here an auto-review:
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
Comment #12
luxpaparazzi commented1. JS should be put into .js files
2. Text should always pass through t() function for translation:
'#markup' => '<div id="zenbox-link" onClick="Zenbox.show(); return false;">Leave feedback</div>',3. ... also it is recommanded putting as much code markup into theme functions or tpl files (also at other places):
4a. This link should go to a Constant, or should even be configurable:
'http://player.vimeo.com/video/14251501?title=0&byline=0&portrait...',
4b. probably the same for http://www.timetrade.com/login and other external links, as they can change without knowledge of the module developer, who does not want to repackage the entire module because of a simple link
5. Links should be created with the l() function:
6. String needs translation:
$('#fancybox-wrap').append('
');
$('body').append('
');
---
The response time for a review is now approaching 4 weeks.
Get a review bonus and we will come back to your application sooner.
See: http://drupal.org/node/1410826
You could for example start by evaluating my own project:
http://drupal.org/node/1302786
Comment #13
xenophyle commentedHi Lux--thanks for your review and congratulations on reaching "reviewed and tested by the community" status, it looks like it was a long and arduous process.
I'm actually familiar with the process--I was just responding to comment #7 regarding the shortcut. (My customer had been talking behind the scenes about this with some of the reviewers.)
The errors 'There should be no white space after an opening "{" ' are the result of my attempt to make the code more readable, but I guess we are slaves of PAReview.
1. This is done.
2. Good point, I missed that one.
3. Hmm, I don't think that would make sense in this case since it is markup that will always be hidden. It also contains some promotional text for TimeTrade (the service this module connects to) that they would prefer not to be overridden.
4. I'm not sure how making it configurable would help -- the site owner wouldn't know what the changed urls would be. But I would like to hear more if you have a solution.
5. All set.
6. Wow, I never knew before now that you could do t() in JavaScript. Done.
Comment #13.0
xenophyle commentedhttp://git.drupal.org/sandbox/xenophyle/1362590.git
Comment #14
xenophyle commentedAdding tag
Comment #15
traviscarden commentedA bit more PAReview slavery, @xenophyle. ;-)
All these come from the same pattern you're observing:
It's the unranslated string literal triggering the error (i.e.
' '). You might try something like this instead:This way the whole string becomes translatable, which is better anyway. I see a number of other places across your code that you could use this pattern instead (and probably should, if you can)—in
click_to_schedule_create_free_account_submit(), for example.These are all pretty easy fixes. On the first two, it would be cleaner to use
theme_image()than to build the raw HTML yourself. Then you can make the alt text translatable, too.A couple of miscellaneous comments:
It's looking good!
Comment #16
xenophyle commented@TravisCarden: I've included your suggestions. The function click_to_schedule_set_files() makes sure the Fancybox stuff is there.
Thanks for your help!
Comment #16.0
xenophyle commentedAdded reviewed projects
Comment #17
traviscarden commentedYou're welcome, @xenophyle. I think the moderators will take away the review bonus tag when it's time. :)
In the meantime, give the updated PAReview output a look.
Comment #18
klausiManual review of the 7.x-1.x branch:
But that are just minor issues, otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #19
patrickd commentedYour project page looks a little unstructured, you may have a look at the tips for a great project page.
Otherwise your module is well documented! Looks good,
Thanks for your contribution and 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 #20
xenophyle commentedThanks for all your help, everyone.
Comment #22
augenbrauezug commentedHaving trouble with fancybox. It's installed correctly [checked on fancybox module], is there a line of text in one of these files I need to change? I'm pretty new to all of this so excuse me if the answer is posted above. I reread the thread several times and am still confused. I've also reinstalled click to schedule after getting fancy box installed correctly and still nothing. Also it's already asking me to upgrade, is this because I didn't create my account via the drupal form?
Comment #23
klausiPlease post all issues regarding this project to its issue queue: http://drupal.org/project/issues/click_to_schedule?categories=All
Comment #23.0
klausiAdded link to PAReview report on ventral.org.