Table of Contents

How to Create an additional Imageboard.

In this tutorial you will need to replace all instances of 'board2' with the board directory you want* ex 'gaming', 'linux', or 'porn'

Some knowledge of Linux and HTML are to be expected, however, I wrote this to the best of a “Noobs” ability.

So lets start off by logging in via shh shell.

Enter these commands one after the other:

cd /opt/piratebox/share
sudo cp -Rp board board2
cd /opt/piratebox/www
sudo ln -s /opt/piratebox/share/board2 board2
sudo chown -h nobody:nogroup board2

Now we need to edit the config so we can execute the scripts needed for the new board.

sudo nano /opt/piratebox/conf/lighttpd/lighttpd.conf

Scroll to about line 85 and duplicate this

$HTTP["url"] =~ "^/board/" {
    cgi.assign = ( ".pl" => "/usr/bin/perl" , )
}

to look like this

$HTTP["url"] =~ "^/board/" {
    cgi.assign = ( ".pl" => "/usr/bin/perl" , )
}
$HTTP["url"] =~ "^/board2/" {
    cgi.assign = ( ".pl" => "/usr/bin/perl" , )
}

save and exit

This makes an exact clone of your first board
You could stop here if you wish, but why do that?

To make a fresh board (unactivated)

Don't forget to change 'board2' to whatever name you made your board! ex 'gaming'

run these commands.

sudo rm /opt/piratebox/share/board2/index.html
cd /opt/piratebox/share/board2/res
sudo rm *.*

Make this 2nd board unique

sudo nano /opt/piratebox/share/board2/config.pl

change the board name and icon to whatever you want.

use constant TITLE => 'Secret Board #2';
use constant TITLEIMG => '/piratebox-logo-small.png'

save and exit

The / is relative to www, and piratebox-logo-small.png is in the www root. Remove the /, and upload an image to the board2 directory and point to it. Be sure permissions and ownership are correct or the logo may not display properly.

To activate the board

wget -qO- %%http://127.0.0.1/board2/kareha.pl%% &> /dev/null

reboot your box for good measure Once booted direct your browser to piratebox.lan/board2 (or the name you choose)to see your second board. This should not interfere with the first board.

And you thought we were done

How are your users going to know about this board if you don't have it linked from the main page?

sudo nano /opt/piratebox/www/content/index.html

add this line after <li><a href=“/board/”>Forum</a></li>

<li><a href="/board2/">2nd Board</a></li>

save and exit

sudo nano /opt/piratebox/src/HEADER.txt

add this line after <li><a href=“/board/”>Forum</a></li>

<li><a href="/board2/">2nd Board</a></li>

save and exit then redistribute the new HEADER.txt with

sudo /opt/piratebox/bin/distribute_files.sh /opt/piratebox/share/Shared 'true'

Done

But wait....There's more!

You COULD create a multitude of boards in this manner and point the navigation link to a page with the collection of boards;
However, I will leave that for you to figure out. Or I may create a tutorial for that if there is a demand for it.

If you have suggestions or need help, come see us in the chat room or on the forum.