The script works nicely, and is working accurately.
I want the script to run once every 30 minutes, so I added it to the task manager, but when I ran it it gave this error:
CODE
Fatal error: Cannot instantiate non-existent class: task_item in /homepages/14/d87274267/htdocs/techforum/sources/admin/ad_task_manager.php on line 357
My board:
PHP VERSION: 4.3.10 (cgi),
SQL: (MYSQL) 4.0.23-standard-log
IPB Version v2.0.3
The script is stand alone, and doesn't require user input or anything.
It works when I open the url myself: /techforums/dailynews.php
But when opened through the taskmanager (I want it run about every half hour) It gives that error.
Is there a certain template the task files have to use? or some kind of data they have to reply to the task manager on completion?
--------------------------------------
I also have a different question, Is there a way to get the board to do the:
QUOTE
Resynchronize Forums
Resynchronize Forums
This will recount topics, posts and the forum last poster for all your forums
AND
Resynchronize Topics
Resynchronize Topics
This will recount replies, attachment count and the topic starter and last poster for all your topics.
script?Resynchronize Forums
This will recount topics, posts and the forum last poster for all your forums
AND
Resynchronize Topics
Resynchronize Topics
This will recount replies, attachment count and the topic starter and last poster for all your topics.
somehow call that from one of my other php scripts?
My newsscript updates perfectly, only it doesn't update the most recent topic on the homepage, I have to wait until those processes have been run.
Currently my script edits the _topics, _posts, _members, and _forum tables, but for some reason the most recent post isn't being updated immediatly. (Doesn't really matter, but I was wondering what I was forgetting).
The _newsbot table is a table which 'remembers' which news the script has already posted and which it hasn't.
Some of the strings are in Dutch, but should still be pretty explanatory.
My querys:
CODE
$user = mysql_query("UPDATE `TF_members` SET `ip_address` = '".$botIP."' , `posts` = `posts` +1 , `last_post` = '".$timestamp."' , `last_visit` = '".$timestamp."' , `last_activity` = '".$timestamp."' WHERE `id` = '".$newsbotnr."' LIMIT 1;") or die(mysql_error());
$posts = mysql_query("INSERT INTO `TF_posts` ( `pid` , `append_edit` , `edit_time` , `author_id` , `author_name` , `use_sig` , `use_emo` , `ip_address` , `post_date` , `icon_id` , `post` , `queued` , `topic_id` , `post_title` , `new_topic` , `edit_name` , `post_key` , `post_parent` , `post_htmlstate` ) VALUES ( '".$postid."', '0', '".$timestamp."' , '".$newsbotnr."', '".$newsbotname."', '1', '1', '".$botIP."', '".$timestamp."' , '".$topiciconid."', '".$postdata."', '0', '".$topicid."', NULL , '1', NULL , '0', '0', '1');") or die(mysql_error());
$topics = mysql_query("INSERT INTO `TF_topics` ( `tid` , `title` , `description` , `state` , `posts` , `starter_id` , `start_date` , `last_poster_id` , `last_post` , `icon_id` , `starter_name` , `last_poster_name` , `poll_state` , `last_vote` , `views` , `forum_id` , `approved` , `author_mode` , `pinned` , `moved_to` , `rating` , `total_votes` , `topic_hasattach` , `topic_firstpost` , `topic_queuedposts` ) VALUES ( '".$topicid."', '".$title."', NULL , 'open', '0', '".$newsbotnr."', '".$timestamp."' , '".$newsbotnr."', '".$timestamp."' , '13', '".$newsbotname."', '".$newsbotname."', '0', '0', '0', '".$newsforumnr."', '1', '1', '0', NULL , NULL , '0', '0', '".$postid."', '0');") or die(mysql_error());
$forum = mysql_query("UPDATE `TF_forums` SET `topics` = `topics` + 1, `last_post` = '".$timestamp."' , `last_poster_id` = '".$newsbotnr."', `last_poster_name` = '".$newsbotname."', `last_title` = '".$title."', `last_id` = '".$topicid."' WHERE `id` = '".$newsforumnr."' LIMIT 1;") or die(mysql_error());
$list = mysql_query("INSERT INTO `TF_newsbot` ( `id` , `artikel_nr` , `unixdate` , `bron` ) VALUES ('','".$artikelnummer."' , '".$timestamp."' , '".$sitebron."' );") or die(mysql_error());
$posts = mysql_query("INSERT INTO `TF_posts` ( `pid` , `append_edit` , `edit_time` , `author_id` , `author_name` , `use_sig` , `use_emo` , `ip_address` , `post_date` , `icon_id` , `post` , `queued` , `topic_id` , `post_title` , `new_topic` , `edit_name` , `post_key` , `post_parent` , `post_htmlstate` ) VALUES ( '".$postid."', '0', '".$timestamp."' , '".$newsbotnr."', '".$newsbotname."', '1', '1', '".$botIP."', '".$timestamp."' , '".$topiciconid."', '".$postdata."', '0', '".$topicid."', NULL , '1', NULL , '0', '0', '1');") or die(mysql_error());
$topics = mysql_query("INSERT INTO `TF_topics` ( `tid` , `title` , `description` , `state` , `posts` , `starter_id` , `start_date` , `last_poster_id` , `last_post` , `icon_id` , `starter_name` , `last_poster_name` , `poll_state` , `last_vote` , `views` , `forum_id` , `approved` , `author_mode` , `pinned` , `moved_to` , `rating` , `total_votes` , `topic_hasattach` , `topic_firstpost` , `topic_queuedposts` ) VALUES ( '".$topicid."', '".$title."', NULL , 'open', '0', '".$newsbotnr."', '".$timestamp."' , '".$newsbotnr."', '".$timestamp."' , '13', '".$newsbotname."', '".$newsbotname."', '0', '0', '0', '".$newsforumnr."', '1', '1', '0', NULL , NULL , '0', '0', '".$postid."', '0');") or die(mysql_error());
$forum = mysql_query("UPDATE `TF_forums` SET `topics` = `topics` + 1, `last_post` = '".$timestamp."' , `last_poster_id` = '".$newsbotnr."', `last_poster_name` = '".$newsbotname."', `last_title` = '".$title."', `last_id` = '".$topicid."' WHERE `id` = '".$newsforumnr."' LIMIT 1;") or die(mysql_error());
$list = mysql_query("INSERT INTO `TF_newsbot` ( `id` , `artikel_nr` , `unixdate` , `bron` ) VALUES ('','".$artikelnummer."' , '".$timestamp."' , '".$sitebron."' );") or die(mysql_error());
I was considering using crontab, but my server doesn't support it
Could anyone please help?
Thanks!!!