WordPress Thread Creation Bot

Steqheu

Member
I want a xenForo user that will create a discussion thread each time a new item appears in my WordPress RSS feed. Its thread_id would then be added as one of the post's custom fields and whichever thread_id is in that custom field would be the xenForo thread linked back to in WordPress.

No, I can't use either of the xenForo-WordPress bridges. One of them doesn't offer this functionality at all, and the other is far too convoluted to be practical. In the latter plugin, WordPress logins are managed by xenForo and threads are automatically created in whichever forum section by the user you're logged in as. It requires you to post to the WordPress side using your xenForo login. I want WordPress to remain functionally independent.

I just want a bot that creates threads and throws their forum IDs at WordPress so that I can change my little comment bubbles to a link back to the respective xenForo thread. That's it.

And as far as I've seen, there are dozens of us looking for the same thing. Make this, and you could probably charge $30-40.
 
Last edited:
@Steqheu
Do you your own server? A VPS?
Or do you at least have full permissions on your MySQL database?

If so I can give you an sql trigger that runs every time anyone or specific users update the articles table in WP. It would then post the info into the XF table.
You would have the option of using a default user in XF or create a new user in XF that matches the username in WP.
 
@Steqheu
Do you your own server? A VPS?
Or do you at least have full permissions on your MySQL database?

If so I can give you an sql trigger that runs every time anyone or specific users update the articles table in WP. It would then post the info into the XF table.
You would have the option of using a default user in XF or create a new user in XF that matches the username in WP.
Well I don't want the WordPress posts themselves to be posted to xenForo. I want it to notice when any post is made and have a "News Bot" account post tsomething along the lines of "This Is a Discussion Thread for the Story XXXXX Posted on the Front Page."

I'm on a mid-range Host Gator shared hosting, but seeing how quickly my site is growing I may move to a VPS soon. I don't know if I have full permissions - how could I check that?
 
Well I don't want the WordPress posts themselves to be posted to xenForo. I want it to notice when any post is made and have a "News Bot" account post tsomething along the lines of "This Is a Discussion Thread for the Story XXXXX Posted on the Front Page."

I'm on a mid-range Host Gator shared hosting, but seeing how quickly my site is growing I may move to a VPS soon. I don't know if I have full permissions - how could I check that?
Check your permissions by using phpmyadmin and run the statement
Show grants for 'your username'@'localhost'

So I'm guessing if you are posting with a news bot, that you want everything announce in the same forum?

If so you can set up an RSS feed on your Wordpress site then in xenforo set up the RSS feed gather option and have it point at your Wordpress site.

Problem solved.
 
FWIW, if XenScripts is enabled:

PHP:
echo $post->thread_id;

This avoids the loop issue discussed the other day in using xenforo_thread_id. I just added the code on my site to test it and it works well if a thread_id exists. Wrap it in a if exists statement .. otherwise the code returns 0.

Screen Shot 2013-07-23 at 8.04.47 AM.webp

Not to be argumentative, but your setup was almost done the other day but you kept changing things. Also, the work was mainly about your chosen WP theme and not the bridge.
 
Check your permissions by using phpmyadmin and run the statement
Show grants for 'your username'@'localhost'

So I'm guessing if you are posting with a news bot, that you want everything announce in the same forum?

If so you can set up an RSS feed on your Wordpress site then in xenforo set up the RSS feed gather option and have it point at your Wordpress site.

Problem solved.
Alright, I tried setting up the RSS feeder in xenForo. I think something along these lines will work perfectly. How did I not know about this? However, is there any way I can set up the feeder to fetch upon a WordPress author posting an article? It's currently set to the lowest time, 10 minutes, but I would like it to fetch on demand (when an author posts). How can I do this?

http://selfscreens.com/forums/forums/front-page-news.28/

Also, is there any way I can make the WordPress comments_url(); link straight to the newly-created xenForo thread automatically? I could probably just have a custom "threadid" field that fetches the ID of the most recent thread created in xenForo forum ID 28 for example?

PHPMyAdmin is showing "GRANT ALL PRIVILEGES ON" for everything.

Thanks
 
Last edited:
You can't fetch on demand. Fetching every 30 minutes is enough most likely. Is your site super busy?
Well it's busy enough that I want people to be able to comment on my stories as soon as I publish them (when they get pushed to social media, etc).
 
I guess the easiest way would just be to extend the built-in 'Registered Feeds' functionality to add an option to allow additional tags in the feed to be added as custom field entries with the Custom Fields by Waindigo add-on. I would definitely be interested in helping with this. Please drop me a PM to discuss cost.
 
Oh, oops... completely read this the wrong way round. This sounds like you need a Wordpress add-on. Probably best to ask a Wordpress developer to build the opposite to what I just described above.
 
Yeah, I completely agree with @Waindigo. You will need to have a plugin developed for WordPress to have the post published to XenForo immediately. That should be easy if you use those bridges because it make it possible to call XenForo methods to create the threads within WordPress. However, if you do not want to use the bridge, you will need to use something like [bd] API to allow posting from an external system.
 
Just weighing in... I did set up something like this for IPB and am now looking for something that will work with Xenforo, if anyone's made it...
 
I like this idea, as I would prefer to use Xenforo as the discussion engine. It would also alert my forum users to the creation of a new feature on the front page, which is WordPress-driven.
 
Top Bottom