• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Mass Import and Overwrite Pages?

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Results 1 to 7 of 7

    Thread: Mass Import and Overwrite Pages?

    • Thread Tools
      • Show Printable Version
    1. March 24, 2016 #1
      SurferJon
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      SurferJon is offline
      Junior Member
      Join Date
      November 7, 2015
      Posts
      21
      Rep Power
      129

      Mass Import and Overwrite Pages?

      Is there a way to make text files of pages/templates, then mass import them to create those pages/templates? Furthermore, would there be a way to completely overwrite said pages/templates if they already exist? This wouldn't be a one-time operation, I would be doing it all the time.

      I know there's an import/export option, so I was thinking I could trick it to do what I'm describing? Is there some kind of format I could use to create my pages/templates locally, then use the import tool to put my locally created pages/templates in the wiki?

      It wouldn't matter if it wipes out the edit history for the pages/templates it's overwriting.

      I'm using the XF VW.

      Thank you!
      Reply With Quote Reply With Quote

    2. March 25, 2016 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      You would have to write a custom import tool to do this. I'm not sure why you would do the work to create those text files rather than just create the pages directly, though?

      Perhaps you might explain a little more what your idea is and how the workflow would work.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. March 25, 2016 #3
      SurferJon
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      SurferJon is offline
      Junior Member
      Join Date
      November 7, 2015
      Posts
      21
      Rep Power
      129
      Quote Originally Posted by pegasus View Post
      You would have to write a custom import tool to do this. I'm not sure why you would do the work to create those text files rather than just create the pages directly, though?

      Perhaps you might explain a little more what your idea is and how the workflow would work.
      So basically my wiki deals with a lot of video game and trading card data. My wiki is half database, half user-written material. Each time a new game or set comes out, hundreds of character data templates need to be updated simultaneously and within minutes so that all pages are updated. I basically extract the data on my computer, and then I would put it into the format I need for VW and upload it so everything gets updated simultaneously.
      Reply With Quote Reply With Quote

    4. March 30, 2016 #4
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      If you are good with PHP, basically you want to create:
      - vault/core/controller/import/steps/customtextfile/vw.php
      - vault/core/controller/import/handle/customtextfile/vw.php

      Your steps file would probably only define one step, which runs a method in the handle file.

      Your handle file would parse the text file you uploaded and pass the data to the wiki Page DM.

      Right now there is not a standardized VaultWiki XML format or something like that, although that has been one of the ideas thrown around to add to the importer with a corresponding export function.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    5. January 22, 2017 #5
      SurferJon
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      SurferJon is offline
      Junior Member
      Join Date
      November 7, 2015
      Posts
      21
      Rep Power
      129
      How difficult/time consuming do you think this would be for a programmer to do? Is most of the programming already in there, they just need to customize it to accept some kind of external file with the pages I want to add? Or would we not be able to use the existing functions since they are only for new wiki imports and overwrite the whole wiki? Thank you!
      Reply With Quote Reply With Quote

    6. January 22, 2017 #6
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      Imports are not designed to overwrite the whole wiki.

      A programmer would need to:
      - Write a steps file that breaks down your import into steps, such as import pages, import comments, etc. There is already support to do each step in batches (like if step 1 would add 1,000,000 pages, best to do this in batches) if the developer wants to implement that. If you only need one step, then the steps file only needs one step in it.
      - Write handlers for your steps that parse your text file and walk through the data. The handler should pass the data to the appropriate DM in order to create the wiki content.
      - There is a built-in mapping system for quickly looking up the IDs of imported data based on the source ID. This is useful when you want to make sure an imported comment is connected to the correct imported page, since the IDs in your wiki won't match the IDs of the source data. The developer just needs to implement the writes/reads for the mapper. For a text-file-based import, the developer will probably want to override the hashing function that creates a unique ID for each import; it should probably use a hash of the external file instead of source database credentials.

      A good developer should be able to get a sense of how to put an importer together by looking at the /vault/core/controller/import/steps and /vault/core/controller/import/handle folders for some examples. It only gets confusing if you try to figure out how the progress tracker works, which no one should have to do. VaultWiki does this for you if your step file is written well.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    7. January 22, 2017 #7
      mon169693
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      mon169693 is offline
      New Member
      Join Date
      January 22, 2017
      Location
      ho chi minh
      Posts
      1
      Rep Power
      0
      Thank pegasus, Your post very good.
      Reply With Quote Reply With Quote

    Similar Threads

    1. Is there a way to add a mass of area's ?
      By Alfa1 in forum VaultWiki Questions
      Replies: 3
      Last Post: February 15, 2016, 3:14 PM
    2. Mass upload
      By hollosch in forum VaultWiki Questions
      Replies: 2
      Last Post: February 20, 2015, 10:15 AM
    3. Upgrade 3.0.14 build 2 > build 4. Just overwrite or also run upgrade script?
      By Alfa1 in forum VaultWiki Questions
      Replies: 2
      Last Post: October 28, 2011, 10:15 PM
    4. Add 'New pages' and 'New pages' content to wiki front page
      By basketmen in forum VaultWiki Questions
      Replies: 6
      Last Post: July 20, 2011, 10:55 PM
    5. Import Pages from a Mediawiki site that Have Been Exported in XML format?
      By Rik Brown in forum Pre-Sales Questions
      Replies: 4
      Last Post: July 27, 2010, 6:05 PM

    Tags for this Thread

    overwrite

    View Tag Cloud

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 7:51 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.