Speed Form Blocks (excuse silly name, was aiming for something definitely unique) is designed to allow a site maintainer to quickly create a new simple feedback form within a block. A block created in this way can then be used to garner feedback or comments from users of the site without the need to go to another page - "inline" as it where.
A user can create a form, which is then stored in the database table
This data is then presented via _block_info to drupal, and via structure | blocks allows a site admin to add the block to part of their site
Data received (via Ajax submission) is stored in a second database table and this is presented via a series of admin panels to allow for analysing feedback and exporting CSV files.
I considered the webform module, but this seemed to allow the creation of a separate page, not a form element inline as this code does.
I've put the code through http://ventral.org/pareview and there are some formatting errors, but mostly to do with issues with PHPDOC commenting that I don't quite get. It's also gone through Code review several times and passes there except for one check_plain issue which I think isn't a problem.
I'm largely self taught PHP, and not a brilliant coder by any stretch of the imagination. I tend to work openly and thought I'd written something useful so I might as well share it (http://www.github.com/patlockley / http://wordpress.org/extend/plugins/profile/pgogy) as it's more positive than keeping code to myself.
I'm relatively new to drupal (as I am now using it at work) but have tried as best I can to read around and work in a "drupal" way so as to make sure submission wouldn't be too much of a burden. I've worked (as a sort of lead) on one large open source educational project (xerte) and I know how much effort maintaining a community can be, so I'd hate to be a burden when I am sure there are much more pressing issues than this.
I currently have 5 sandboxed projects (including this one), so I thought explaining why I chose this one to go forward would indicate having read the manual a little - and that if there isn't a lot of code in this module, that other modules I have would perhaps help assess my work.
Speedy G (http://drupal.org/sandbox/pgogy/1351176) - Is basically boost, but a simpler version. We needed something like boost but there wasn't a version 7 which worked. I am not convinced this is needed as a project
Cache Scalpel (http://drupal.org/sandbox/pgogy/1351174) - Not sure that I understand drupal caching enough to make this work properly, but still handy I feel (would happily work this one up to a better module)
Code Tracker (http://drupal.org/sandbox/pgogy/1351178) - A sort of devel like module to find out if blocks run slowly. We had a problem with the work site that without caching it wasn't very fast, but devel could tell us which queries took a long time, but not always which block was the problem. I'd like to develop this further, but as it doesn't have an admin side or database install code then it's perhaps not showing enough "drupal" to be submitted as a first module
Learning Registry Block (http://drupal.org/sandbox/pgogy/1378742) - A rehash of a WordPress plugin I wrote, too simple to put forward as a first module.
git clone --branch 7.dev pgogy@git.drupal.org:sandbox/pgogy/1370108.git
Is the Git for the dev branch
http://drupal.org/sandbox/pgogy/1370108
Is the sandbox URL
The module is for Drupal 7
Many thanks for any feedback or help people can give.
Reviews of other projects
http://drupal.org/node/1470288#comment-5732616
http://drupal.org/node/1425720#comment-5732518
http://drupal.org/node/1426234#comment-5732826
2nd Review
http://drupal.org/node/1540804#comment-5897534
http://drupal.org/node/1535540#comment-5897562
http://drupal.org/node/1452328#comment-5897662
3rd Review
http://drupal.org/node/1553456#comment-5975976
http://drupal.org/node/1445730#comment-5976220
http://drupal.org/node/1549480#comment-5976318
4th Review
http://drupal.org/node/1574548#comment-5995390
http://drupal.org/node/1570724#comment-5995436
http://drupal.org/node/1547072#comment-5995620
http://drupal.org/node/1579958#comment-5999886
http://drupal.org/node/1463004#comment-6000016
5th Review
http://drupal.org/node/1585740#comment-6005218
http://drupal.org/node/1585642#comment-6005242
http://drupal.org/node/1573560#comment-6005274
http://drupal.org/node/1570606#comment-6008612
6th Review
http://drupal.org/node/1591870#comment-6020186
http://drupal.org/node/1592084#comment-6020292
http://drupal.org/node/1593136#comment-6021468
7th Review
http://drupal.org/node/1598666#comment-6036848
http://drupal.org/node/1599236#comment-6037360
http://drupal.org/node/1596172#comment-6031844
| Comment | File | Size | Author |
|---|---|---|---|
| #89 | ventral.txt | 818 bytes | pgogy |
| #89 | code_review.txt | 1.41 KB | pgogy |
| #89 | drupalcs.txt | 3.54 KB | pgogy |
| #74 | drupalcs.txt | 3.54 KB | pgogy |
| #72 | drupalcs.txt | 1.75 KB | lucascaro |
Comments
Comment #1
patrickd commentedhttp://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7dev
Please tell me which ones you don't understand, I'll try to explain them to you.
Your not working correctly with branches to create project releases. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Comment #2
pgogy commentedHello,
Firstly thanks for the git checking tool - I couldn't find anywhere obvious on the website to acknowledge you personally, but would like to do so now.
FILE: ...dules/pareview_temp/test_candidate/speed_form_blocks.block_creation.inc
--------------------------------------------------------------------------------
FOUND 10 ERROR(S) AFFECTING 10 LINE(S)
--------------------------------------------------------------------------------
12 | ERROR | Parameter comment must be on the next line at position 1
Not sure what this means
47 | ERROR | Expected "}\nelse {\n"; found "}\n\nelse{\n"
I'm using Windows to edit the file, and in the text editor I am using I see }\nelse {\n not }\nelse{\n
I will read up on the git instructions later.
Thanks
Pat
Comment #3
patrickd commented->
my editor is also showing this, maybe you should switch your editor
Comment #4
pgogy commentedHello
http://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7x-11dev
Reports all ok bar check_plain potential issues. I've gone through and added check_plain or filter_xss_admin to the nodes where HTML might be used.
Thanks for your help.
Comment #5
pgogy commentedUpdate for all.
The current branch I am using is 7.x-1.1.dev pgogy@git.drupal.org:sandbox/pgogy/1370108.git
Hope this helps.
Comment #6
pgogy commentedShould I set this to needs review?
Comment #7
misc commentedHi,
Quite big module :-)
Here is my review of the 7.x-1.1.dev branch. Should be 7.x-1.x-dev.
Also you have some formatting issues, mostly about identing: http://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7x-11dev
When I enable the module (with drush) I get the warning
Also when I try to create a new block with the name Testblock I get the warning
But it does not say in the description that the name need to follow that pattern
In the field 'Name for this form element', the does not disappear when it is focused, I have to manually delete the text in the field, the same for User guidance for this field
I create a block with a textfield. Add it to a sidebar. The textfield shows, but no text on the submit button. I can submit. I do not get any message. After that I notice that you can add text to the button and other stuff also. When I do so, it works. Maybe I should have known that if there were text in the README :-)
I think you only have some small issues to take care about. It works, but need some small improvements.
Comment #8
pgogy commentedThanks for the feedback.
I think the new GIT is 7.x-1.x-dev pgogy@git.drupal.org:sandbox/pgogy/1370108.git
But I am not sure if that worked.
Should now be neatened up and more informative
Deleted - was an admin error
Removed
Removed
I am looping over an array of post variables to create an array which I then serialize. I wasn't sure if this was needed, but I wanted to be certain
I can't get the latest git to work, so I can't see what is wrong in this sense
I have added a return statement in *_block_info - that fixed it for me.
Changed the guidance
Changed the guidance
Hope this helps
Comment #9
pgogy commentedAlso, no obvious way to remove the #default_value when a form is clicked on? Tempted to leave it empty.
Comment #10
rudiedirkx commented1. This is what I get when I install (using Drush):
Installation errors = bad.
2. When I 'start' a block and add 1 field, I get this form:
That's very unclear. The element I just made, now appears twice and the form has grown bigger... What do I do next? Since the page has refreshed (and changed) a message would be very useful.
3.
'file path' => $path,inhook_menuis unnecessary, since$pathis your module path and that's the default.4. I'm seeing a lot of trailing spaces. I'm not sure how the Drupal coding standards like those, but I don't. Your editor probably has a macro to remove those. (In (Win) Notepad++ it's Alt+Shift+S.)
5. This isn't the right comment format:
Use:
6. Pareview finds a lot of issues.
Comment #11
rudiedirkx commentedComment #12
rudiedirkx commentedI'm on branch
7.x-1.x-devbtw. (I think "7.x-1.x" would be good enough. A branch is always dev. A release needs that flag, a branch doesn't.)Comment #13
rudiedirkx commentedYour function
speed_form_blocks_deletion_handleris really bad/wrong/incorrect. You should never, ever have to call$_POSTin a submit handler. (Do correct me if I'm wrong.)Never, ever, ever trust user input.
The Form API filters use input for you. Use
$form_state['values']to get it.Comment #14
pgogy commentedthanks for that, the UX stuff was really handy.
not sure what happened with whitespaces - guess a lot of code changes made it messy. Apologies.
http://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7x-1x seems fine now
I have tried to neaten up the UX as per #10
I don't get an install error anymore with #10
bullet point #3 of #10 is fixed
Commented .module as per hooks with #10
#12 the branch is now 7.x-1.x
#13 is resolved - no mentions of post in form handlers anymore
Thanks for your time on this,
Comment #15
pgogy commentedComment #16
rudiedirkx commented1. Function comments are still a bit off. Write them to be parsed by a docs generator. Once your module becomes hugely popular, it will be useful for developers. See this nodequeue example. Extracted from this comment.
Specifically: no need to mention the function's name, version or author. Version and author are okay, if you want, but the name is unnecessarily verbose.
2. Pareview tells me: README.txt is missing, see the guidelines for in-project documentation.
3. The form is more obvious now, but it's still imperfect IMO. If you want to add 4 elements, the form will be huge in the end. You could (?) save the block ('unpublished') between creating elements.
4. I checked out branch
7.x-1.x, but I still see$_POSTinspeed_form_blocks_callback(). Am I behind or is it actually still there?5. Any reason you're explicitly not caching in
speed_form_blocks_block_info()?6. I'm surprised Pareview doesn't mention this:
See the coding standards on
switch (...).7. On admin/structure/speed_form_blocks/creation, you could use type
machine_nameto fill the machine name from a title. (Ignore this if you think there's reason for a block to have a human readable title.) See the Form API for examples and details onmachine_name.8. This is tiny and in no way related to Drupal's coding standards, but it's related to mine =) This is (very) inefficient:
because you're counting every iteration of the loop, but the count doesn't change. Count it once and use that number in the loop. Also good for readability:
Like I said: tiny.
9. You might want to consider requiring fields in the creation form. Everything except "User prompt ..." I'd say. Crazy results if you add a few nameless fields =)
Beyond these few thingies, I like.
Comment #17
rudiedirkx commentedTwo more things
10. The "Button label" and "CSS class" (block properties) are textarea's... Is that intentional? Textfields feel more natural and make more sense IMO.
11. More fields in the Block management tab should be required. I'd say all of them except "HTML before", "HTML after" and "CSS classes".
Comment #18
rudiedirkx commentedOkay, just two more.
12. No way to edit a block?
13. Are all the tabs necessary? There's a lof of them.
hook_help.Comment #19
rudiedirkx commentedOh btw... The Webform module offers an option to render webforms as blocks. Very nicely actually. Optionally including the rendered node.
You might want to consider that =) Your time might be spent more wisely contributing to Webform.
And that's four in a row. That's enough. Cool module!
Comment #20
pgogy commentedCheers
1. Tried to neaten function comments
2. README.txt is there (weird GIT case sensitivity).
3. The form can be changed if you change your mind when completing it - so it can get very long, but you can also change it at any point.
4. POST all gone.
5. Caching prevention removed
6. Switch done
8. Done
9. All fields required
10. Set to textareas
11. See 9
12. You can now edit a block
13. Dropped two of the tabs.
As for webform, it does - but I never found it when I tried to use webform, I find some modules have really complicated interfaces - why this one had too many tabs originally. It still seems much harder to set up. Webform is clearly more powerful a module, but this is a simple module to do simple things :) I almost called it simple form blocks.
Thanks for your help though
Comment #21
pgogy commentedComment #22
rudiedirkx commentedThe README is unacceptable =)
This is from the project page. Much better than the module's README.
It's good to have this in the README as well as on the project page.
Sorry man. I'm pretty new to moduling and reviewing myself, so I don't want to be too easy.
Comment #23
rudiedirkx commentedWrite docs and README's with this in mind:
(Not developer docs!)
Comment #24
rudiedirkx commentedTwo more, but maybe you should've learned these by trying/yourself:
1. You can write
like
and not do the
$argsandbuild_infothing. I guess thedrupal_get_formdocs aren't very forthcoming about that... Well there you have it! Arguments passed todrupal_get_formare passed to the form definition function directly. Just in case though, make them optional.2. Drupal 7 has a
type => 'action'form element. Usually that's where forms put their actions/(submit) buttons. (You can add$data->post_htmlto that element like you're doing now, OR create a separate (type => 'markup') element for that.)Comment #25
pgogy commentedCheers, the readme was just a stub. The only one went missing.
Will fix all tonight.
Comment #26
pgogy commentedREADME.txt updated
.module _forms hook improved ($args removed).
Couldn't get type => action to work, so left as is. Not sure if #suffix is better than a whole new array element?
Seems #suffix is neater.
Comment #27
pgogy commentedComment #28
rudiedirkx commentedAUCH:
I almost missed that one. That is very uncool. You know why. Fix that. Only string literals in
t()!#type => actionsis better. Every form's (submit) buttons should be in anactionscontainer. Do note that it is "actions" and not "action". If you forget about anything Form API, just search for "drupal fapi" anywhere.A few more pointers you can use so you wish:
See the
configuredirective on Writing .info files. For users it's immensely useful to know where to start (configuring).The very most important and powerful hook in Drupal is the form_alter. Every developer starts there if they want to change something. Make sure your forms return something alterable. Currently the element names aren't optimal:
That's because the "Name for this form element" elements can contain anything. (Including nothing.) See attached screenshot. Most of those form elements should be
#required. (Definitely Name and User prompt.)I usually write queries like this: (note the extra spaces on lines 2 & 3)
Why all the white space here:
Why in every function:
This is problably not right: (double check_plain)
Also the
t()string is strange. Don't start with": ". Better use a placeholder inside the translatable string:t('@block_name: This block .....'). (This happens a few times.)White space:
Why the check_plain?
There's a few more things I would've done differently, but different isn't necessarily better and definitely personal.
There's one must fix. After that I think I'm satisfied =)
Comment #29
pgogy commentedFixed, and used placeholders in all the other places
Done I think
Added the configure line to the .info and moved the pacakge to "user interface"
Ok have made a few more fields required and added some extra validation in.
I've tried to remove the array whitespacing where I saw it.
bad copy and pasting - removed now
Sometimes I add a check_plain just to be safe - too much
Happy to make more changes.
Thanks a load for your help, please let me know if I can help you in anyway?
Quick question - after this is approved, where should I discuss project ideas?
Comment #30
pgogy commentedComment #31
rudiedirkx commentedAlmost =)
1.
t() string is still off. Don't start with ": ". Include the param in the t() string or add ": " in between. And obviously there's one "FUCK OFF" too many.
Also: if this message is a blocker, show it as an "error", not a "warning". Block names MUST be unique, so a duplicate is a validation error. Warnings aren't blockers (the block would be saved, but not perfectly).
Perfect IMO:
Didn't know
%? There's three types of placeholder.2.
Better to have the tags outside the t() string, so you can change markup later without changing the t() string. The same in
...response.inc.3.
Should be translated. In a few more locations. Even standalone words like "Settings" must be translated. Check every English literal you type. All of them must be translated in the end. (Some directly (like here) and some indirectly (like menu item titles).)
4.
Menu item titles shouldn't be translated. The menu system does that (via "title callback"). See hook_menu. The same goes for "description".
5.
It's not wrong per se, but I'm not a fan. In fact, it's a horrible practice:
Don't foreach when you're bowing out at the first element. Just fetch the first record and check against it:
And a minor (IMO) but simple: http://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git Only a README in master branch.
Comment #32
pgogy commented1) Sorry, got angry with the code and left it in by mistake
2) All done I think
3,4,5) All done too
Again, many many thanks
Pat
Comment #33
pgogy commentedComment #34
rudiedirkx commentedExcellent =) Let's get it out there.
The actual approving has to be done by someone else. I think only a few can. Now it's "Reviewed and tested by the community", that shouldn't take long.
If you need more feedback, you can join several Drupal Groups, one of which: http://groups.drupal.org/code-review
Comment #35
pgogy commentedThanks loads for your help. If you ever need some help or testing please do let me know.
Comment #36
klausiWould you like to take part in the review bonus program? I personally only review/approve applications with a review bonus, but of course you can also wait for other git administrators to take a look at your code.
Comment #37
pgogy commentedI'd like to help - I'm spread pretty thin over a lot of open source stuff, but I will have a look at some projects tonight.
Thanks
Comment #38
rudiedirkx commentedDon't you trust me, @klausi? =)
Comment #39
patrickd commentedthis is not about trust, a git admin should do a (hopefully) last review before fixing an issue. ;)
Comment #40
pgogy commentedUpdate for review bonus.
Please note I only have limited drupal experience (version 7, single user sites) and I am not a great coder - so if they reviews I did aren't enough to merit a bonus I understand completely :) Please consider them in the spirit intended. No problem if not enough.
Cheers all
Pat
Comment #41
klausiReview 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.
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #42
pgogy commentedWhy do I lose my review bonus?
Comment #43
patrickd commentedRead about the review bonus workflow: https://drupal.org/node/1410826
manual review of 3 projects -> tag your application -> you'll get a review sooner -> tag will be removed -> manual review of 3 projects -> . ..... .
Comment #44
pgogy commentedHave made changes according for code sniffer, but they clash with ventral, so have left the error in ventral as I assume code sniffer better.
Made longer
Am now adding messages when I commit
Modified
Block length set to be 32
Changed accordingly
Trimmed the length down to more reasonable numbers
Removed
I have done but I've zero experience of using drupal sites with multiple users - the sites we have here are for broadcasting content so I don't know anything about user modules permissions. Done what I think is correct.
Speed_form_blocks_block_view - is built to generate the block when required.
Quoting from the page "Second, you could use this hook to define how to build a form with a dynamically-generated form ID."
So as each block contains a dynamically generated form I use this to generate the form for each block
No reason - failed to convert code when I did the rest of the work. Now using form_state['value']
Changed
used l instead as it worked better
I can't find this function in my code
Removed
Fixed all the ones I could see
Comment #45
patrickd commentedBTW
ventral == drupal code sniffer
I just updated ventral.org/pareview today, are you sure your local version is up-to-date?
Comment #46
pgogy commentedSorry, it wasn't a criticism. By better I should have said perhaps more "Formal".
I downloaded DCS on friday and have never used it before - so I would assume it's up to date.
It was about array elements needing to be on different lines - not sure it matters?
Comment #47
pgogy commentedAlso, name a charity - I've used ventral so much I feel I owe you :)
Comment #47.0
pgogy commentedAdded review bonus material - PAReview: review bonus
Comment #48
pgogy commentedUpdated for review bonus
Comment #49
patrickd commentedyou tagged the issue wrong, must be "PAReview: review bonus"
corrected
Comment #50
pgogy commentedthank you for your patience - I'd still like to thank you for the help ventral gave me?
Comment #51
klausiThanks for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no flaws).
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.
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #52
pgogy commentedhttp://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7x-1x
reports as clear - see comment #46 for problems with Drupal Code Sniffer - I am using Ventral as my DCS reference point as it is easier to use.
re commented and put each ) on a new line
done
Quoting the page
By default, when drupal_get_form() is called, the system will look for a function with the same name as the form ID, and use that function to build the form. If no such function is found, Drupal calls this hook. Modules implementing this hook can then provide their own instructions for mapping form IDs to constructor functions. As a result, you can easily map multiple form IDs to a single form constructor (referred to as a 'base' form).
Using a base form can help to avoid code duplication, by allowing many similar forms to use the same code base.
To me, that is what this module does?
The comments on http://api.drupal.org/api/drupal/modules%21help%21help.api.php/function/hook_help/7 suggest it is ok? Should some one delete them then?
Done
Done
Done
done
Comment #53
pgogy commentedComment #53.0
pgogy commentedreview bonus
Comment #54
pgogy commentedPAReview: review bonus
Comment #55
klausiDo not RTBC your own issues.
Comment #56
klausiThank your for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no flaws).
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.
manual review:
',": I think you should do at least a filter_xss() or similar here to avoid XSS. See also http://drupalscout.com/knowledge-base/drupal-text-filtering-cheat-sheet-...
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #57
pgogy commentedBut your comment said
"Thank your for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no flaws)."
Which is what I did?
Comment #58
patrickd commentedThis sentence is for the case you review other modules - after you've done a review of other module you have to decide whether you set their issue to needs work or rtbc.
Comment #59
pgogy commentedWhat if the issue is a preference (i think a lot of modules could do with more help options, for example?)
Comment #60
patrickd commentedif it's only a preference -> it's not a review -> don't change status
Comment #61
pgogy commented1. Have tried to make commit messages more useful. I am using Git GUI - not sure how much I can change this as it is free text.
2. Set speed form blocks to be lower case.
3. Very, very sorry. I get what you mean now. I've swapped hook_forms for drupal_get_form and my own function.
4. Added in filter_xss where I think it is needed.
5. Changed all values - default values
6. Changed to db_insert into drupal_write_record
Sorry for the hook_forms hassle. Feeling dumb.
Also tested with ventral and code review.
Comment #61.0
pgogy commentedAdding review bonus links
Comment #61.1
pgogy commentedAdding reviews
Comment #61.2
pgogy commentedadded another review, not enough for bonus so don't worry about that yet
Comment #61.3
pgogy commentedadding more reviews
Comment #62
pgogy commentedPAReview: review bonus
Comment #63
klausiPlease don't remove the security tag, we keep that for statistical purposes and to show examples of security problems.
Comment #64
pgogy commentedSorry, didn't know if I had to have only one.
Comment #65
klausiReview 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.
manual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #66
pgogy commentedHello
All changes made. I can't stop drupal code sniffer reporting \r\n errors for some lines (always the first and last lines in each file).
Thanks
Comment #66.0
pgogy commentedreview bonus (i think)
Comment #66.1
pgogy commentedadding review links
Comment #66.2
pgogy commentedAdding reviews
Comment #67
pgogy commentedAdding review bonus tag
Comment #68
klausiManual review of the 7.x-1.x branch:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #69
pgogy commentedHello,
1. When I run phpcs --standard=drupal --extensions=php,module,inc,install,test,profile,theme . I don't get those errors listed in the txt file you attached. I did get some other commenting issues, but not those ones. I assume there is some character problems in the sniffer? I've attached what I see when I ran my first test before making the changes.
I've had to guess at the changes because I can't get the same errors as your text file does. This is a bit of a problem.
2. Changed
3. That form_state never goes to a database, or the screen? I've changed it now, but handy to know for future reference?
Comment #70
pgogy commentedComment #70.0
pgogy commentedadding in reviews
Comment #70.1
pgogy commentedadding reviews
Comment #70.2
pgogy commentedAdding a review
Comment #71
pgogy commentedAdding PAReview: review bonus
Comment #72
lucascaro commentedhi @pgogy the same thing happened to me with drupalcs and it ended out being that I needed the -dev version of drupal code sniffer. I'm attaching a dump of drupalcs for reference, it seems that there are still some minor issues.
2) Also in speed_form_blocks_export_data() it seems that it's still using #value, did you push your latest changes?
3) Seems to be correct now.
setting to needs work and keeping the pareview bonus tag for @klausi.
Comment #73
lucascaro commented*ahem*
sorry... now really setting to needs work.
Comment #74
pgogy commentedThank you.
I updated to the dev code sniffer and I got a bigger set of messages - I still get end of line and start of document errors....
Changes made and have attached what I see when I run c:\xampp\php\phpcs --standard=drupal --extensions=php,module,inc,install,test,profile,theme . now
Comment #75
lucascaro commentedHi @pgogy, I have some more issues that could help you pass a review:
whenever you're using:
you should consider changing it so it doesn't use concatenations, to avoid translation problems. A possible solution is to make it like:
If you don't need html in $block->page, you can use @page and remove the call to filter_xss.
This problem appears in lines 123 and 139 of speed_form_blocks.export.inc
I still see you're using #value instead of #default_value in lines 182 and 189 of speed_form_blocks.management.inc, and line 132 of speed_form_blocks.export.inc, and that could cause problems with the forms.
also, drupal code sniffer reports no problems!
I think after these changes this will be RTBC.
Cheers.
Comment #76
pgogy commentedAll done
Comment #77
lucascaro commented@pgogy cool, it looks good with pareview.sh and drupalcs. There are still some indentation and spacing issues, like too many spaces before the => and lines that go over 80 characters at:
which I'd rewrite as:
Also, there are some indentation errors that you might want to correct before getting another review from @klausi.
* in speed_form_blocks.responses.inc
- lines 22, 85, 94
* in speed_form_blocks.management.inc
- lines 25, 43, 48, 59, 208.
There are also several places that need better indentation. It should always be 2 spaces, so at speed_form_blocks.responses.inc @lines 127-130 you need to add indentation for the ->condition and ->execute lines. Also, in general the indentation should be of 2 spaces.
One last thing is that the commits are still showing as "by patlockley" instead of pgogy and that should be corrected (see http://drupal.org/node/1022156).
I think the last one is a blocker so I'll set it to needs work, but as soon as that's corrected I think this is ready for RTBC!
Comment #78
pgogy commentedAll done, found a few more - so used to coder and ventral I'd forgotten to use my own eyes.
Told git who I am for this repository as well
Thanks
Pat
Comment #79
lucascaro commentedgreat @pgogy, I still see some indentation issues in speed_form_blocks.management.inc around line 300:
and 316
But IMHO it's good enough for a RTBC!
Comment #80
pgogy commentedThanks
I changed it to
is that better?
Comment #81
lucascaro commentedI think it's ok, but what about:
or, if it's over 80 characters:
anyways it's not a blocker so it's up to you.
Comment #82
lucascaro commentedActually @pgogy, I was discussing it in IRC and @klausi noted that filter_xss_admin it's not supposed to be in those lines, it's supposed to be used when you're generating output, and not when saving in the database.
So please give it another look and remove the two instances of filter_xss_admin on input and please check that you're using it whenever you're outputting user generated text.
Sorry for going back to needs work, but I hope this helps getting this project published!
Also, still leaving the review bonus tag for @klausi.
Comment #83
pgogy commentedAll done (added it a lot on the admin side - wasn't sure it was needed on the admin side?)
Comment #84
lucascaro commented@pgogy you don't need to filter for #default_value, but you must always filter #value and #markup (see http://drupal.org/node/28984).
Comment #85
pgogy commentedOk, I mostly added it to titles on forms (expandable ones). no on default value. So I think I am ok.
Cheers for your help and patience? Can i repay you in anyway?
Comment #86
lucascaro commentedGetting close @pgogy, the pareview.sh script returned some errors though, it seems that there are some spacing / tabs issues:
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.
As repay, you can consider giving reviews to other people :)
Comment #87
patrickd commentedthe issues found are minor and should not be required for approval, therefore please do not insist on having them fixed and do not switch the issue to needs work if there are no major issues found.
Comment #88
lucascaro commentedsorry @patrickd, i didn't mean to stall the issue, I actually meant to help. Thanks for clarifying that.
Comment #89
pgogy commentedOk, sorry about those - I got confused as to which lines need to be shorter than 80 characters - so reformatted some text and broke it.
Reason for this is sometimes ventral and coder report differently.
So before the last change (the change before the most current one)
Drupal Code Sniffer reported as such (see attachment)
Ventral reported (see attachment)
Code Review reported (see attachment)
Now (most current GIT)
http://ventral.org/pareview/httpgitdrupalorgsandboxpgogy1370108git-7x-1x Ventral is clear
Code review says I have a file block missing
Code Sniffer doesn't like how my documents start and end
So I have three different responses? I know these are to help - but it gets odd when I get different responses.
It seems people always use ventral in the first instance, but then switch to code sniffer - which see different things? Makes working out how to be approved a little awkward.
Comment #90
lucascaro commentedHey @pgogy I think the online version is older than the latest -dev for drupalcs. As mentioned by @patrickd those are minor issues, so it's up to you I guess.. What I did is I tried to remove all errors and warnings just in case, but it shouldnt block your application.
On my end, I've pulled your changes and pareview.sh and drupalcs seem happy with your code.
Comment #91
pgogy commentedThanks, Do I need to do anything else?
Comment #92
lucascaro commentedThis is set to needs review and you have a pareview bonus so you just need to wait to get a review from @klausi.
Comment #93
klausimanual review:
Although you should definitively fix those issues they are no blockers, so I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #94
patrickd commentedThanks 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 and your help in the application queue. 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 #95
pgogy commentedHello
1. Removed
2. Changed
3. Changed
4. I've removed what I think are the obvious ones - I am not sure how I should best do it? I've tended to work in places where I am the only PHP person and so I have always over spaced to make the code a little easier to follow (for them, as they asked for it).
5. Changed
6. Done
7. Done as best I can
8. Removed or replaced where I think it needs it.
Thanks
Comment #95.0
pgogy commentedadding reviews
Comment #96
pgogy commentedAdding review bonus tag back in
Comment #97
patrickd commentedAs per #94 you reached the end of this application, congratulations, please leave it fixed ;-)
Comment #98
pgogy commentedAdding review bonus tag back in
Comment #99
patrickd commentedReview bonus is not needed anylonger - this issue is finished - your application is approved - see comment #94
Comment #100
pgogy commented@patrickd
Sorry, I hadn't refreshed in time, and then the form through an error on me and died.
Thank you very much, I half wanted to make 100 comments so I'd be officially the worst coder ever
@klausi
Thanks for everything. I've been utterly useless as this, and you have been amazing
@The rest
and you
I'll keep reviewing (well sticking code through ventral and trying to pick fault) as best I can :)
If I have new ideas for modules what do I do now? Same process?
Comment #101
patrickd commentedAs successful completion of the project application process results in the applicant being granted the ´Create Full Projects´ permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers. See documentation about full projects (and sub-pages).
Comment #102
pgogy commentedThanks, I thought that was the case, it's just we use drupal in a very specific way here, and I was worried about creating modules that are spurious.
Comment #103.0
(not verified) commentedAdding review bonus