View Full Version : Create new threads from an XML
akvaryumforum
09-10-2009, 02:07 PM
I have an XML file like this.
<cat>12</cat>
<ttitle>thread title</ttitle>
<message>Thread message</message>
<cat>13</cat>
<ttitle>thread title</ttitle>
<message>Thread message</message>
<ttitle>thread title</ttitle>
<message>Thread message</message>
I need to create new threads from this xml. Is there a way to do this?
Lynne
09-10-2009, 02:16 PM
Create new threads in an xml file? You don't create new threads in an xml page, you do so with a php page.
What are you trying to do here?
akvaryumforum
09-10-2009, 02:33 PM
I try to import this xml like shop scripts. XML is used like database which thread information stored. So ı tried to import this xml to the database.
Note: Sorry for the bad English.
Lynne
09-10-2009, 03:40 PM
I'm not sure what you are doing or how to do it, sorry.
James Birkett
09-10-2009, 04:58 PM
Creating threads uses the datamanager I believe, using XML won't accomplish this.
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_SILENT, 'threadpost');
$threaddm->do_set('forumid', (forumid));
$threaddm->do_set('userid', (userid));
$threaddm->do_set('username', (username));
$threaddm->do_set('title', (title));
$threaddm->do_set('pagetext', (message));
$threaddm->do_set('allowsmilie', (y/n));
$threaddm->do_set('visible', (y/n));
$threaddm->do_set('ipaddress', (IP));
$threaddm->save();
unset($threaddm);
Example of using datamanager.
Brandon Sheley
09-10-2009, 05:12 PM
you can try with impex, I know it has a ton of importing options
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.