Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
Mod Name / Version - Subscriptions without a Cron Task 0.9 beta release
Description - Ever wanted to run subscriptions, but could never figure out how to run a cron task? Or does your server not allow them? This script will run the ubbt subscriptions.php file in the /cron/php directory of your ubbt install once per day (as long as you have at least one visitor per day) so that subscribers can receive emails.
Working Under - UBB.Threads 6.2, but will work with any version to my knowledge.
Pre-requisites - Make sure you have your cron/php/ directory still!
Files Altered - ubbt.inc.php
New File - sub.inc.php
Author - Dalar (Rob Porter)

Enjoy!
Attachments

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
- thanks Dalar


- Allen wavey
- What Drives You?
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
I am having a weird bug occur in this, and had a question for anyone in the know about the date() function.

Does it record the server time or the user's system's time or the adjusted server time? It seems to be sending at strange hours, multiple times in a day, and I've tracked it down to occuring when users from very distant timezones visit the site.

Would there be any ideas about a workaround to this?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
#######################################################################
// get_date
// #######################################################################
function get_date() {

global $config;
$currtime = time();
$currtime = $currtime+($config['adjusttime']*3600);
return $currtime;
}


It is converted from the server time. Threads grabs the server time called time() then it adds the adjust time in the config file shown for your time zone. If your time zone is one hour away from the server your config file has a 1 which in this case if 1 x 3600 seconds or ONE HOUR. The date is stored as a UNIX TIMESTAMP. Thus the need for all seconds.

Have you tried?

$now = $this -> get_date();


Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Neat idea Thanks.


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
Cool, thanks.

Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
Wait.. if threads is calling the server time, this problem wouldn't be happening (as is diagnosed). Making the change as proposed would only work for those that have changed their profiles(or even have profiles, as guests wouldn't).

So, could there be a different problem with this script that I'm not seeing?

Joined: Aug 2003
Posts: 24
Newbie
Newbie
Offline
Joined: Aug 2003
Posts: 24
Installed this hack. How do I know it is working? Sorry not too keen on cron task...


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)