PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds How do I...? (http://www.photopost.com/forum/classifieds-how-do-i/)
-   -   Ad approaching expiry (http://www.photopost.com/forum/classifieds-how-do-i/144806-ad-approaching-expiry.html)

mike_bbf December 22nd, 2010 01:43 PM

Ad approaching expiry
 
Hi All,
how do I permanently turn off all users' reminder emails for adverts about to expire?

Chuck S December 22nd, 2010 01:59 PM

You would have to alter the expire scripts and remove the mail() line as that is part of the way it is suppose to work meaning users are notified about there ad status for expiration.

The expire scripts are sendnotice.php or cron.php depending on how your doing the cron task server side or script side.

mike_bbf December 22nd, 2010 02:36 PM

Hi Chuck,

I have a cron job set on the server to run sendnotice.php (once a day)

would you be able to post or send me the lump of text to chop out of the script?


(I'm on the latest version of classifieds)

Chuck S December 22nd, 2010 03:03 PM

Line 148 towards the bottom of the file

Code:

Content visible to verified customers only.

mike_bbf December 22nd, 2010 03:23 PM

Hi Chuck, great stuff, many thanks.

Chuck S December 22nd, 2010 04:40 PM

Enjoy the holidays.

WarDog January 13th, 2011 08:45 AM

Chuck

What is the default minutes for the cron to run when you have it set in the admin options? I had changed it to 15 and now one of my members got like 6-8 emails at onetime telling him ad was about to expire in 2 days. Is that normal for lowering cron time or should I be looking else where?

WD

Chuck S January 13th, 2011 09:41 AM

I set mine to about 30.

The way I look at this is your only going to send an email if the following is met which always has been the case.

It will send an email for any ad that is going to expire within 3 days and of course there is always checking to make sure we are only going to run cron based on the time you set and also it will only send one email per day.

Thats what I see when looking at the code.

Basically the time is $today. We grab the lastupdate time from the stats table and take the time right now and subtract the lastupdate time and the resulting number is timediff. If that number is 86400 which is one day then the if clause clause runs which grabs any ads expiring within 3 days and send an email.

Code:

Content visible to verified customers only.
Therefore looking at the code only one email can be send in any given day to a user.


All times are GMT -5. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97