Hi,
I am trying to insert a post into my forum via code from Joomla. Basically a mini discuss bot.
It posts the introtext of a content item and and a read more link.
I have managed to insert this but end up with the following problems
1 - It always shows at the end of the forum
2 - It ends up in the moderation queue.
A little of the process I use
- I insert the thread and record the thread id
- I insert the post with the thread id recorded against it
- I then update the thread with the last post ID
- I then update the forum table with the last post and thread details
I am sure there is a stat or counter I need to update but I am having trouble finding it.
Can anyone tell me what other table I need to update?
Cheers
Dan
I also read through this thread
http://community.mybb.com/thread-90909.html
Whilst it sounds close to what I am doing. Including global.php will throw off Joomla.
I also need Joomla to trigger the even with its plugin framework onEvents
I guess alternately I could have Joomla call an external page but again, this may also cause issues unless I essentially use a scraper style call so the page itself is not included, however that seems heavy handed and a little resource intense for my needs
I feel sooooo stupid. I was putting mybb_threads.lastpost as the pid and not the time. Hence it going to 1970 and ending up at the bottom of the forums.
All fixed now and in the process updated all the stats i probably should have done anyway
I am trying to insert a post into my forum via code from Joomla. Basically a mini discuss bot.
It posts the introtext of a content item and and a read more link.
I have managed to insert this but end up with the following problems
1 - It always shows at the end of the forum
2 - It ends up in the moderation queue.
A little of the process I use
- I insert the thread and record the thread id
- I insert the post with the thread id recorded against it
- I then update the thread with the last post ID
- I then update the forum table with the last post and thread details
I am sure there is a stat or counter I need to update but I am having trouble finding it.
Can anyone tell me what other table I need to update?
Cheers
Dan
I also read through this thread
http://community.mybb.com/thread-90909.html
Whilst it sounds close to what I am doing. Including global.php will throw off Joomla.
I also need Joomla to trigger the even with its plugin framework onEvents
I guess alternately I could have Joomla call an external page but again, this may also cause issues unless I essentially use a scraper style call so the page itself is not included, however that seems heavy handed and a little resource intense for my needs
I feel sooooo stupid. I was putting mybb_threads.lastpost as the pid and not the time. Hence it going to 1970 and ending up at the bottom of the forums.
All fixed now and in the process updated all the stats i probably should have done anyway