compatibility with >= v0.9.4
This commit is contained in:
parent
d7ff4947b5
commit
cce8b3955d
@ -6,10 +6,10 @@ This script pulls board information, posts and images from an already existing [
|
|||||||
[k]: http://kusabax.cultnet.net/
|
[k]: http://kusabax.cultnet.net/
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
1. [Tinyboard][o] >= v0.9.2
|
1. [Tinyboard][o] >= v0.9.4
|
||||||
|
|
||||||
## Use
|
## Use
|
||||||
1. Install Tinyboard (>= v0.9.2) normally.
|
1. Install Tinyboard (>= v0.9.4) normally.
|
||||||
2. Download and place `kusabax.php` in the root folder of Tinyboard.
|
2. Download and place `kusabax.php` in the root folder of Tinyboard.
|
||||||
3. Edit the script and fill in your Kusaba X configuration. You can find KU_RANDOMSEED from Kusaba X's config.php file.
|
3. Edit the script and fill in your Kusaba X configuration. You can find KU_RANDOMSEED from Kusaba X's config.php file.
|
||||||
4. Run the script in a web browser.
|
4. Run the script in a web browser.
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
// Trick Tinyboard into opening the KusabaX databse instead
|
// Trick Tinyboard into opening the KusabaX databse instead
|
||||||
$__temp = $config['db'];
|
$__temp = $config['db'];
|
||||||
$config['db'] = $kusabaxc['db'];
|
$config['db'] = $kusabaxc['db'];
|
||||||
sql_open();
|
|
||||||
// Get databse link
|
// Get databse link
|
||||||
$kusabax = $pdo;
|
$kusabax = $pdo;
|
||||||
// Clear
|
// Clear
|
||||||
@ -83,7 +83,6 @@
|
|||||||
// Open Tinyboard database
|
// Open Tinyboard database
|
||||||
$config['db'] = $__temp;
|
$config['db'] = $__temp;
|
||||||
unset($__temp);
|
unset($__temp);
|
||||||
sql_open();
|
|
||||||
|
|
||||||
$k_query = $kusabax->query('SELECT * FROM `' . $kusabaxc['db']['prefix'] . 'boards`');
|
$k_query = $kusabax->query('SELECT * FROM `' . $kusabaxc['db']['prefix'] . 'boards`');
|
||||||
$boards = listBoards();
|
$boards = listBoards();
|
||||||
@ -133,7 +132,7 @@
|
|||||||
|
|
||||||
$log[] = 'Replicating post <strong>' . $post['id'] . '</strong> on /' . $board . '/';
|
$log[] = 'Replicating post <strong>' . $post['id'] . '</strong> on /' . $board . '/';
|
||||||
|
|
||||||
$query = prepare(sprintf("INSERT INTO `posts_%s` VALUES (:id, :thread, :subject, :email, :name, :trip, :capcode, :body, :time, :bump, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, :embed)", $board));
|
$query = prepare(sprintf("INSERT INTO `posts_%s` VALUES (:id, :thread, :subject, :email, :name, :trip, :capcode, :body, :time, :bump, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board));
|
||||||
|
|
||||||
// Post ID
|
// Post ID
|
||||||
$query->bindValue(':id', $post['id'], PDO::PARAM_INT);
|
$query->bindValue(':id', $post['id'], PDO::PARAM_INT);
|
||||||
@ -272,4 +271,5 @@
|
|||||||
$page['body'] .= '</p></div>';
|
$page['body'] .= '</p></div>';
|
||||||
|
|
||||||
echo Element('page.html', $page);
|
echo Element('page.html', $page);
|
||||||
?>
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user