Forum Duplication Tool – vBulletin.org Forum
download this if you dare… rofl
i want to reuse this code for something new… ok, the engine is not workingfor 3.8, we just need to rehearse it with a OOP view, if you want, it’s not complicated, a simple class would do. but my goal right now is different.
- this tool to be reworked for 3.8
- this tool to export forum structure in a .xml file … exact same structure, but only the structure, what we see in the forum table, starting the hierarchy with the forum we choose… but instead of duplicating, we choose the button « export »
- this tool to re-import the forum structure, where we can choose a parent forum or no parent, like in forum creation.
why?
- for site admins with multiple forums who want to replicate a forum or two.
- for site admins who want the structure of a friends forum, so people can share their structures.
- for site admins who want to start a new forum with the same structure as the other one, without its content.
😉
the only thing i can not do is the import/export process, as the xml side is bugged on my side. i played with it a lot with this tool: https://unpapapro.com/vbe-complimentaries/backup-style/4901/ but that’s all… rofl
what is needed is to make it universal to any forum site… when exporting a forum tree, the parent have to be forumid #1 … on import, the forumid have to be transformed exactly like we see in KirbyDE/Andreas duplicator tool… that’s why i want to show you… 😉
it’s a summer job, if i may say… these complicated gadgets are not really for release, i want IB to see the possibilities we can offer, so i try to expose all our possible ideas in the near future. if IB is not interested, we still have the tools and we will make a lot of advertising with it…
just this duplicator, we can easily have a club where people share their forum structure.. rofl
Views: 17
Ok i have a few questions:
1. Would this take the threads in the forums too?
2. If a forum with child and parent forums on the export would it take them too?
Also the exporting would be pretty easy as all it would need to be is something like:
[PHP]
$forums = $db->query_read(« SELECT * FROM forum WHERE (where here) »);
$xml = »;
while ($forum =$db->fetch_array($forums))
{
foreach ($forum as $field => $value)
{
$xml .= ‘< ' . $field . '>‘ . some_escape_function($value) . »;
}
}
[/PHP]
And i am pretty sure vb has a built in XML Class that could be used here to make it even simpler.
1- only the skeleton, no content… people can backup their forum or use ImpEx if they want more… 🙂
2- the tree start where you choose the forum in the forum selector…
sure vB have all the needed classes, i just need a logic for the import/export… this part is not complicated… anyway, the whole thing can be coded in the day, it’s not complicated, i already have most of the work done in the duplicator … just need to put the tree in a xml instead of generating a query to replicate the result… and recode the tool so Andreas can not act on me.. rofl
Ok, for the XML file a structure like:
….
[/CODE]
Just have it so when you export each forum receives a tempid and then when importing each forum is added just with the data not yet as parent/child then match each tempid to a forumid so you can have another query go through and change them[CODE]
….
[/CODE]
Just have it so when you export each forum receives a tempid and then when importing each forum is added just with the data not yet as parent/child then match each tempid to a forumid so you can have another query go through and change them
in the import we use the same system as in the actual duplicator… the system is mostly complete…