PDA

View Full Version : Insert a post from Wordpress to Vbulletin


danchipo
07-04-2017, 04:12 PM
Hello Everybody, I have a question here

I have several wordpress sites, when I publish the article in the wordpress backend I want it to be automatically published in my vbulletin 5.1, I have created a code where the steps are as follows:
1. At the time of publishing in wordpress automatically goes to a function in the file functions.php, I created several functions to change the format to the article and to be able to insert it in the respective tables of vbulletin correctly and same to how they are saved Articles published since the same vbulletin.
2.In the format of the appropriate text for vbulletin we insert in the table "Node" the respective data with the table.
3. Once the new nodeid is created in step 2, insert in the table noderead the new id along with the other respective fields.
4. In the text table insert the content of the article together with the nodeid created in point 2.

It is inserted correctly in all tables of vbulletin together with their respective data, almost everything is displayed correctly, lists of articles appears but when entering an article the content does not appear, also can not delete these Articles from the front, content if it is being saved in the text table correctly along with its respective id relation.

I do not know that I can be missing so that the content of the article is shown and to be managed to eliminate, maybe I'm missing some more insert in some table that I have not been able to see.

I would appreciate any help or information not taken into account for this code, thank you very much for your time.

danchipo
07-06-2017, 08:37 PM
Nobody can help me with this?

noypiscripter
07-06-2017, 10:32 PM
You should use the vB5 API to create nodes instead of directly inserting records in the database.

http://vb5support.com/resources/api/

There's a blog on how to login to vB5 using the API. This is not exactly what you need but it will show you how to use the API.

https://www.vbulletin.com/forum/blogs/david-grove/4327147-how-to-log-into-vbulletin-from-an-external-script-on-your-website

Hope this helps you get started.