BOINC project website

From Unofficial BOINC Wiki

Jump to: navigation, search

BOINC system provides a standard website template for BOINC projects, which includes user account pages, basic statistics and message boards.

Contents

[edit] Customizing website template

Website design can be customized (to a limited degree) by editing white.css file, which stores all cascading style sheet information for the current website template. Work is ongoing to make more design customizable via CSS (content separation from layout).

Layout can be customized modifying PHP files in html/user directory (and/or html/inc directory), however, this makes it hard to later update the code and maintain customizations. To help reduce this problem, BOINC PHP code defines hooks for the functions that are most often customized, offloading custom code to project/project.inc file, which is usually not affected by code upgrade.

[edit] Function hooks

Example user's column from the message boards
Example user's column from the message boards

[edit] project_forum_user_info($user)

Used in: html/inc/forum.inc

This hook allows to customize the text displayed under user's avatar in the message boards. If the function is defined, the text highlighted in red in the illustration is replaced with text being echo'ed by the function.

The parameter being provided is the $user object, which corresponds to the database entry of the specific user.

[edit] uotd_candidates_query()

Used in: html/inc/uotd.inc; html/ops/profile_screen_form.php

This hook allows to customize the list of users that get selected for "User of the day" feature that is enabled on most projects.

By default only users who have created a profile, have recent average credit of more than 1, and have been approved using profile screening feature in ops pages are being selected.

[edit] page_head($title, $java_onload=null, $title_plain=null, $prefix="")

Used in: every PHP page with output

This hook allows to completely replace page heading. The most obvious use for it is to ease integration with existing web frameworks to maintain the original style of the website.

[edit] page_tail($show_date=false, $prefix="")

Used in: every PHP page with output

This hook allows to completely replace page footer. The most obvious use for it is to ease integration with existing web frameworks to maintain the original style of the website.

Personal tools