Closed (fixed)
Project:
Module Builder
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Jan 2007 at 19:12 UTC
Updated:
2 Feb 2007 at 05:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
binduwavell commentedthe original patch is absolutely not complete, but it is as far as I have gotten so far. As a newb I'm running into stuff I don't know how to fix. So I'm providing it so other can look and see if they can progress some. I will keep working on this, if I make progress I'll attach subsequent patches.
Comment #2
binduwavell commentedok, got the main page to generate, it seems to work as long as you uncheck the "Automatically generate module file for download?" checkbox. Still need to get the api-downloader to work without timing out, and to evaluate new/old hooks and get the module to generate .info and .install files... Am thinking of removing the direct download option for now as we need to generate more than one file now. In the long run we could produce a page with links that allow the user to download the files... so they can right click and do saveas rather than having copy paste...
Comment #3
binduwavell commentedThe "administer >> modules" and "administer >> help >> module_name" links on the builder page are broken because of the new security features in the form api. So that will need fixing too.
Comment #4
webchickOh, wow! Thanks a lot! I'll try and look at this this weekend.
Comment #5
webchickI'm going to leave a detailed review here, because Bindu is part of the Drupal Dojo, and learning how to contribute. :)
General stuff:
Code-specific stuff:
module_builder_help()was the module description which is now covered by the .info file, you can actually remove that function altogether.You should avoid using $_POST directly if possible, and instead use $form_values['op'] (not sure if it _is_ possible here, but...). I like this addition, btw, and plan to back-port it to the 4.7 version.
Very minor nitpick: the concatenation period should always go next to the quote. Coding standards
This is actually no longer true with your check against $op == t('Update').
1. There are no dependencies, so you can leave that line off.
2. "Package" should only be used when the module is part of a larger set of modules; for example CCK fields or modules that extend what Organic Groups can do. See http://drupal.org/node/101009 for more info.
Some other issues I found:
- The broken links that you mentioned.
- The description of the file field has "<em>files</em>" literally in the string; this is because it both is using the %placeholder style and has theme('placeholder') -- the theme('placeholder') should go.
- The lines to download the hook documentation are commented out, so threfore the module won't work. ;) Was this giving you trouble, or why did this get commented out?
At any rate, a great first stab at porting this and will make the other issues easy to track down. Thanks!!
Comment #6
binduwavell commentedGeneral stuff: makes sense
Code-specific stuff:
1. I think that without module_builder_help() like that you don't get a description on one of the admin overview pages.
2. I think you (or some other contributor) did that, I changed the format to not create the op variable above when it was only used on that line. I was not able to figure out how to remove that piece of code and I did look at it for a while.
3. Funny, I read that page several times and it wasn't clear to me. Went back and re-read it and of course it makes perfect sense :)
5. I left the dependencies in there as a reminder to include that with a comment in the generated .info file. I put the package in there so that Module Builder would sort next to the devel and code review modules.
Some other issues you found:
- I'm not really up on theming yet, but I think I can figure this out if I look at it a bit
- The lines to download the hook docs are commented out because each call to drupal_http_request() takes 10-20 seconds and there is some global setting that makes the page fail to load if it takes longer than 60 seconds to load. Seems like there is an issue with drupal_http_request() taking that long to load a page which when opened in a browser on my dev box takes less than 1 second.
Comment #7
binduwavell commentedGeneral stuff:
2. Please let me know if I have resolved this with the latest attachment.
Code-specific stuff:
1. Either this was fixed in a recent commit, or I was wrong, I have removed hook_help()
2. I have been unable to find another way to get at 'op'
3. Fixed
4. I think the call to _module_builder_check_settings() at the top of module_builder_page() would result in the hook documentation getting retrieved the first time you goto this page.
5. I removed dependencies and package. I know I don't get a vote, but :) I think that there should be a Developer package (I saw that the devel module just removed this... there are a few modules for developers, and I personally like having them grouped together..) What do you think?
Some other issues I found:
- Fixed the links (used ! instead of % for placeholders)
- removed explicit emphasis from path display
- looks like the drupal_http_request method is now working great, yay :)
Comment #8
binduwavell commentedminor correction in 5. above I say I saw that the devel module removed the Development package, actually I don't think they have, the coder package appears to have removed it.
Comment #9
binduwavell commentedFixed some string formatting issues from the old code discovered by the coder module. The only remaining item from coder is our uses of $_POST['op'] in the settings method. I had an idea about how to fix it, but don't have time tonight to give it a shot.
Comment #10
binduwavell commentedFixed the only remaining coder report. Still need to consider adding drupal 5 features (like .info file generation) but I think this is code complete on the conversion front.
Comment #11
webchickAwesome. Committed to HEAD; thanks!
Comment #12
(not verified) commented