Hi there,
First off thank you for making such a fantastic module. My colleagues and I have created some extra functionality and I have attached a patch for your review.
Added functionality:
Extra option on "Content Complete" home page titled "Percentages", where once a user has chosen some fields, they can apply a specific percentage to each field (in case they want to control certain fields having a higher/lower percentage etc.). There is also a check when the page is updated to inform the user if they are below/above 100% (and by how much).
I'm fairly new to Drupal but could you please take a look at the patch and, if you like the added functionality, implement it into the core module?
Many thanks,
Marc
P.S - Please note for anyone running 6.x-1.0 that you can also use this patch as it works for both releases. Any and all comments/suggestions most welcomed! :)
Comments
Comment #1
marc.groth commentedComment #2
marc.groth commentedComment #3
pvhee commentedThanks Marc for doing the effort of implementing this very nice functionality! I will have a look at the code ASAP to see how it can be included in the core module. To all, please report all tests/reviews of the patch in this issue.
Comment #4
marc.groth commentedGreat thanks so much for the super fast response!!
As you can see I'm a slight newbie (two status changes, wasn't sure which was correct hehe).
Look forward to seeing your thoughts/comments/suggestions!! :)
Comment #5
marc.groth commentedHi there,
We noticed a few bugs and have fixed them... Please use the updated patch (attached) and report back any problems etc. as normal.
Thanks very much,
Marc
Comment #6
pvhee commentedThanks Marc, I did a test install on my localhost and found out a couple of issues:
Thanks for the effort!
Comment #7
marc.groth commentedThanks for those bug reports pvhee... Here are my responses :)
I appreciate you looking into this and look forward to hearing from you at your earliest convenience (especially the second point). Would really love to get this functionality included into core as I think it's something people could really make use of.
Thanks again and happy easter!! :)
Marc
P.S - I am not attaching a patch of what I've done so far as I feel I need to know more (again, especially on the second point) so that I can fix the code and have it stable before patching it up and re-releasing.
Comment #8
pvhee commentedHello Marc,
Here some more feedback.
Content Complete works with CCK fields plus the core fields such as Title, Body and File Attachments, which are no CCK fields (in Drupal 7, with fields in core, this will likely change). This difference of course adds an extra layer of complexity, and most of this logic in done in the functions content_complete_get_fields (giving back all fields for a certain type) and content_complete_get_user_fields (giving back all the completed fields for a certain type). You will need to have the same logic for the patch as well I am afraid..
Regarding the upgrade path, I've seen that you included it in the install file but whenever we include this patch in core we will need to have an upgrade path (i.e. to add the field for people that have already installed the module).
Thanks!
Comment #9
marc.groth commentedHey again pvhee!
After some serious hair tearing, I managed to successfully create a patch. The new functionality now includes the ability to give each field a specific percentage regardless of it's name etc. (it's now unique! :)) - this includes non-CCK fields...
As I say, I'm still fairly new to Drupal so could you help me out a little more with the upgrade path? Would I create a separate file for this or would it go in the main .module file? Would it be similar to the edited .install file? Sorry, I have looked on Drupal for any help but am not entirely sure what I'm looking for... Any chance you (or someone else) can point me in the right direction? Thanks in advance :)
I look forward to hearing from you for any comments etc. on the patch... Hopefully we're closer :)
Cheers,
Marc
Comment #10
marc.groth commentedSorry I just noticed that that last patch "_3" had some issues (it was pulling in ALL fields, whether they were selected or not) for some reason. Attached is a patch that deals with that, that is now complete... So please use this latest one and let me know of any problems etc. that you may run into!
Cheers :)
Comment #11
marc.groth commentedHi again,
We have added more functionality, where you can now specify certain fields/percentages for a specified user role... I have attached a patch which includes this. It also now has an upgrade path... So once you have patched this latest version please make sure you run update.php to make sure you get the necessary columns in the database etc.
PLEASE NOTE: This patch is an extension of the previous ones... Therefore the new functionality also includes being able to specify percentages for each field (uniquely) as well as the newly added Roles setting stuff.
I will keep an eye on this page for any comments/suggestions/problems etc...
Thanks :)
Comment #12
marc.groth commentedBumping :)
Comment #13
pvhee commentedHey Marc, thanks for the patch. I found a little time to review it, and here are my comments (after patching the latest dev + running update.php, which all went fine).
I am most likely going to work on #371479: Content Completeness calculation on a per-node basis next to the per-type basis in the upcoming weeks, so expect some changes to happen, which will result in 6.2 of the module. However, I still very much want your contributions inside, but only if we ironed out all the issues.
Comment #14
pvhee commentedNote that version 1.2-beta1 has been released with a lot of new features (views integration is just one of them), and a lot of changes under the hood. Please reroll any patches against this version. Thanks.
Comment #15
pvhee commentedChanging title to better reflect the feature.
Comment #16
marc.groth commentedHi pvhee,
Just wanted you to know that I have not forgotten about this. It's just been very busy at work and we haven't really needed this functionality just yet.
It will probably be best if we wait until 6.2 is released as it seems there are going to be quite a few changes (as you noted) and by then we may be in a better situation to try and tackle this problem
Thanks :)
Comment #17
pvhee commentedHey Marc, good to know! Note that 1.2 has already been released: http://drupal.org/project/content_complete
Comment #18
marc.groth commentedHaha sorry, my bad... I saw it but it didn't click that that was 1.2... It's been a long day/week!
Looking forward to working some more on this... I'll update this post as and when I get done. Setting the status to "postponed" until I have another patch for review.
Cheers :)
Comment #19
deggertsen commentedsubscribe