This is an old revision of the document!


startSectionEdit: $data "plugin_wrap_start" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_end" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_start" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_end" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_start" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_end" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_start" is NOT an array! One of your plugins needs an update.
startSectionEdit: $data "plugin_wrap_end" is NOT an array! One of your plugins needs an update.

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 to whatever you want.

use constant TITLE => 'Secret Board #2';
  • change the icon to whatever you want.
use constant TITLEIMG => '/piratebox-logo-small.png'

The / is relative to www and piratebox-logo-small.png is in the www root. remove the / and drop an image the board2 directory and point to it. be sure permissions and ownership are correct or the logo may not display proplery.

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/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/share/Shared/HEADER.txt

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

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

save and exit

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 live 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.