Hosted Groupboard API

The hosted version of Groupboard also includes a control panel which lets you easily configure your Groupboard.

URL Format
URL Parameters
Javascript API

URL Format

The following base URL is used for Groupboard and Groupboard Designer rooms:

http://www.groupboard.com/gb/1

(replace 1 with your board id)

You can also embed the room into an iframe (see the control panel for sample iframe code), or, if you have a paid-for board, you can copy the HTML code into your own web page for more control over integration.

Displaying the gallery

You can put a link on your page which will list all of the saved pictures. Simply use the following link:

<a href="http://www.groupboard.com/mp/gallery.cgi?board_id=1">gallery</a>

(Replace 1 with your board id). You can add parameters to set the size of the whiteboard when viewing the gallery, as follows:

&board_width=600&board_height=400

You can also add "&xml=true" to download the gallery data in xml format.

If you are using Groupboard Designer, using the following link instead:

<a href="http://www.groupboard.com/mp/designer_gallery.cgi?board_id=ID">gallery</a>

(where ID is the id of your groupboard.)

Groupboard mobile (iPhone/iPad/Android) apps

Groupboard can be accessed on iOS and Android devices - simply download the Groupboard App from the App Store or Google Play.

To connect to a particular Groupboard, you simply click on the Connect tab, then enter the board id. By default the size of the whiteboard will be the size of the device screen (with the resolution scaled up by 1x, 2x or 3x depending on the resolution of the device). You can launch the app with a specific whiteboard size by using the following URL:

groupboard://www.groupboard.com/1?board_width=810&board_height=480&name=bob&password=test

(replace '1' with your board id. The parameters after '?' are optional).


URL Parameters

OptionDefault ValueDescription
board_idN/AThis is the id of your board, which the server uses to uniquely identify your Groupboard.
show_hovertrueIf set to true, the name of the user who drew an item will be shown when the mouse hovers over the item. Only avaiable in Groupboard Designer.
dont_suggest_appfalseBy default, users on iphone and small android devices are urged to install the app for a better experience. Set this to true to prevent this behaviour.
scale_to_fitfalseIf set to true, background images will be scaled so that they fit the entire width or height of the whiteboard at 100% zoom. Only avaiable in Groupboard Designer.
scale_to_fit_widthfalseIf set to true, background images will be scaled so that they fit the entire width of the whiteboard at 100% zoom. Only avaiable in Groupboard Designer.
background_picOptionally set to the name of a background picture to display permanently on the whiteboard (which must have been uploaded to the board).
need_passwordfalseSet this option to true if you want the user to be prompted for a password when logging on.
password You can optionally pass in the password for the board using this parameter.
hide_chatfalseSet this to true to hide the Chat button.
show_titlefalseSet this to true to display the title of the board at the top.
singleuserfalseSet this to true if you want a single-user board (i.e. each user has their own copy of the whiteboard).
board_width810The width of the whiteboard (not including scroll bars).
board_height470The height of the whiteboard (not including scroll bars).
set_nameemptyUse this variable to set the name of the user (no spaces or punctuation allowed).
beep_on_loginfalseSet to true to beep when a new user logs in.
mathfalseSet to true to display math icons above the board. Only avaiable in Groupboard Designer.
default_colour6 (black)The default tool colour. Set to a value between 0 and 255.
default_thickness1The default line thickness and font size. Set to a value between 1 and 10.
default_tool4 (freehand)The default drawing tool. (4=freehand, 1=lines, 2=ovals, 11=rectangles, 12=filled ovals, 13=filled rectangles, 3=text, 64=fill, 0=select, 49=pointer, 53=pan, 67=polygon, 68=filled polygon, 69=hatched polygon)
centre_in_windowtrueCentres background images in the whiteboard. Only avaiable in Groupboard Designer.
multi_pagetrueEnables the multi-page functionality (prev/next/page controls at the top). Only avaiable in Groupboard Designer.
show_erasertrueSet to false to hide the eraser icon from the whiteboard (only works with the new user interface).
show_trashfalseSet to false to hide the trashcan icon in whiteboard (only works with the new user interface).
show_tourfalseSet to true to display the tour screen when the user connects (only works with the new user interface). By default the tour is displayed the first time the user connects.
keep_background_on_clearfalseKeeps the current background image loaded when the page is cleared.
multi_user_panfalseSynchronized pan/zoom across all users. Only avaiable in Groupboard Designer.
auto_zoomfalseAutomatically zoom out if another user draws outside the visible whiteboard area. Only avaiable in Groupboard Designer.
prevent_pan_outsidefalsePrevent users from scrolling outside the current drawing. Only avaiable in Groupboard Designer.
no_pan_zoomfalseCompletely disable panning (scrolling) and zooming for the current user. Only avaiable in Groupboard Designer.

Javascript API

If you have a paid-for Groupboard, you can copy the HTML code out of the iframe into your web page in order to customize the Groupboard user interface. The following methods and properties are available in the HTML5/ajax version of Groupboard:

groupboard.start(server_address, board_id)connect to the Groupboard server
groupboard.htmlgen(width, height, static_bg_url)generate Groupboard html code at current document location, with optional static background
groupboard.write_html(dom, width, height, static_bg_url)same as htmlgen, but writes the html into the given DOM element
groupboard.close()logs the user out, closes the network connection to the server, and stops Groupboard
groupboard.load()brings up the load window
groupboard.clear()clears the current whiteboard page
groupboard.load_pic(filename)loads the given picture from the gallery.

