1
Peekay
Catads 1.53.4 RC2 Email notifications patch
  • 2010/5/27 12:44

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


To send email renewal notices from Catads when the user has chosen to be notified by email, you need to enable the block called 'Send an email if the ad is due to expire'.

I confess that I turned it off myself because I thought it was a user block and the template was missing. It turns out that you need to enable this even though it doesn't show on the page.

Also, if you decide to hide the notification options in prefs, you need to make this small code change to ensure that emails are sent automatically. There's just two files to change.


NEW CODE:

if (($xoopsModuleConfig['auto_mp'] > ) && ($xoopsModuleConfig['show_notification_options'] == 1)) {

$expired_tray = new XoopsFormElementTray(_MD_CATADS_CHOICE_MAIL_EXP ,' ','expired');
$expired_tray->addElement(new XoopsFormRadioYN('''expired_mail_send'$expired_mail_send), true);
$expired_tray->addElement(new XoopsFormLabel('',_MD_CATADS_BY));

$select_prefcontact1 = new XoopsFormSelect(''"expired_by_mode"$expired_by_mode);
$select_prefcontact1->addOptionArray(array('0'=>_MD_CATADS_CONTACT_MODE1,'1'=>_MD_CATADS_CONTACT_MODE2));

$expired_tray->addElement($select_prefcontact1);
$adsform->addElement($expired_tray);

} else if((
$xoopsModuleConfig['auto_mp'] > ) && ($xoopsModuleConfig['show_notification_options'] != 1)) {

$adsform->addElement(new XoopsFormHidden('expired_mail_send''1')); // yes
$adsform->addElement(new XoopsFormHidden('expired_by_mode''1'));   // by email
}



include/form1_ads.inc.php

Replace:

if (($xoopsModuleConfig['auto_mp'] > )&&($xoopsModuleConfig['show_notification_options'] == 1)) {
                
$expired_tray = new XoopsFormElementTray(_MD_CATADS_CHOICE_MAIL_EXP ,' ','expired');
                
$expired_tray->addElement(new XoopsFormRadioYN('''expired_mail_send'$expired_mail_send), true);
                
$expired_tray->addElement(new XoopsFormLabel('',_MD_CATADS_BY));

                
$select_prefcontact1 = new XoopsFormSelect(''"expired_by_mode"$expired_by_mode);
                
$select_prefcontact1->addOptionArray(array('0'=>_MD_CATADS_CONTACT_MODE1,'1'=>_MD_CATADS_CONTACT_MODE2));

                
$expired_tray->addElement($select_prefcontact1);
                
$adsform->addElement($expired_tray);
        }


include/form2_ads.inc.php

Replace:

if (($xoopsModuleConfig['auto_mp'] > )&&($xoopsModuleConfig['show_notification_options'] == 1)) {
                        
$expired_tray = new XoopsFormElementTray(_MD_CATADS_CHOICE_MAIL_EXP ,' ','expired');
                        
$expired_tray->addElement(new XoopsFormRadioYN('''expired_mail_send'$expired_mail_send), true);
                        
$expired_tray->addElement(new XoopsFormLabel('',_MD_CATADS_BY));

                        
// mode of notification - 'expired_by_mode' value is ADDED to expired mail send value for DB (0 = PM, 1 = email)
                        // $select_prefcontact1 = new XoopsFormSelect('', "expired_by_mode", 0);
                        // pk get notification mode (add VAR as value and set VAR in adsedit.php)
                        
$select_prefcontact1 = new XoopsFormSelect(''"expired_by_mode"$expired_by_mode);
                        
$select_prefcontact1->addOptionArray(array('0'=>_MD_CATADS_CONTACT_MODE1,'1'=>_MD_CATADS_CONTACT_MODE2));

                        
$expired_tray->addElement($select_prefcontact1);
                        
$adsform->addElement($expired_tray);
                        }


A thread is for life. Not just for Christmas.

2
btesec
Re: Catads 1.53.4 RC2 Email notifications patch
  • 2010/5/27 18:31

  • btesec

  • Friend of XOOPS

  • Posts: 623

  • Since: 2007/2/20


I suspect this will be included in the next release.

3
Peekay
Re: Catads 1.53.4 RC2 Email notifications patch
  • 2010/5/27 19:46

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Oh yes
A thread is for life. Not just for Christmas.

Login

Who's Online

273 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 273


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits