Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / [RESOLVED] admin email for expiration ad

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

[RESOLVED] admin email for expiration ad

More
10 years 7 months ago - 10 years 6 months ago #19483 by francota
Hello
I wuold like recieve the same email that user receive before the expiration of the ads
Can i do that?
what file i have to modify?

Thanks
FRank
Last edit: 10 years 6 months ago by loic.
More
10 years 6 months ago #19492 by loic
Hello,

Sorry but this is not possible with adsmanager but there is a way to do that by customising the code.
The fonction that send the recall mail are in administrator/components/com_adsmanager/models/content.php, function sendExpirationEmail().
If your add the function sendMailToUser() here, you will be able to receive an expiration recall mail.

Best regards.
More
10 years 6 months ago #19498 by francota
Just to be clear
I want that the admin receive the same email that the system sent to the user when their ads are going to expire.
To do that I have to follow your suggest Loic??

Thanks
FRank
More
10 years 6 months ago #19503 by loic
Yes,

But after reading my message, I didn't give you the right function to add.
The correct function is sendMailToAdmin() and not sendMailToUser().

Best regards.
More
10 years 6 months ago #19519 by francota
What do you think in this way
Could it work?? :blush:
thanks
Frank
function sendExpirationEmail($content,$conf)
	{
		$user = JFactory::getUser($content->userid);
		$uri	= JURI::getInstance();
		$root	= $uri->toString( array('scheme', 'host', 'port'));
		$link = $root.TRoute::_("index.php?option=com_adsmanager&view=expiration&id=".$content->id,false);
		$body = str_replace('{link}',$link,$conf->recall_text);
		$body = str_replace('{date}',strftime(JText::_('ADSMANAGER_DATE_FORMAT_LC'),strtotime($content->expiration_date)),$body);
 
		return $this->sendMailToUser($conf->recall_subject,$body,$user,$content,$conf,"recall");
                 return $this->($subject,$body,$user,$content,$conf,$type):
	}
More
10 years 6 months ago #19531 by loic
Hello,

The two last lines will work better like this:
$this->sendMailToUser($conf->recall_subject,$body,$user,$content,$conf,"recall");
return $this->sendMailToAdmin($conf->recall_subject,$body,$user,$content,$conf,"recall"):

The return keyword means that the function will stop at that point :).

Best regards.
Moderators: perry
Time to create page: 0.082 seconds
Powered by Kunena Forum