groupboard.save()brings up the save window
groupboard.save_as(filename)saves to the given filename (append .png to save as an image to the backgrounds directory)
groupboard.set_background()brings up the 'set background' window
groupboard.set_background(url)loads the specified background image
groupboard.show_chat()brings up the chat window
groupboard.show_extended_palette()displays the color palette
groupboard.set_tool(t)changes the current tool where tool is:
select = 0 (Groupboard Designer only)
line = 1
circle = 2
text = 3
freehand = 4
rectangle = 11
filled circle = 12
filled rectangle = 13
pointer = 49 (Groupboard Designer only)
place image = 55 (Groupboard Designer only)
tool library = 61 (Groupboard Designer only)
flood fill = 64
polygons = 67 (Groupboard Designer only)
solid polygons = 68 (Groupboard Designer only)
hatched polygons = 69 (Groupboard Designer only)
groupboard.set_thickness(t)changes the current size (1-10)
groupboard.set_colour(c)changes the current colour (where colour is between 0 and 255):
white = 0
red = 1
green = 2
blue = 3
pink = 4
orange = 5
black = 6
grey = 7
magenta = 8
cyan = 9
brown = 10
[11-226 = extended palette]

groupboard.set_brush(b)changes the current freehand brush where brush is:
circle nib (default) = 0
slash nib = 1
backslash nib = 2
groupboard.prompt_for_admin_password()prompt user for admin password, and log in again
groupboard.save_unread_chat()temporarily store current chat text
groupboard.show_unread_chat()restored the unread chat text to the chat window
groupboard.upload()brings up the upload window
groupboard.allow_nonadmin_uploadset to true to allow non-admin users to upload
groupboard.unread_chatthe number of lines of chat text that the user hasn't seen (if the chat window isn't visible)
groupboard.cur_toolsets the default tool
groupboard.cur_colsets the default colour (0-255)
groupboard.cur_sizesets the default size (1-10)
groupboard.graffset to true to enable the graffiti/artists board
groupboard.newuiset to true to enable the new user interface features (title/users displayed inside whiteboard + prev/next page buttons displayed at bottom of whiteboard)
groupboard.keep_background_on_clearset to true to keep the current background image when clearing
groupboard.we_are_admin(read-only) will be set to true if current user is an admin

Callbacks

connected_callback()called when connected to Groupboard

Groupboard Designer API

The following extra methods and properties are available in Groupboard Designer:

groupboard.clear_all(dont_confirm)clears all pages. Pass in true if you don't want to ask user for confirmation.
groupboard.zoom_in()zoom in by factor of 1.5
groupboard.zoom_out()zoom out by factor of 1.5
groupboard.set_zoom(value)set zoom level (1.0 = 100%)
groupboard.copy()copy selected items into clipboard
groupboard.cut()cut selected items into clipboard
groupboard.paste()paste selected items from clipboard
groupboard.select_all()select all items
groupboard.clear_selection()clear clipboard of selected items
groupboard.delete_items()deletes selected items
groupboard.set_const_thickness(new_state)sets or resets constant thickness of lines (for AutoCAD compatibility)
groupboard.undo()undo or redo last action
groupboard.set_gridlines(new_state)switches gridlines on or off
groupboard.set_save_filename(filename)when the user presses save, the picture will be saved under this filename without bringing up the save dialog
groupboard.set_paste_image(name)sets a given image (which must be in the backgrounds directory) as the current "place image" and sets the current drawing mode to place image, e.g. set_paste_image('icon.gif')
groupboard.prev_page()move to the previous whiteboard page
groupboard.next_page()move to the next whiteboard page
groupboard.insert_panel(true)insert a new whiteboard page
groupboard.set_panel(page_num, true)moves to the specified whiteboard page
groupboard.set_pointer(image)sets the image for the pointer tool
groupboard.mouse_wheel_scrollset to false to disable mouse-wheel scrolling
groupboard.multi_user_panset to true to synchronize pan/zoom between users
groupboard.scale_to_fitif set to true, background images will be scaled so that they fit the entire width or height of the whiteboard at 100% zoom
groupboard.centre_in_windowif set to true, background images will be centred in the whiteboard window
groupboard.scale_to_fit_widthif set to true, background images will be scaled so that they fit the entire width of the whiteboard at 100% zoom
groupboard.auto_zoomset to true to automatically zoom out when another user draws outside the visible whiteboard area
groupboard.use_scrollbarsset to true to display scrollbars (Groupboard Designer only)
groupboard.prevent_pan_outsideset to true to prevent scrolling outside the current whiteboard contents (only applies to Groupboard Designer)
groupboard.is_designer(read-only) will be set to true if this is a Groupboard Designer board

Admin API (only available if you are logged in using your admin password)

The following methods are available:

groupboard.show_banlist()brings up the banlist window
groupboard.show_drawing_log()brings up the drawing log window
groupboard.show_board_info()brings up the board info window
groupboard.set_allow_drawing(new_state)enable or disable non-admin users from drawing on the whiteboard
groupboard.set_allow_loading(new_state)enable or disable non-admin users from loading saved pictures or backgrounds
groupboard.set_allow_clearing(new_state)enable or disable non-admin users from clearing the whiteboard