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 / archive adsmanager

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

archive adsmanager

More
11 years 6 months ago #11308 by loic
Replied by loic on topic archive
Hello,

For the 2, an expired ad doesn't send any mail, so i don't understand the problem.

For the 5, In the file /components/com_adsmanager/lib/cron.php, you need to add the code for deleting the images at the line 29, just after the line :
$contentmodel->manage_expiration($fieldmodel->getPlugins(),$conf);

Best regards.
More
11 years 6 months ago - 11 years 6 months ago #11313 by Max1985
Replied by Max1985 on topic archive
Thanks for the answer! And what exactly is necessary to add?
And how can we do it here?

Thanks for the answer! And what exactly is necessary to add?
And how can we do it here?
case "archive":
                                                        $this->_db->setQuery( "UPDATE #__adsmanager_ads SET recall_mail_sent = 0 WHERE id = $id");
							$this->_db->query();


№2 - Come messages to e-mail ads on the extension after its transfer to the archive. And it is necessary not to come.
Tell me this will work?
They are:
$this->_db->setQuery( "UPDATE #__adsmanager_ads SET recall_mail_sent = 1 WHERE expiration_date IS NOT NULL AND DATE_SUB(expiration_date, INTERVAL ".$conf->recall_time." DAY) <= CURDATE() AND recall_mail_sent = 0 AND published = 1");
Replace with:
$this->_db->setQuery( "UPDATE #__adsmanager_ads SET recall_mail_sent = 1 WHERE expiration_date IS NOT NULL AND DATE_SUB(expiration_date, INTERVAL ".$conf->recall_time." DAY) < expiration_date AND recall_mail_sent = 0 AND published = 1");
Last edit: 11 years 6 months ago by Max1985.
More
11 years 6 months ago #11328 by loic
Replied by loic on topic archive
Hello,

For the images, the code that delete the image is in the file 'administrator/components/com_adsmanager/tables/contents.php' from line 638 to 656.

For the email, if you force the data recall_mail_sent to 1 then the recall email will not be sent.

Best regards.
More
11 years 6 months ago - 11 years 6 months ago #11345 by Max1985
Replied by Max1985 on topic archive
So?
In the file: /administrator/components/com_adsmanager/models/content.php
case "archive":
 
$current_images = json_decode($ad->images);
		if ($current_images == null)
			$current_images = array();
 
		foreach($current_images as $img)
		{	
			$pict = JPATH_ROOT."/images/com_adsmanager/ads/".$img->image;
			if ( is_file( $pict)) {
				JFile::delete($pict);
			}
			$pic = JPATH_ROOT."/images/com_adsmanager/ads/".$img->thumbnail;
			if ( is_file( $pic)) {
				JFile::delete($pic);
			}
			$pic = JPATH_ROOT."/images/com_adsmanager/ads/".$img->medium;
			if ( is_file( $pic)) {
				JFile::delete($pic);
			}
		}

Or so?
In the file: /components/com_adsmanager/lib/cron.php
$contentmodel->manage_expiration($fieldmodel->getPlugins(),$conf);
 
$current_images = json_decode($ad->images);
		if ($current_images == null)
			$current_images = array();
 
		foreach($current_images as $img)
		{	
			$pict = JPATH_ROOT."/images/com_adsmanager/ads/".$img->image;
			if ( is_file( $pict)) {
				JFile::delete($pict);
			}
			$pic = JPATH_ROOT."/images/com_adsmanager/ads/".$img->thumbnail;
			if ( is_file( $pic)) {
				JFile::delete($pic);
			}
			$pic = JPATH_ROOT."/images/com_adsmanager/ads/".$img->medium;
			if ( is_file( $pic)) {
				JFile::delete($pic);
			}
		}
Last edit: 11 years 6 months ago by Max1985.
More
11 years 6 months ago #11366 by loic
Replied by loic on topic archive
Hello,

Those two codes are usable, you just need to load the ad before. Otherwise, this variable '$ad->images' will not return anything.

Best regards.
More
11 years 6 months ago - 11 years 6 months ago #11416 by Max1985
Replied by Max1985 on topic archive
Thank you! I will try!
Last edit: 11 years 6 months ago by Max1985.
Moderators: perry
Time to create page: 0.080 seconds
Powered by Kunena Forum