Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PrivateBin comes with multiple templates and of course you can also create your own to adjust the look of it to your site.
For beginners it is suggested to copy
tpl/bootstrap.php and adapt it to your design. You can put the HTML of your template into a PHP file in the directory
If you don't reuse existing external resources (CSS, images, etc.) in your PrivateBin template, we suggest to put CSS and fonts into a subfolder at
css/myawesometemplate, images into a subfolder at
js (if these are publicly available libraries, it is suggested to include the version number in the file name, to ensure they are reloaded in your visitors browser when you upgrade them).
PrivateBin uses straightforward PHP scripts, that are included into the PrivateBin\View class. Only variables that are set in that class can be accessed as local variables in the templates PHP script, otherwise you can of course use any PHP code supported by your server. Keep in mind that you need to escape variables properly before writing them to output. As suggested it is best to use one of the existing template files and simply replace the HTML parts in it.
If you designed an awesome template, please consider sharing it with the project to add it to the templates we ship with the next release.
To enable the use of a template, configure its name (without the
.php ending) in the template property in the configuration file at
Templates included in PrivateBin
This is a bootstrap CSS based PrivateBin template and the default as of 0.20:
This is a slightly modified template based on the bootstrap one above. It moves some options into a drop down and the navigation floats fixed to the top, even when scrolling down:
Not everybody liked the order of the "New" and "Send" buttons so they were switched for usability reasons. For those preferring the order as in the classic "page"-template there is this bootstrap CSS based theme:
Based on the darkstrap bootstrap CSS theme, this is a dark PrivateBin template:
Not everybody liked the order of the "New" and "Send" buttons so they were switched for usability reasons. For those preferring the order as in the classic "page"-template there is this darkstrap based theme:
This is the classic ZeroBin template as used until 0.19 Alpha: