Customizing PirateBox configuration

After installing the piratebox, it’s nice to customize it a little bit… There are many reason for this, the first one, in my point of view is to have a more understandable SSID name depend on your country… Here are the list of the step of the customizations I made on myne.

A lot of these customizations came from the really good site of Matthias : see here

Change the SSID name

The PirateBox SSID name is defined in the /etc/config/wireless file, you can modify the following line like this:

option ssid 'PirateBox - Share Freely'
by
option ssid 'PirateBox - Partageons librement

Then, you need to restart the network by typing : /etc/init.d/network reload ; it is better to execute this when you are connected on LAN. Otherwise, you can unplug / plug it.

Configure chat to be persistent

The chat functionality is a good way to discuss with others users but, by default it is cleared each time you restart the device. To keep the message and set a default welcome message, open the file /opt/piratebox/conf/piratebox.conf

RESET_CHAT="yes"
by
RESET_CHAT="no"

and

CHATMSG="<date>..."
by
CHATMSG="<date>00:00:00</date>&nbsp;&nbsp;<name>PirateBox:</name>&nbsp;&nbsp;&nbsp;<data class='def'>Servez-vous et partagez vos fichiers !</data><br>"

Change the index.html page

I don’t really like the index.html page as it does not show the files available, more over the english language is not adapted of every one, so I prefer a frame organization mixing files, local text and chat area.

The index.html file can be changed by replacing it : create a new one and copy it to the following place : /opt/piratebox/www/index.html

Here is my new index file :

<html>
<head>
    <LINK rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <title>PirateBox: Partageons Librement</title>

<style type="text/css">
<!--
* {margin: 0; padding: 0;}
body {text-align: left; font-size: 1.0em; font-family: sans-serif;}
.box {padding-top:10px; padding-bottom:0px;}
#message {text-align: left; width:350px}
#sending {display: none;}
#wrapform {height: 40px;}
#progress {display: inline;  border-collapse: separate; empty-cells: show;
           border-spacing: 10px 0; padding: 0; vertical-align: bottom;}
#progress td {height: 10px; width: 13px; background-color: #eee;
              border: 1px solid #aaa; padding: 0px;}
--></style>

<!--piratebox.lan-->

<script type="text/javascript" src="jquery.min.js"></script>    

<script type="text/javascript">
    $(document).ready(function() {
           // do stuff when DOM is ready
           $.get('forum.html', function(data) {
                  $('div#forum_link').html(data);
                 } );
   });

  function fnGetDomain(url) {
     return url.match(/:\/\/(.[^/]+)/)[1];
  }
</script>

</head>
<body>

<div><a href="/.READ.ME.htm" target="_parent"><img src="/piratebox-logo-small.png"/></a></div>
<div id="message"> 
<b>Partager vos fichiers : </b><br/>
<iframe  width='650' frameBorder='0' src='http://piratebox.lan:8080'>Votre navigateur ne supporte pas cette fonctionnalité, suivez ce <a href='http://piratebox.lan:8080'>lien</a></iframe><br/>
<b>Telecharger :</b><br/>
<iframe width='650' height='400px' frameBorder='0' src='/Shared'>Votre navigateur ne supporte pas cette fonctionnalité, suivez ce <a href='http://piratebox.lan:8080'>lien</a></iframe><br/>
<b>Discuter :</b><br/>
<iframe height='400px' width='650' scrolling='0' frameBorder='0' src='/chat.html'></iframe>
<br />
</div>

</body></html>

 

 

2 thoughts on “Customizing PirateBox configuration

  1. Just wanted to say thanks. This was probably the second-most helpful page for setting up my Piratebox after the actual guide itself.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.