vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Insert a post from Wordpress to Vbulletin (https://vborg.vbsupport.ru/showthread.php?t=325325)

danchipo 07-04-2017 04:12 PM

Insert a post from Wordpress to Vbulletin
 
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/blog...n-your-website

Hope this helps you get started.


All times are GMT. The time now is 04:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01241 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete