I'm trying to do what the below link is doing, where it autopost's to twitter and facebook.
http://community.mybb.com/thread-119874.html
My question is, Can i make it so it only posts threads that get stickied are posted to twitter, instead of all.
Anyone?
It is a little complicated, if you only care about new threads edit the _mybbpublisher_do_newthread_ function.
But probably you also need it for edits, on which case you need to edit _mybbpublisher_editthread_. There it gets a little tricky.
(2014-09-21, 10:11 PM)Omar G. Wrote: [ -> ]It is a little complicated, if you only care about new threads edit the _mybbpublisher_do_newthread_ function.
But probably you also need it for edits, on which case you need to edit _mybbpublisher_editthread_. There it gets a little tricky.
Thanks hopefully i can figure something out.
Each thread in the table mybb_threads has a value for the field sticky. You'd want to do something like
$query = $db->simple_select("threads", "tid, sticky, subject", "tid=$tid");
$thread = $db->fetch_array($query);
if($thread['sticky']==1)
{
// Put the code to publish to Twitter here
}
Replace $tid with the appropriate variable that has the thread's tid.