-
Notifications
You must be signed in to change notification settings - Fork 5
ConvertingFromKusaba
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.
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.
- Open phpMyAdmin or other software equivalent
- View the
boards
table, and click Insert - For the
dir
value, place the directory of the board, such as b for /b/ - For the
name
value, place the name of the board, such as Random - Press Save and note the ID given to the new row
- Edit the convert.php file with your preferred text editor
- 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'sboards
table
-
- Upload convert.php to the same directory as kusaba (containing config.php)
- Run convert.php in your browser (this may take some time)
- View the source of the page, and copy all of the output to your clipboard, or save it to a file by other means
- Place the contents in a text file, such as posts.sql
- Remove convert.php from the server or move it to a secure location
- 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)
- Run the following commands through your browser:
- http://cgi_path.to.pyib.com/manage/rebuildnameblocks/boarddirhere (Not present in PyIB r40, will do nothing if your version is too old)
- http://cgi_path.to.pyib.com/manage/rebuild/boarddirhere
- 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)
- 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.