![]() |
How to create a article via API / auto-create of articles
Hey there,
is there any reference or tutorial on how to create articles with the API? Or even better, is there something like a mod or a function to automatically create articles out of threads which are posted in a specific forum? greeting |
hi, i would also like to know if there is anyway this can be done,
I want to have an rss feed post straight to an article (primary content) I would really appreciate it if someone could help! |
*bump* any news on this? do you think the vb-team will reply with a solution if I ask them via a support ticket?
|
I contacted the official support and got this answer, in case someone also wants to know how to do it:
Quote:
|
Has anyone come up with an interim hack/mod/solution? Although the API will be very useful, I need something to import a batch of articles NOW. I'll accept any scraps / code snippets. Thank you :)
|
Well I got a direct response from a vB developer with some information for creating articles via own code. Also i got a code example by an user of vbulletin-germany.org.
Code Example (provided by Andreas http://www.vbulletin-germany.org/sho...96&postcount=4, modified by me): Code:
<?php Quote:
|
Thank you. It works!!
I noticed however that the new node/article is not found when searching content contained in a newly added article. Is there a method for forcing an update of the index? Your post made my day!!!! --------------- Added [DATE]1289599712[/DATE] at [TIME]1289599712[/TIME] --------------- I tried this to index the new article: PHP Code:
The last parameter is looking for an Associative Array of values. I suppose I can manually populate an array. --------------- Added [DATE]1289600978[/DATE] at [TIME]1289600978[/TIME] --------------- Here is the revised code to set publish ON and to index the article immediately. If you adding a batch, it would be better to find the way to index them as a batch. PHP Code:
Please feel free to share any other code snippets such as adding tags, etc. to an article. Thanks again for the useful suggestions. |
Quote:
to add tags, just add the following line into the method: Code:
$nodedm->set('keywords', $keywords); Code:
function create_article($sectionid, $title, $pagetext, $userid, $description = '', $htmltitle = '', $keywords = '') |
I did a test to see if item is added to the index after it is added. I removed my code:
PHP Code:
I added the param for keywords and that works great. However, I don't see a method for associating tags vs keywords. I am referring to the tags that form the basis for tag cloud. --------------- Added [DATE]1289654370[/DATE] at [TIME]1289654370[/TIME] --------------- I was mistaken. My code to immediately update index with new article is wrong. It isn't working. I also tried Verify and Repair Node Table. |
Sorry, thought the keywords were interpreted as tags.
To add tags to the article look in the following class: Quote:
Quote:
|
All times are GMT. The time now is 06:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|