Closed (fixed)
Project:
Constant Contact
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
4 Mar 2008 at 21:33 UTC
Updated:
30 Nov 2009 at 20:28 UTC
Jump to comment: Most recent file
Is there a drupal 6 version out soon?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | constant_contact_229996.patch | 16.02 KB | drewish |
| #4 | constant_contact-6.x.tar_.gz | 11.29 KB | michaek |
Comments
Comment #1
greenlight commentedAny update on 6.x compatibility?
Comment #2
sampeckham commentedTry using webform and then add some code into the "Additional Processing" box on your form to send the details to CC.
The code to add can be found here: http://www.jamesbenson.net/projects/ConstantContact/
Comment #3
gbrussel commentedThat code looks like the Site Visitor API, is there any code using the REST API?
Comment #4
michaek commentedThis module only uses the Site Visitor API, as it relies on James Benson's class. A module that used the REST API would be superior, but I've ported the 5.x version to 6.x using Deadwood and went over the remaining bugs, and it appears to work acceptably, though I have not tested it completely. The only hitch I've noticed is that status messages are not displayed after actions - can anyone give this code a look and explain what's going on? Or perhaps let me know if the messages, such as 'You have been added to our list.', are visible in your install. (This does not appear to be a theming issue, as I have tested with Garland.)
In addition to porting to 6.x, I added a requirements hook to constant_contact.install that makes it obvious that you haven't downloaded the class from James Benson's site.
This module probably needs some attention. Some messages and titles are hard-coded, and it's likely users will want control over these things. Additionally, unsubscribing only works if you're logged in to the Drupal install, which seems a severe shortcoming. I'll try to give attention to these issues.
I've attached the (in progress) 6.x module here, as I don't have a CVS account, and I don't really relish the idea of wrangling with CVS anyhow.
Comment #5
micheleannj commentedNeed this for a new site -- will give your attachment a try but would love to see a real release! I'd even be willing to be your CVS monkey if that's all that's standing in the way...
Thanks
Comment #6
gbrussel commentedFor those of you requiring this to work on your site, you can use the Webform module with additional processing like sampeckham mentioned. I've worked it out and I'll post the processing code for those of you that need it.
Form components: First Name (becomes first_name), Last Name (becomes last_name), Email Address (becomes email), Confirm Email Address(becomes confirm_email_address). Once you have those components, save the form, and place this code into the "Additional Validation" field under "Webform advanced settings":
Then place this code in the "Additional Processing" field under "Webform advanced settings":
This code will include the ConstantContact class, which sets up the object and URLs to pass the form information to. It then sets up variables and brings in the information from the webform. Next it creates the ConstantContact object and then adds the user and sets a message.
You'll have to modify this code slightly (setUsername, setPassword, setCategory) to work with your CC account, but it should add the user beautifully.
Comment #7
pauldawg commentedAny thoughts on what it would take to make a custom Action that would update or add or remove users from one or more contact lists based on checkboxes in the user's profile, so that action could be triggered whenever a user registered on the site or updated their profile?
Comment #8
pauldawg commentedActually for anyone looking to do this at registration, check out the Rules module. I just used the code posted here but in an Action to execute PHP code on registration and it worked like a charm!
Comment #9
drewish commentedhere's michaek code as a patch.
Comment #10
theoldfather commentedI was unable to enable allow_url_fopen. Here is an alternate version using cURL. Also added support for subscribing to multiple email lists. You will need to create a select field called Mailing Lists. The value for each select option should be the name of a Contact Contact contact list.
Comment #11
fp commentedhttp://www.jamesbenson.net/projects/ConstantContact/ redirects to http://justphp.co.uk/projects/ConstantContact/ and says:
In the meantime you can get it here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/constant_co...
Comment #12
fp commentedAlso, http://developer.constantcontact.com/doc/siteVisitorAPI says:
Comment #13
goddess commentedYou ROCK! This code worked perfectly for me. Thank you.
Comment #14
justphp commentedI've developed a Constant Contact module for Drupal version 6 or above.
See here for more info:
http://cc.justphpsoftware.com/
Comment #15
fp commentedWhere you can find that it is sold for £29.99 and but you won't find info on the licensing.
This is, in my opinion, not an acceptable resolution, unless, of course, you're planning on releasing it here. If this is not part of your plans, perhaps you'd be looking at finding a new maintainer for this project?
Comment #16
jenpasch commentedWith respect to solution #10:
I am getting a webform log message that has an error within this line (75)
(Invalid argument supplied for foreach() in /.../webform.module(1742) : eval()'d code on line 75.)
foreach($lists as $list => $label){
$ConstantContact->setCategory($list); /* set your constant contact interest category */
I was thinking that the variables from my added "mailing_lists" field were passed along to $list, but perhaps they are not.
My question is then: how do I "set [my] constant contact interest category" (which I am guessing are my list names)
thanks for the code!
Comment #17
jeffschuler@fp, re:#15...
-- Drupal Licensing FAQ
Just sayin.
Comment #18
fp commentedGood to know. Thanks jeffschuler.
Comment #19
jakew commentedYep, agree with #17 and #18. I hope to find a real, GPL'd solution to this before the end of the year, as I am responsible for a site that currently uses #6.
Also, with #6, I'm having a problem: even though the contact is successfully added to the Constant Contact list, I am still getting the "Failed to add new subscriber" message. Does this have anything to do with the fact that $ConstantContact->add(...) is called twice, the second time seemingly only to determine which message to display?
Comment #20
gbrussel commentedI wrote that code long ago, and it's probably very broken. From what I can tell the ->add() function doesn't return anything we can check against to make sure the contact was added properly, so I'm not sure how to better check for errors in that script.
Comment #21
justphp commentedCharging a small fee for the module is allowed and I'm not violating the drupal license in any way.
I simply could not have developed and supported this module for free given that it took 3 weeks for the rest api code and 2 weeks for the initial module development.
Comment #22
brianV commentedjustphp, there are a few things you need to know.
First of all, modules, as derivatives of Drupal's GPL'ed code, also are automatically under the GPL licence.
Secondly, it is allowable to charge a fee for GPL'ed code. However, by distributing it, you give others the right to redistribute and modify your code.
In short, it would be perfectly within their rights for someone to purchase your module, and adding it to the contrib archive here on d.org.
Comment #23
Crell commentedCharging a fee for a module distributed from another site is fine, provided that the module is still licensed under the GPL. As long as you are distributing it under the GPL, you can charge whatever you want. You just cannot (per the terms of the GPL) prevent anyone that buys a copy from you from redistributing it themselves for whatever cost they want, including zero, with or without their own modifications.
So as long as the license people are buying from you is the GPL, that's fine.
Comment #24
brianV commented@Crell
Just FYI, it doesn't appear that the code is being offered under the GPL, since he is offering single- and multi-use licenses. I don't think that capacity exists under the GPL.
Comment #25
alex_b commentedAlso see:
http://drupal.org/licensing/faq (see 6, 7, 8, 9)
Comment #26
pauldawg commentedSo it seems there is a quandary here for any would-be Drupal module developer looking to make money in a development venture. The bottom line is that it's not really a good model to charge for something that can possibly be obtained for free elsewhere. Heck, if it really worked that way, I could just sell installations of Drupal 6 and contrib modules to poor unsuspecting newbies. I might even make a few bucks doing this for a while. Of course no one could say I am violating licensing agreements, but on the other hand, it's not a sustainable business model, doesn't help me build a great reputation in the community, and doesn't embrace the open-source nature of Drupal.
It has been noted that doing customization and implementation work for Drupal is a hard business to make money at as well, although this is debatable, as I seem to see signs that some people have done pretty well for themselves in this regard; like anything else I would say it just takes time to build up a reputation. For myself, I have seen lots of offers for work for Drupal developers if that's something you are good at and want to do. Offering and maintaining a high-quality module in the Drupal community seems like it would be a great way to build up that clout.
So, JustPHP, you seem to have a great module there (and if there are any current users of this ConstantContact Drupal 6 module out there, please write a review in this thread!). And there is lots of interest in this module among the community. I am sure that releasing the module to the public would be a better solution than finding out that it's been hijacked and posted by someone else (and no, I am not suggesting that I would do that -- I would not, and I will not -- but if brianV and Crell are correct, this is an implicit risk in selling GPL code). My guess is that you could do quite well for yourself (maybe even better than you currently are) by repackaging the support services you are providing with the purchase and selling that and/or charging for customization and implementation work. (Look at Acquia, they seem to be doing pretty well!)
That said, do you think you would be open to releasing your module to the Drupal community under the right circumstances?
Respectfully,
Paul
Comment #27
Crell commentedA limit on the number of sites you can install a module on would, I believe, be a violation of the GPL. So that's a no-go.
I never said that selling GPL'd modules per-unit was a viable business model. If frankly don't think it is, and in the end it's self-defeating because someone will just replicate the functionality anyway as part of the community, everyone will use that, and you'll be stuck with a dead-end module. (It's happened to other developers before.) I just said that charging money for a module does not ipso facto violate the GPL. :-)
Comment #28
pauldawg commentedCrell, I understand completely. My comment was directed more at the author of the module. Personally I think that if you want to make money as a developer of Drupal or any other free open source software, it doesn't make a whole lot of sense to try and sell your work, even if it's legal; but there are other ways to make money at it. The context of my comment was based on the notion that the author had to charge money for the module to justify the time spent. There are other ways to make the time investment "worth it", including the sale of services and support. That is ultimately the point I was trying to make.
Hopefully the author will see the wisdom in this and offer the module to the public. There are apparently some great features in the module and good opportunities for enhancement as well, so it would be a shame to see this module suffer the "dead-end" fate or disappear completely.
Comment #29
justphp commentedI'm aware of the GPL license and how that works but do not think this breaks the rules in any way, support for multilple-domains is for support not a limit on the number of installations.
I'm happy to contribute this to drupal.org and change my services to be support and installation services only but this will take me a couple of weeks to implement, what it the best way forward with this because it seems to me the drupal project has reached a dead end?.
Looking at the guides for co-maintaining it says I have to have participated, which I have not:
http://drupal.org/node/363367
Comment #30
Crell commentedThat's a guideline set by one particular group of developers, not a blanket required policy. Each module maintainer is at their discretion to decide how to handle co-maintainers. It looks like the maintainer of this module is at least somewhat active on d.o still, even if he's not focusing on this module.
If your module is sufficiently similar in architecture to the current one, you can post a patch from the current 5.x version to your version. You can also offer to come on board as a co-maintainer for the 6.x branch. He may or may not agree to do so. You will, of course, need a CVS account first.
If your version differs significantly, you can just post an issue with a tarball asking for permission to take over a 6.x branch.
How the maintainer will respond, I do not know. You could also try contacting him directly through his contact form, but the issue queue is generally preferred.
Comment #31
pauldawg commentedJustPHP:
It's great to hear that this module may become publicly available soon -- and just in time, I might add! Let me be the first to offer my support in testing, patching, and co-maintaining this module. I too am a relatively new Drupal developer (2 years as a site designer) and have only contributed a couple of patches so far, but I am an experienced programmer and very interested in increasing my experience with Drupal module development. So if you'd like another co-maintainer once you get going on this, please let me know.
Let me also add that if there are companies who wish to make use of the module they may be able to help fund your efforts by paying for the services. A lot of enhancement to Drupal modules seems to happen this way. A company or institution needs an enhancement so rather than "buy" a one-off solution or "contract" a module enhancement that never gets distributed outside their company, they "fund" the development of the module, which then gets released back into the open source community. If I am not mistaken, big chunks of the Drupal core itself got funded this way, deriving from the efforts of Howard Dean in creating grass-roots Web sites.
To apply for a CVS account, I believe the process is as follows:
Once you've got a CVS account, I believe the rest is pretty straightforward. I say "I believe" because I am currently in the middle of this process myself for a different module.
Comment #32
pauldawg commentedAnother approach you may wish to consider, especially if this module is a big leap from the current 5.x branch, is to just submit your own separate module http://drupal.org/node/7765. You should figure out a plan with the current maintainer first, but in reading http://drupal.org/node/363367 it seems that it might be a bit more challenging to treat this as the same module, just from a process and procedure perspective. I've seen this happen before, off the top of my head I think it happened with TinyMCE and Workflow, where the original module was abandoned and picked up by a different maintainer as a new module.
Comment #33
Crell commentedHe could spin it off as another module, true. It's best if he didn't, however. Just because that has happened in the past doesn't mean it's a good thing. :-) If we can keep a continual evolution within a single project that is better for all involved, *especially* if there's a continuous upgrade path. (Don't underestimate the importance of that!)
Comment #34
pauldawg commentedTrue. The Best Practices suggest, however, that every change to the existing module would need to be accompanied by an Issue to be documented, and this could be quite cumbersome. Also, a new working 6.x branch would need to be recreated (perhaps using the Deadwood version in #4, plus the code changes above.) Or are these, again, just "best practices" and could the new maintainer(s) instead just create an issue saying something like "Rebase the 6.x branch with code from new module" and call it a day?
I'll leave this to the experts. Just trying to do what I can to assist. Please let me know how I can help.
Comment #35
Crell commentedThere's nothing preventing a module maintainer from starting from scratch for a new Drupal version. Although as we use CVS there is no such thing as "rebase". :-) Really, the only required procedures for module maintenance is what tags and branches get named, as those are tightly controlled. What is IN those branches and how they get there is governed by convention and recommendation, not strict policy.
At this point, though, the ball is in justphp's court to take it up with the current maintainer. They get to work out the details. The rest of us are just the peanut gallery.
Comment #36
justphp commentedThanks for the info pauldawg and Crell, I've already submitted an issue to the modules issue queue and also emailed the maintainer directly so hopefully hear soon.
I would prefer to take over the existing project if the process is going to be relatively simple, looking through comments the current maintainer is not actively developing this anymore so I think it should be done that way rather than creating a new module.
pauldawg, I could certainly use your help writing docs and testing the module.
Thanks,
James
Comment #37
justphp commentedAn update for drupal version 6 and the new Constant Contact REST API will be rolled out within the next 2 weeks.
Comment #38
pauldawg commented+1 for the James Benson fan club! :)
Looking forward to this! Thanks for contributing this to the Drupal community!
Comment #39
priceline commentedJustphp, thanks for initiating.. i can help testing the module. Please let me know.