Skip to content

ConvertingFromKusaba

tslocum edited this page Nov 26, 2010 · 4 revisions

Converting From Your Kusaba Installation

We will be copying all threads and replies from a kusaba database over to a PyIB post table. You will also need to remove the .htaccess found in the board directories, as PyIB's index files are named index.html rather than board.html

This will only work on boards set as normal imageboards (not oekaki or upload) which do not have any special files uploaded to them (no SWF, PDF, etc; just JPG, PNG, and GIF)

It is highly recommended that you also remove all files in the res/ directory when converting a board.

Converting a board from kusaba to PyIB

This step-by-step list assumes you have PyIB installed on the server already, and is properly configured. You can test this by adding a new board in PyIB and adding a few posts.

  1. Open phpMyAdmin or other software equivalent
  2. View the boards table, and click Insert
  3. For the dir value, place the directory of the board, such as b for /b/
  4. For the name value, place the name of the board, such as Random
  5. Press Save and note the ID given to the new row
  6. Edit the convert.php file with your preferred text editor
  7. Change the two variables $posts_table and $boardid as follows:
    • $posts_table should be set to the table holding the posts for the board you want to convert. For instance, if the board's directory is /b/, it is probably called posts_b. However, if your kusaba installation uses prefixes for the tables, you will need to add the prefix as well
    • $boardid should be set to the ID given to the board in PyIB's boards table
  8. Upload convert.php to the same directory as kusaba (containing config.php)
  9. Run convert.php in your browser (this may take some time)
  10. View the source of the page, and copy all of the output to your clipboard, or save it to a file by other means
  11. Place the contents in a text file, such as posts.sql
  12. Remove convert.php from the server or move it to a secure location
  13. Either import the saved SQL file through phpMyAdmin (not recommended, can be slow and may not work for large boards), or import it by uploading it to your server and using MySQL's command line program (highly recommended, can be very fast)
  14. Run the following commands through your browser:
  15. Open your board and check to see if the HTML files have been created properly (if you still see kusaba, or get a directory index, be sure you removed the old HTML files from kusaba along with the .htaccess file)
  16. Make a few posts to ensure it is working properly, then remove the posts_boarddirhere table from kusaba's database, along with its entry in kusaba's boards table (do not use the Delete board function in kusaba! This will delete all of the images from the board, and unless you have a backup, you won't get them back)

Repeat this process for any other boards you wish to convert. You can convert just one or two boards at a time, as kusaba and PyIB can run side-by-side without problems.

Clone this wiki locally