Therefore, I adapted a large amount of the Addresses module for CCK into a "Dimensions" module for CCK. (This adaptation allowed multiple sub-fields to be a part of the content without having to manage multiple individual fields for one Dimension attribute).
For instance: Exterior Dimensions would include: Height, Width, Depth; whereas, Cylindrical Dimensions would include: Height, Diameter or Radius.
The idea is that I can create a field for a content type which has any number of visible, hidden, required, or ignored fields: length, height, width, depth, radius, diameter in both metric and imperial units.
Best of all, the idea is to make the module's data searchable, allow tokens to facilitate easy display, and (if one exists) generate content in a properly formed micro-format.
The module also knows whether or not both Radius and Diameter have data and only displays one value -- so as not to confuse content viewers. Content editors/creators can supply both fields if they wish.
In this manner, the Dims module would integrate quickly with Views!
I have scoured the Drupal site for a "Dimensions" CCK module or similar contribution, with no results (the Measured Value Field CCK was both buggy and required WAYYYY too many other modules, not to mention, it cluttered the Edit Content Type form).
Comment | File | Size | Author |
---|---|---|---|
#26 | uc_product_registration-6.x-1.x.zip | 19.47 KB | wjaspers |
#15 | uc_product_registration-1.x-dev.zip | 20.04 KB | wjaspers |
#14 | uc_product_registration-6.x-1.x-dev.zip | 19.21 KB | wjaspers |
#13 | uc_product_registration-6.x-1.x-dev.zip | 17.43 KB | wjaspers |
#12 | uc_product_registration-6.x-1.x-dev.zip | 13.18 KB | wjaspers |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedI'm sorry, but where is the archive with the code to be reviewed?
Comment #2
wjaspers CreditAttribution: wjaspers commentedSorry about that; In the application, I didn't recognize a way to upload my DEV code.
Its not pretty, it has similar bugs to that of Addresses (since its the code I based this off of), and it may not yet meet Drupal's CVS standards... but here goes...
Comment #3
apadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
Comment #4
Dave ReidTagging all CVS applications with ubercart-related code.
Comment #5
wjaspers CreditAttribution: wjaspers commentedNo (present) time to continue development on this. Waiting to see what Drupal Commerce (created by Ubercart maintainers anyway) will bring to the table first.
Comment #6
wjaspers CreditAttribution: wjaspers commentedCreated uc_product_registration module. Code to follow tomorrow morning. Module supports registration on a global or per-product basis, includes views 2 support, permits administrators to restrict which product classes are registrable, and supports model/serial number checks using regular expressions on a global or per product basis. Requires ubercart 2.x, views 2.x, and that the uc_product module is enabled.
Comment #7
wjaspers CreditAttribution: wjaspers commentedStill needs a few tweaks to be perfect; but includes all the code thus far.
Comment #8
brianV CreditAttribution: brianV commentedHere's a few review points, although this is not a comprehensive review:
should be:
(see http://drupal.org/coding-standards#controlstruct)
should be:
Please review the coding standards section on comments at http://drupal.org/coding-standards#comment
Comment #9
wjaspers CreditAttribution: wjaspers commentedAlright. Thanks for the feedback, updated everything according to the Coder module, worked out a few more small bugs, and cleaned up my comments.
Comment #10
brianV CreditAttribution: brianV commentedAnother suggestion (not an acceptance blocker, just a friendly suggestion):
Rather than loading the uc_product_registration.views.inc in hook_init() on every pageload, you could just put your hook_views_api() function in the .module file. This saves the .views.inc file from having to be loaded on pageviews where it isn't needed - Views will use the hook_views_api() file to find the location of it when it is needed.
I am leaving at 'Needs Review'. A quick look suggests this module is fine, but I don't have time to do a really in-depth review.
Comment #11
wjaspers CreditAttribution: wjaspers commentedGreat! I've posted the fix (as I found and solved another few bugs this afternoon). The module system (like Drupal) has quite a learning curve; but its getting easier!
Comment #12
wjaspers CreditAttribution: wjaspers commentedAdded one more bugfix: module didn't respect product classes for registration correctly.
Comment #13
wjaspers CreditAttribution: wjaspers commentedAdded more Views 2 support (including filters), a generic registration page (w/ Menu Item), an autocomplete field for the generic registration page, and started work on Rules support. Rules support needs a LOT of work.
Comment #14
wjaspers CreditAttribution: wjaspers commentedFixed a few more bugs; added Views support for the autocomplete field on the generic registration page. Nothing new for Rules support (still a work in progress). Fixed a couple misconceptions about NID/VID combinations. Added Token support. Added a default view to support the autocomplete field, will add additional support for it in later releases (if this is approved).
Passed Coder module standards.
Comment #15
wjaspers CreditAttribution: wjaspers commentedFixed a bug in my token support that was causing errors with strings.
Added demo site (http://ucpr.willjaspers.com) and screenshots (http://ucpr.willjaspers.com/screenshots).
Comment #16
wjaspers CreditAttribution: wjaspers commentedComment #17
arianek CreditAttribution: arianek commentedHi. Please read all the following and the links provided as this is very important information about your CVS Application:
Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications
Comment #18
wjaspers CreditAttribution: wjaspers commentedCheck the sandbox, code should be available now: http://drupal.org/sandbox/wjaspers/1076268
Comment #19
wjaspers CreditAttribution: wjaspers commentedComment #20
mlncn CreditAttribution: mlncn commentedwjaspers reacted promptly and well to BrianV's feedback back in the CVS days, has figured out all the hoops to jump through to actually get a review now, and the code looks good to me. Setting RTBC to give vetted git user access.
Comment #21
apadernoComment #22
greggles@kiam, why did you move this from RTBC back to needs needs review?
Edit: I accidentally put an exclamation point on the end instead of a question mark - I meant it to be a question, not a yelling statement :)
Comment #23
wjaspers CreditAttribution: wjaspers commentedI'm assuming because it switched queues--if there are any different review guidelines, it would need to be checked against them as well.
Comment #24
TR CreditAttribution: TR commentedThere are a lot of coding style/documentation problems. See http://drupal.org/coding-standards
Some of these problems are (in no particular order):
A lot of the files in this project are missing an EOL at the end.
Get rid of $Id$ - this was only needed for CVS
Documentation comments need work. See http://drupal.org/node/1354
For example:
"Implementation of" should be "Implements".
Formatting of function documentation blocks.
Missing comments for some functions.
hook_uninstall() has a block of commented-out code that should be removed.
$q = db_query("SELECT name FROM {variable} WHERE name LIKE 'uc_product_registration%'");
should be
$q = db_query("SELECT name FROM {variable} WHERE name LIKE 'uc_product_registration%%'");
Get rid of extra spaces, for example
elseif ( !$nid ) {
should be written aselseif (!$nid) {
There's lots of trailing whitespace in your code.
Ternary expressions like
($node->vid?$node->vid:NULL)
should be written as code>($node->vid ? $node->vid : NULL)I'll give it a functional review after all the code style and documentation style problems are cleaned up.
Comment #25
wjaspers CreditAttribution: wjaspers commentedThanks for taking time to look at it.
Some of the missing EOL's might be a result of using a windows based editor and forgetting to convert my line endings.
I'll do what I can to clean it up.
Even if Coder tells me to leave in
// $Id$
is it safe to assume I can leave it out?Comment #26
wjaspers CreditAttribution: wjaspers commentedThis should clean everything up for 6.x.
I'm working on a 7.x branch at work (still have a lot to learn about entities).
Code will be pushed to my git repo later.
I see that I missed a few compacted Ternary operators--easy fix later.
Comment #27
jordojuice CreditAttribution: jordojuice commentedAdding UC application tags.
Comment #28
TR CreditAttribution: TR commented@wjaspers: You should make your changes directly in the Git sandbox. Don't attach the changes as a ZIP here.
Comment #29
wjaspers CreditAttribution: wjaspers commentedOk, I updated my repo.
Comment #30
ccardea CreditAttribution: ccardea commented.install file - using unique keys where I think you want to be using primary key
registration date is a datetime but purchdate is char 20. What's the reason for this?
I've had problems using datetime in mysql. I wound up using an integer column to store unix timestamps, as some drupal core tables do. Have you tested this?
.module file
line 88: hook menu
- All you need in your doc block is 'Implements hook_menu'
- You don't need the $tree variable, and it isn't used anywhere
- $items['products/register/%'] - uses a place holder argument, but this is not included in your page arguments for this menu item. This makes me wonder if you've tested this module
Line 131 - Same documentation error as above. This is true for all hook implementations
Line 171 -uc_product_registration_checkanonymous() - drupal has a function for this: user_is_anonymous()
This is enough for now. There's quite a bit more review needed for this project.
Comment #31
wjaspers CreditAttribution: wjaspers commentedMade significant progress cleaning up code.
Repo updated.
6.x-1.x branch created.
Comment #32
jthorson CreditAttribution: jthorson commentedIt appears that you have successfully completed the application process with a different application, and been granted the 'create full projects' permission:
UC Add to Cart Block: http://drupal.org/node/1149550
Once their first application has been successfully approved, then an applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue.
With this in mind, I have marked your other applications as 'closed(duplicate)'. If this is incorrect, and you do not yet have the ability to create full projects, then please feel free to re-open this application.
Thanks in advance for your patience and understanding!
Comment #33
wjaspers CreditAttribution: wjaspers commentedI do have the "promote to full" permission. Thank you for updating this!
Comment #34
apaderno