2012-01-27, 04:35 PM
set_error() should be $this->set_error()
Adding dropdown to newthread
|
2012-01-27, 04:35 PM
set_error() should be $this->set_error()
It was that before, and that didn't fix it
2012-01-27, 04:49 PM
Try to use: newthread_do_newthread_end hook. I used this before to collect data and insert into the db.
something like this?
(2012-01-27, 04:49 PM)Yaldaram Wrote: Try to use: newthread_do_newthread_end hook. I used this before to collect data and insert into the db. that is too late, by then the new content is already in the DB
Lost interest, sold my sites, will browse here once in a while. It's been fun.
2012-01-27, 04:55 PM
Aha, that did it pavemen Thanks, can I ask, how did you know it was $handler?
2012-01-27, 05:00 PM
2012-01-27, 05:01 PM
because the hook passes $this from insider the Parser class (extended by the Post handler) and thus all the contents of the handler are in the "$this" variable. So then its just understanding the $this object.
You could have left it using "$post" as it's just a variable name, but to get the post content you would need to then test $post->data['fid'] instead of $post['fid'] for example.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
2012-01-27, 05:15 PM
(2012-01-27, 05:01 PM)pavemen Wrote: because the hook passes $this from insider the Parser class (extended by the Post handler) and thus all the contents of the handler are in the "$this" variable. So then its just understanding the $this object. Actually, one thing. This doesnt work at all Because "forumsubject" isn't passed If I print_r($handler) it doesnt contain forumsubject. It only deisplays the error because I tested if it was set to 0 (which also holds true for null) So. Back to the drawing board.
2012-01-27, 05:20 PM
do you want this to run on any post, or only on new threads? what about on edited posts?
Lost interest, sold my sites, will browse here once in a while. It's been fun.
|
« Next Oldest | Next Newest »
|