


Written by W. Curtis Preston
Tuesday, 08 May 2007 17:53
I've received a lot of requests for the bridge we wrote to make Joomla work with mailman. Here it is!
It now supports Joomla 1.5 when running in Legacy Mode.
The goal of this component was to first get the logged in user's email address, then get a list of public mailman mailing lists that they could subscribe to. It lists all publicly available lists, with a preselected button based on whether or not they're already subscribed to that given list. It allows them to subscribe via regular or digest mode.
They select what list(s) they want, and what mode they want, and click "Subscribe," and magic happens. They get subscribed, the web page tells them what happened, and they get an email telling them what happened.
Download the component for Joomla 1.0 here .
Download the component for Joomla 1.5 here . (The 1.5 version is new, so please let me know how it works.)
If you want to see how it works, you're welcome to sign up to my site, http://www.backupcentral.com/, and log in. You'll then see a menu item called "Forums & Mailing Lists -> Mailing Lists." Click that and you'll see how it works. Feel free to subscribe to and post to the mailing list called Testy.
Thank you very much to Stefan Haller who took my raw component and created an admin interface to it. Now you don't have to edit the mailman.php script any more!
Here are the install instructions:
1. Install the component via standard install procedures.
2. Point your admin browser to Components -> Mailman2 -> Config, and change the five or six config variables.
3. Make a menu item under your user menu
a. It should be of “Link URL” type
b. It should point to /index.php?option=com_mailman2
c. It should only be available to registered, logged in users
4. That's it!
FAQs:
Does this require command line access to the Mailman commands?
No.
The component is installed and I configured it in the admin screen, but when I run it, I see "Warning: Invalid argument supplied for foreach() in /home/accname/public_html/components/com_mailman2/mailman2.php on line 203" What's up with that?
So far everyone who has had this error has not put the right values in the configuration screen. The most common misconfiguration mistake is to leave the http:// in the domain name you're using to admin Mailman. If your domain admin interface is http://mydomain.com, you should enter just domain.com as the value for the admin domain.
Good luck. I’d love to see how well you get on with it.
We're still open to suggestions and welcome anyone who would like to contribute to the work.
Add comment
Comments
So if I create a mailing list then the final URL is: http://lists.domain.com/mailman/admin/lis1_lists.domain.com
Is there any way to adapt this kind of mailman list to this utility ?
Thanks !
Warning: file_get_contents(http://24weightloss.com/mailing-lists.html/public_html/administrator) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Component not found in /home/vairo/public_html/components/com_mailman2/mailman2.php on line 166
I discovered that the issue was actually related to a PHP security setting in on the server. To overcome this without changing the setting I modified the code to use curl instead of "file_get_contents", here is one of the examples from line 166 of /public_html/joomla/components/com_mailman2/mailman2.php
// $content=file_get_contents("$adminurl","FALSE");
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "$adminurl");
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
$content = curl_exec( $ch );
curl_close( $ch );
Similar modifications were made in other places and now it works great!
Thanks
Notice: Undefined variable: config in C:\Sites\cpac\webroot\administ rator\components\com_mailman2\ admin.mailman2.php on line 14
Notice: Trying to get property of non-object in C:\Sites\cpac\webroot\administ rator\components\com_mailman2\ admin.mailman2.php on line 14
Shawn
Looks like I can't ignore these notes. After I created the menu item and run it from front end I got many php errors. the one at the end is:
You do not appear to have the correct URL for administering Mailman.
The supplied URL was: http://(mysite)/mailman/admin/, which is constructed using the value you specified for the domain, which was: (mysite).
Please check the value you specified for the domain in the configuration screen of this component.
An email has been sent to you with a screen shot of what the component saw at this phase.
And I am not sure where the email of screen shot was sent to.
Notice: Undefined variable: config in (path_to_my_webtoot)\component s\com_mailman2\admin.mailman2.php on line 14
Notice: Trying to get property of non-object in (path_to_my_ webroot)\administrator\compone nts\com_mailman2\admin.mailman2.php on line 14
Are they errors?
If not can I ignore them. Where do I go from there beyond the config?
Shawn
Warning: file_get_contents(http://24weightloss.com/mailing-lists.html/public_html/administrator) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Component not found in /home/vairo/public_html/components/com_mailman2/mailman2.php on line 166
You do not appear to have the correct URL for administering Mailman.
The supplied URL was: http://24weightloss.com/mailing-lists.html/public_html/administrator, which is constructed using the value you specified for the domain, which was: 24weightloss.com/mailing-lists.html.
Please check the value you specified for the domain in the configuration screen of this component.
An email has been sent to you with a screen shot of what the component saw at this phase.
Any ideas ? to me it looks like that i cant point to the right admin directory or something. Been testing with different variants no luck.
Any recommendations ?
Thanks
RSS feed for comments to this post