This module adds a lightbox like pop-up for a contact/feedback form based on webform. This is similar to the solution provided by http://www.feedbackify.com without the need to use an external service. View the README for implementation.
Project Page:
http://drupal.org/sandbox/protitude/1815672
Git Clone
git clone --recursive --branch master http://git.drupal.org/sandbox/protitude/1815672.git webform_feedback
This is a drupal 7 module.
I have also put this module together in the past: http://drupal.org/project/icon_links although it still needs some work.
Comment | File | Size | Author |
---|---|---|---|
#12 | ajax-loader.gif | 7.64 KB | DanaRoseRoss |
#12 | feedback-tab.png | 555 bytes | DanaRoseRoss |
Comments
Comment #1
fr3shw3b CreditAttribution: fr3shw3b commentedHi there,
first of all there are quite a few issues to sort out such as indentation, whitespace and correct comment formats.
You can find them all here:
http://ventral.org/pareview/httpgitdrupalorgsandboxprotitude1815672git
Look at the top of the page as well where it tells you about removing version number, removing old CVS $Id tags and more.
I have a few other suggestions from manual review:
You'll find more instruction on that at the PAReview link.
And then in the hook you can simply have:
Sorry about the code looking a bit poor but posting it on here it's hard to avoid text-wrapping with long lines of string appending (but don't forget about the render arrays.)
Comment #2
vineet.osscube CreditAttribution: vineet.osscube commentedManual Review :
1) There is no hook_uninstall() to remove your custom variables like: webform_feedback , webform_feedback_position.
2) Create a webform_feedback.install file and add hook_uninstall() in it.
Comment #3
protitude CreditAttribution: protitude commentedfreshwebpie thanks for your prompt response. I have done everything you listed except for the render arrays. I'm not really sure how to implement this into my module. Please provide me more information if you find this necessary.
osscube I added a hook_uninstall.
Thank you both for your time.
Comment #4
protitude CreditAttribution: protitude commentedI think this is about ready. Any other suggestions?
Comment #5
jhaskins CreditAttribution: jhaskins commentedwebform_feedback_block_view_alter
, $block->bid is the numeric id of the block so you shouldn't be adding'webform-client-block-'
before the webform_feedback variable.configure = module admin path
to your .info file. That's what allows for the handy "configure links" on the module list.Comment #6
protitude CreditAttribution: protitude commentedThanks for your feedback.
I was waiting to actually get the module approved before worrying too much about the project page as I assumed this process was only concerned about the module itself. I added a little more to the project page, but it seems silly to link to things like my readme or issue queue as the links change after pushing this out as a full project. I was going to provide a quick youtube vid as well.
As for the block id, it isn't a number. In the case of a site I'm working on it's webform-client-block-2642. The variable I'm storing is just the number but the full id includes 'webform-client-block-' therefore I have to put that in.
Got the line added to the info file, thanks for the tip.
I feel like this module is pretty solid overall. Let me know if there are any glaring issues.
Comment #7
fr3shw3b CreditAttribution: fr3shw3b commentedHello protitude,
Firstly have you already passed the one time review application stage as icon_links is a full project?
Going on to project review:
The comment in the file doc block for the module file is wrong as it says:
Installation file for the webform_feedback module.
which it is not.
For good practice and clarity you ought to put the webform_feedback_settings form in it's own webform_feedback_form.inc or webform_feedback.admin.inc file.
Change the $a variable in the settings form function to something more self explanatory.
Comment #8
protitude CreditAttribution: protitude commentedThanks fr3shw3b.
I didn't push out icon_links and this is my first code review.
I tried to clean up the comments and add a .inc file for clarity. I created a different variable name as well, although the comment above this variable says more for what is happening here than can be explained in the name of the variable. Please let me know if there's anything else in need of a fix.
Thanks,
Miles
Comment #9
fr3shw3b CreditAttribution: fr3shw3b commentedHello,
The JS file needs to follow the code indentation standards at:
http://drupal.org/node/172169
For JavaScript you should use Drupal behaviours instead of Document ready and looking further into it than before you can pass variables through settings so you can keep all the JavaScript/JQuery in the same file. See the page below for more info:
http://drupal.org/node/756722
For the settings form, It is better to use functions found here to get webforms with blocks turned on and getting their titles than the Database Abstraction Layer directly:
http://drupalcontrib.org/api/drupal/contributions!webform!webform.api.php/7
You could use webform_node_load and go from there.
There is a PHP error which means the module cannot be used where you are forming your processed array on line 24 of the admin inc, Your best bet is to put the array pop function in a seperate function outside of the array map and then add a returned variable version of that function to the array map.
What I mean is something like this:
At the bottom of the page and then like this:
In the settings form function.
There doesn't seem to be an array level variable? so that makes this function useless.
When I enter
<script>alert('XSS');</script>
as the title of the webform node I get a nasty little JavaScript pop up, you want to avoid this by reading or re-reading here:http://drupal.org/writing-secure-code
The root of this is somewhere in the block output.
Also a last thing would be that there is no AJAX popup created maybe you need to document something better or am I completely missing something?
Comment #10
protitude CreditAttribution: protitude commentedfr3shw3b thanks for you input. I've adjusted everything that I can from your suggestions and here are my comments to each point you have made:
Please let me know if there's anything else I need to address in this module. Thanks for your time.
Comment #11
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #12
DanaRoseRoss CreditAttribution: DanaRoseRoss commentedI'm only seeing minor things at this point.
You have two "core" declarations in your info file.
Could you add "package = Webform" to your info file? That way the "modules" page displays it alongside Webform and other related modules so I don't need to hunt for it. This is in line with the info file standards. "If your module comes with other modules or is meant to be used exclusively with other modules, enter the name of the package here"
Lastly, consider running your images through ImageOptim (Mac only) or something similar. I was able to remove 27.7% from ajax-loader.gif and 52.7% from feedback-tab.png without any noticeable reduction in quality. I know we're talking about less than 10K here, but every byte helps, especially on slow/weak mobile connections. I've attached my reduced versions in case you just want to use those.
Comment #13
protitude CreditAttribution: protitude commentedThanks DaveRoss for attaching the images. I included those with the minor .info fixes. Not sure what else this module needs? I included a link to a video screencast showing a quick overview of how to use this module. Hopefully this will help anyone trying to enable it.
Comment #14
erez111 CreditAttribution: erez111 commentedHi, Check
http://ventral.org/pareview/httpgitdrupalorgsandboxprotitude1815672git
and solve all errors/warnings.
You should mainly convert tabs into spaces at webform_feedback.js for code standards.
Except that, code is clear and can be approved.
Comment #15
protitude CreditAttribution: protitude commentedGot it. Let me know next steps. Thanks!
Comment #16
kscheirerWill review this today...
Comment #17
kscheirerLooks pretty straightforward, you have a typo in your README - "bock" should be "block", but otherwise RTBC from me.
Comment #18
protitude CreditAttribution: protitude commentedFixed typo.
Comment #19
rafenden CreditAttribution: rafenden commentedDid You consider using jQuery UI dialog for displaying popup?
Comment #20
protitude CreditAttribution: protitude commentedThanks for your feedback rafal.enden. I prefer to keep my dependencies down and at this point I'd like to get the module launched and not continue to iterate. Let me know the next steps.
Comment #21
kscheirerWell it's been over a month and the code still looks decent.
Thanks for your contribution, protitude!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
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.
Thanks to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Enterprise modules from the community for the community.