BBone | Running and Testing Code on Forum
BBone is an add-on for phpBB forums which allows to share source codes and provides the ability to compile and run them. All this thanks to the Ideone.com service.
The main features are:
- syntax highlighting,
- testing source codes against user input,
- creating mini-contests for forum co-members.
Installation
Before you start using BBone, you need to create an account in the Ideone.com service and set up the Ideone API password. NOTE: We strongly recommend you to create two separate accounts for Ideone API and private use.
All the necessary files to install BBone are available here. Package includes modified version of Prosilver theme.
- Clean phpBB installation (recommended):
- Extract BBone package into phpBB root directory. In case you were asked about replacing original phpBB files, answer "yes".
- Remove all *.php files from cache directory.
- Open bbone/config.php file and set-up your Ideone.com account.
- Open your database manager (your hosting service should provide one) and execute SQL queries from bbone/mysql_schema.sql (except the last one, which deletes all BBone tables). NOTE: If you have changed default database prefix during phpBB installation, replace all occurrences of "phpbb_" in table names with proper prefix.
- In case you are using non-default theme, find all occurrences of commented "<bbone>" tag in Prosilver theme files and move it's content to corresponding ones of your current theme.
- Modified phpBB installation:
- Extract BBone package into any temporary directory.
- Move bbone directory to your phpBB root path.
- Find all occurrences of the commented out "<bbone>" tags in the remaining BBone files and move their contents to the corresponding files in the phpBB directory.
- See points: A.2-A.5
Requirements
- phpBB v. 3.0.7-PL1,
- MySQL database.
Manual
BBone provides "bbone" tag for the phpBB forum members.
Syntax
[bbone=language_id(,mode),code_id] ([input]input data for contest mode[/input]) program source [/bbone]
Description
- language_id - specifies programming language of the source code:
Programming language language_id value Ada ADA Assembler ASM AWK (gawk) GAWK AWK (mawk) MAWK Bash BASH bc BC Brainfk BF C C C# CSHARP C++ CPP C99 strict C99 CLIPS CLIPS Clojure CLOJURE COBOL COBOL COBOL 85 COBOL85 Common Lisp (clisp) CLISP D (dmd) D Erlang ERLANG Forth FORTH Fortran FORTRAN Go GO Haskell HASKELL Icon ICON Intercal INTERCAL Java JAVA Javascript (rhino) RHINO Javascript (spidermonkey) SPIDERMONKEY Lua LUA Nemerle NEMERLE Nice NICE Ocaml OCAML Oz OZ Pascal (fpc) FPC Pascal (gpc) GPC Perl PERL PHP PHP Pike PIKE Prolog (gnu) GPROLOG Prolog (swi) SPROLOG Python PYTHON Python3 PYTHON3 R R Ruby RUBY Scala SCALA Scheme (guile) SCHEME Smalltalk SMALLTALK Tcl TCL Text TEXT Unlambda UNLAMBDA Visual Basic .NET VBNET Whitespace WHITESPACE
- mode (optional) - if set, it describes mode of the bbone tag:
- not set - standard mode, bbone component acts as simple tool to display and test programs with given input,
- contest - contest mode, used to create mini-contest, similar to those from SPOJ; in this mode, post author puts source code inside BBone tag and optionally specifies program input, then it is automatically executed to produce output, and other users have to submit programs which give the same results for specified input,
- code_id - automatically generated number used by BBone internals; do not change it,
- "input" sub-tag (optional) - used only in contest mode, specifies input data for the contest.
NOTE: All identifiers used by BBone tag, including tag itself, are case-insensitive.
Examples
Standard mode:
[bbone=c] #include <stdio.h> int main() { printf("Hello World!\n"); return 0; } [/bbone]
Contest mode:
[bbone=c,contest] [input] Hello World! [/input] #include <stdio.h> int main() { char str[50]; gets(str); printf("%s\n", str); return 0; } [/bbone]
Terms of Use
This product uses Ideone API. It's Terms of Use require placing following HTML code in a visible place of the application (in this case modified version of phpBB):
Your Forum uses <a href="http://bbone.ideone.com">BBone</a> © by <a href="http://sphere-research.com">Sphere Research Labs</a>Your Forum uses BBone © by Sphere Research Labs
NOTE: Users who do not subject to this rule do not have right to any form of support from BBone developers nor Ideone.com Team.
We offer customer support and dedicated software customization & development.
Please direct inquiries and requests for quotes to contact@sphere-research.com.
License
BBone is distributed under GNU General Public License version 2.
Would you like to contact us? Write at bbone@ideone.com.
BBone uses Ideone API © by Sphere Research Labs