wiki:WikiStart

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.

  1. Clean phpBB installation (recommended):
    1. Extract BBone package into phpBB root directory. In case you were asked about replacing original phpBB files, answer "yes".
    2. Remove all *.php files from cache directory.
    3. Open bbone/config.php file and set-up your Ideone.com account.
    4. 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.
    5. 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.
  2. Modified phpBB installation:
    1. Extract BBone package into any temporary directory.
    2. Move bbone directory to your phpBB root path.
    3. 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.
    4. 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 languagelanguage_id value
AdaADA
AssemblerASM
AWK (gawk)GAWK
AWK (mawk)MAWK
BashBASH
bcBC
BrainfkBF
CC
C#CSHARP
C++CPP
C99 strictC99
CLIPSCLIPS
ClojureCLOJURE
COBOLCOBOL
COBOL 85COBOL85
Common Lisp (clisp)CLISP
D (dmd)D
ErlangERLANG
ForthFORTH
FortranFORTRAN
GoGO
HaskellHASKELL
IconICON
IntercalINTERCAL
JavaJAVA
Javascript (rhino)RHINO
Javascript (spidermonkey)SPIDERMONKEY
LuaLUA
NemerleNEMERLE
NiceNICE
OcamlOCAML
OzOZ
Pascal (fpc)FPC
Pascal (gpc)GPC
PerlPERL
PHPPHP
PikePIKE
Prolog (gnu)GPROLOG
Prolog (swi)SPROLOG
PythonPYTHON
Python3PYTHON3
RR
RubyRUBY
ScalaSCALA
Scheme (guile)SCHEME
SmalltalkSMALLTALK
TclTCL
TextTEXT
UnlambdaUNLAMBDA
Visual Basic .NETVBNET
WhitespaceWHITESPACE
  • 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>
&copy; 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
Last modified 4 years ago Last modified on 27.09.2010 00:21:42