2nd this request
Need something like Docmans:
support.joomlatools.eu/tutorials/5-docman-notify.html
only setup for joomDoc
The following can be modified to notify all super administrators with Notify selected in user manager:
components/com_joomdoc/views/document/view.html.php
FROM:
if ($step == 3) {
DocmanViewDocument::importScript ();
}
TO:
if ($step == 3) {
global $mainframe;
$db =& JFactory::getDBO();
$mailfrom = $mainframe->getCfg( 'mailfrom' );
$fromname = $mainframe->getCfg( 'fromname' );
$subject = 'New File Uploaded';
$message = $_FILES['upload']['name'];
//get all super administrator
$query = 'SELECT name, email, sendEmail' .
' FROM #__users' .
' WHERE LOWER( usertype ) = "super administrator"';
$db->setQuery( $query );
$rows = $db->loadObjectList();
// get superadministrators id
foreach ( $rows as $row )
{
if ($row->sendEmail)
{
JUtility::sendMail($mailfrom, $fromname, $row->email, $subject, $message);
}
}
DocmanViewDocument::importScript ();
}