views:

1706

answers:

3

I'm in search for a plugin for Joomla! 1.5 that notifies all the registered users on my site when I have published a new article. Are there any plugins available that could do that?

+1  A: 

I don't know of any, but it's a reasonably simple function to add. You could modify something like this plugin: Joomlapraise SubmitMailer

Just add a feature for mailing registered users rather than admins. You could use the following code.

Add the following to the XML file, just after the 'mailto_admins' section:

 <param name="mailto_users" type="radio" default="1" label="Notify registered users" description="Sends a notification to all Registered users">
  <option value="1">Yes</option>
  <option value="0">No</option>
 </param>

Then add the following to the '.php' file, just after the 'send email to all admins' section:

    // send email to all registered users
if((int)$params->get('mailto_users') == 1) {
     $query = "SELECT email FROM #__users WHERE usertype = 'Registered' AND block = 0";
            $db->setQuery($query);
            $tmp_emails = $db->loadResultArray();

     if(!is_array($emails)) { $emails = array(); }
     $emails = array_merge($tmp_emails, $emails);
}
KingJackaL
+1  A: 

This tip was very useful indeed. Unfortunately the GNU version of this utility for Joomla 1.0 does not seem to be available from JoomlaPraise anymore so I had to hunt high and low for a copy. I then changed your code mod above so that it would work with the Joomla 1.0 version of the JoomlaPraise SubmitMailer Mambot and it nowdoes the job. It is available from my site with the above change included:

http://lightquick.co.uk/jdownloads/automatic-email-notification-for-joomla-1.0.html

Please feel free to download the mambot and play with it.

Yereverluvinunclebert

Dean Beedell
A: 

Hi, maybe this can help you:

http://www.flexicontent.org/

Bye

Umbobabo