mirror of https://github.com/BOINC/boinc.git
Update AccoundManagers.md and WebConfig.md files
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
parent
5bac2ff26d
commit
c55cb82fb8
|
@ -1 +1 @@
|
|||
[Account Managers in the User Wiki](See)(http://boinc.berkeley.edu/wiki/Account_managers)
|
||||
Account Managers in the User Wiki: [http://boinc.berkeley.edu/wiki/Account_managers](http://boinc.berkeley.edu/wiki/Account_managers)
|
275
WebConfig.md
275
WebConfig.md
|
@ -1,139 +1,200 @@
|
|||
# Customizing the default web site
|
||||
# Web site customization
|
||||
|
||||
## Customizing the default web site
|
||||
When you create a BOINC project using [make_project](MakeProject), a web site is created for you.
|
||||
This consists of a front page (`html/user/index.php`),
|
||||
which links to pages where users can log in, edit preferences, create profiles, and so on.
|
||||
|
||||
Before your project goes public, you'll want to change this web site by adding content
|
||||
and giving the web site a graphical identity specific to your project.
|
||||
Make sure you do a good job;
|
||||
your web site has a large impact on your project's ability to
|
||||
Before your project goes public, you'll want to change this web site as follows:
|
||||
* Add and alter content:
|
||||
* Edit the main page (`index.php`).
|
||||
* Add new pages, linked to from the main page.
|
||||
These might describe your project's research, its leadership team, etc.
|
||||
Typically these are .php files of the form
|
||||
```
|
||||
<?php
|
||||
require_once("../inc/util.inc");
|
||||
page_head("Title");
|
||||
... content
|
||||
page_tail();
|
||||
?>
|
||||
```
|
||||
* Customize page headers and footers (see below).
|
||||
* Set config options (see below).
|
||||
|
||||
* Give the web site a graphical identity (fonts, color scheme).
|
||||
Do this [using CSS stylesheets](StyleSheets).
|
||||
|
||||
Try to do a good job; your web site has a large impact on your project's ability to
|
||||
[recruit and retain participants](VolunteerRecruit).
|
||||
|
||||
Some of this customization can be done by editing the main page (`index.php`) and the stylesheet (`white.css`) files.
|
||||
Other aspects are changed using a configuration file, described below.
|
||||
|
||||
An alternative version of the Account page,
|
||||
with many graphical icons, is available here:
|
||||
http://boinc.berkeley.edu/BOINC_WebIcons_and_php_code.zip
|
||||
(not supported, and doesn't work any more).
|
||||
|
||||
# Web configuration file
|
||||
## Web configuration file
|
||||
The file `html/project/project.inc` serves as a configuration file for your web site.
|
||||
It exists in a separate directory (html/project) so that you can put all project-specific web files there
|
||||
(create symbolic links from `html/inc` and `html/user`).
|
||||
You should put this directory under version control (SVN or CVS).
|
||||
|
||||
The file `project.inc` is generated by [make_project](MakeProject) with default values.
|
||||
The file `project.inc` is generated by [make_project](MakeProject) with default values.
|
||||
Edit this file to customize the constants and functions it contains.
|
||||
|
||||
Constants:
|
||||
### Constants
|
||||
|
||||
*PROJECT*::
|
||||
The name of your project
|
||||
*URL_BASE*::
|
||||
Base URL for web pages (usually same as master_url defined in config.xml).
|
||||
*SECURE_URL_BASE*::
|
||||
(optional) URL prefix for forms with passwords. If your web server supports HTTPS, set this accordingly.
|
||||
*STYLESHEET*::
|
||||
Name of stylesheet file (such as `white.css`)
|
||||
*STYLESHEET2*::
|
||||
Name of an optional project supplied stylesheet.
|
||||
*SHORTCUT_ICON*::
|
||||
Path (relative to html/user) of icon file shown in web browser tabs.
|
||||
*IMAGE_PATH*::
|
||||
relative path to user-uploaded profile images (default: ../user_profile/images/)
|
||||
*IMAGE_URL*::
|
||||
url path to above defined path, is appended to URL_BASE (default: user_profile/images/)
|
||||
*PROFILE_PATH*::
|
||||
relative path to user profiles (default: ../user_profile/)
|
||||
*PROFILE_URL*::
|
||||
url path to user profiles, is appended to URL_BASE (default: user_profile/)
|
||||
*LANGUAGE_FILE*::
|
||||
name of a text file that contains language names that are shown in a selection box to the user at his profile. File is expected in html/user. (default: languages.txt)
|
||||
*COPYRIGHT_HOLDER*::
|
||||
Name of copyright holder
|
||||
*SYS_ADMIN_EMAIL*::
|
||||
Users are directed here if they have complaints about message-board moderation.
|
||||
*UOTD_ADMIN_EMAIL*::
|
||||
Messages about user-of-the-day running low are sent here.
|
||||
*UOTD_THRESHOLD*::
|
||||
Send email if # of UOTD candidates falls below this (default 7)
|
||||
*POST_REPORT_EMAILS*::
|
||||
Moderation-related emails (such as user complaints) are sent here.
|
||||
*INVITE_CODES*::
|
||||
Regular expression used for [controlling account creation](AccountControl).
|
||||
*EMAIL_FROM*::
|
||||
'from' address for emails
|
||||
*EMAIL_FROM_NAME*::
|
||||
'from' name for emails
|
||||
*COUNTRY_FLAGS*::
|
||||
If defined, show country flags in forums. Steps:
|
||||
### **PROJECT**
|
||||
The name of your project
|
||||
### **URL_BASE**
|
||||
Base URL for web pages (usually same as master_url defined in config.xml).
|
||||
### **SECURE_URL_BASE**
|
||||
(optional) URL prefix for forms with passwords. If your web server supports HTTPS, set this accordingly.
|
||||
### **STYLESHEET**
|
||||
Name of stylesheet file (such as `white.css`)
|
||||
### **STYLESHEET2**
|
||||
Name of an optional project supplied stylesheet.
|
||||
### **HEAD_EXTRA**
|
||||
Put this text at the start of the <head> element on each web page.
|
||||
Use this e.g. for the scripts used by Web analytics engines.
|
||||
### **SHORTCUT_ICON**
|
||||
Path (relative to html/user) of icon file shown in web browser tabs.
|
||||
### **IMAGE_PATH**
|
||||
relative path to user-uploaded profile images (default: ../user_profile/images/)
|
||||
### **IMAGE_URL**
|
||||
url path to above defined path, is appended to URL_BASE (default: user_profile/images/)
|
||||
### **PROFILE_PATH**
|
||||
relative path to user profiles (default: ../user_profile/)
|
||||
### **PROFILE_URL**
|
||||
url path to user profiles, is appended to URL_BASE (default: user_profile/)
|
||||
### **LANGUAGE_FILE**
|
||||
name of a text file that contains language names that are shown in a selection box to the user at his profile.
|
||||
File is expected in html/user. (default: languages.txt)
|
||||
### **COPYRIGHT_HOLDER**
|
||||
Name of copyright holder
|
||||
### **SYS_ADMIN_EMAIL**
|
||||
Users are directed here if they have complaints about message-board moderation.
|
||||
### **UOTD_ADMIN_EMAIL**
|
||||
Messages about user-of-the-day running low are sent here.
|
||||
### **UOTD_THRESHOLD**
|
||||
Send email if # of UOTD candidates falls below this (default 7)
|
||||
### **POST_REPORT_EMAILS**
|
||||
Moderation-related emails (such as user complaints) are sent here.
|
||||
### **INVITE_CODES**
|
||||
Regular expression used for [controlling account creation](AccountControl).
|
||||
### **EMAIL_FROM**
|
||||
'from' address for emails
|
||||
### **EMAIL_FROM_NAME**
|
||||
'from' name for emails
|
||||
### **COUNTRY_FLAGS**
|
||||
If defined, show country flags in forums. Steps:
|
||||
|
||||
* Download flag images from http://www.famfamfam.com/lab/icons/flags/famfamfam_flag_icons.zip
|
||||
* Put the .png's in html/user/flags/
|
||||
* Put `define("COUNTRY_FLAGS", 1);` in your html/project/project.inc
|
||||
|
||||
*FORUM_QA_MERGED_MODE*::
|
||||
Set this to true to merge Message boards and Q&A section
|
||||
*NO_MYSQLI*::
|
||||
Set this to true if your web site includes custom PHP script that use the
|
||||
old (and now deprecated) mysql_* MySQL interface.
|
||||
### **FORUM_QA_MERGED_MODE**
|
||||
Set this to true to merge Message boards and Q&A section
|
||||
### **NO_MYSQLI**
|
||||
Set this to true if your web site includes custom PHP script that use the
|
||||
old (and now deprecated) mysql_* MySQL interface.
|
||||
### **NO_COMPUTING**
|
||||
If set to true, this project doesn't do computing; remove web content accordingly.
|
||||
### **USER_HOME**
|
||||
Filename of user home page; default is "home.php".
|
||||
### **WELCOME_PAGE**
|
||||
Filename of the welcome page; default is "welcome.php".
|
||||
|
||||
The following constants, if defined as *true*, turn off web features involving
|
||||
The following constants, if defined as **true**, turn off web features involving
|
||||
user-supplied content.
|
||||
This eliminates having to deal with spammers.
|
||||
|
||||
*DISABLE_TEAMS*::
|
||||
Turn off team-related features.
|
||||
*DISABLE_PROFILES*::
|
||||
Turn off profile-related features.
|
||||
*DISABLE_FORUMS*::
|
||||
Turn off forums.
|
||||
Project admins can still post and edit news items;
|
||||
there's a link to this in the project admin page.
|
||||
*DISABLE_BADGES*::
|
||||
Don't show badges.
|
||||
### **DISABLE_TEAMS**
|
||||
Turn off team-related features.
|
||||
### **DISABLE_PROFILES**
|
||||
Turn off profile-related features.
|
||||
### **DISABLE_FORUMS**
|
||||
Turn off forums.
|
||||
Project admins can still post and edit news items;
|
||||
there's a link to this in the project admin page.
|
||||
### **DISABLE_BADGES**
|
||||
Don't show badges.
|
||||
### **POSTAL_CODE**
|
||||
If set to true, ask users for their postal code and store in DB.
|
||||
This is not the default because it can be seen as a privacy issue.
|
||||
### **NO_USER_URL**
|
||||
If set to true, don't ask for or show the URL of personal web site.
|
||||
### **NO_USER_COUNTRY**
|
||||
If set to true, don't ask for or show user's country.
|
||||
|
||||
Certificate-related constants:
|
||||
*CERT_SIGNATURE*::
|
||||
Signature image filename
|
||||
*CERT_DIRECTOR_NAME*::
|
||||
Name of project director
|
||||
*CERT_PROJECT_LOGO*::
|
||||
Project logo image filename (if any)
|
||||
*CERT_INSTITUTION_LOGO*::
|
||||
Institution logo image filename (if any)
|
||||
### **CERT_SIGNATURE**
|
||||
Signature image filename
|
||||
### **CERT_DIRECTOR_NAME**
|
||||
Name of project director
|
||||
### **CERT_PROJECT_LOGO**
|
||||
Project logo image filename (if any)
|
||||
### **CERT_INSTITUTION_LOGO**
|
||||
Institution logo image filename (if any)
|
||||
|
||||
Variables:
|
||||
*$banned_email_domains*::
|
||||
An array of strings. An account's email address may not end with any of these strings.
|
||||
### **$banned_email_domains**
|
||||
An array of strings. An account's email address may not end with any of these strings.
|
||||
|
||||
Functions:
|
||||
### Functions
|
||||
|
||||
*project_banner()*::
|
||||
Prints page header
|
||||
*project_footer()*::
|
||||
Prints page footer
|
||||
*show_profile_heading1(), show_profile_heading2()*::
|
||||
Text on user profile page
|
||||
*show_profile_question1(), show_profile_question2()*::
|
||||
Text on user profile page
|
||||
*project_workunit($wu)*::
|
||||
Prints project-specific text on workunit page
|
||||
*project_user_links($user)*::
|
||||
Return project-specific text to be shown after user name.
|
||||
*project_user_summary()*::
|
||||
Prints project-specific text on user page
|
||||
*project_user_page_private()*::
|
||||
Prints project-specific text on private user page
|
||||
*donations_intro()*::
|
||||
Displays customized donation information. Useful to describe what the project uses donations for, and project specific guides for donations. If function is not defined, standard donation information is displayed.html/user/donations.php.
|
||||
*project_rules_policies()*::
|
||||
Displays customized project rules and policies. If return value is _true_, standard rules and policies are appended. If function is not defined, default rules and policies are displayed.
|
||||
*project_forum_post_rules()*:: return a string describing message board policies.
|
||||
Required functions:
|
||||
|
||||
To use [PHPMailer](https://github.com/PHPMailer/PHPMailer) (the preferred way to send emails to participants), you must download PHPMailer and put it in PROJECT/html/inc/phpmailer (i.e. the files class.smtp.php and class.phpmailer.php should be in that directory). Than modify the following function:
|
||||
### **project_banner()**
|
||||
Prints page header
|
||||
### **project_footer()**
|
||||
Prints page footer
|
||||
|
||||
*make_php_mailer()*:: return a PHPMailer object with authentication information (see ServerIntro#PHPMailer), used when the above is set to true.
|
||||
Optional functions:
|
||||
|
||||
If you do not define *make_php_mailer()_' then e-mail to participants can still be sent, but it will use PHP's simpler '_mail()* function.
|
||||
### **donations_intro()**
|
||||
Show donation information.
|
||||
Describe what the project uses donations for, and show guidelines for donations.
|
||||
If function is not defined, standard donation information is displayed.
|
||||
Called from html/user/donations.php.
|
||||
### **project_form_post_info($forum)**
|
||||
return a string describing instructions for a particular forum
|
||||
(e.g. how to post in Questions and problems).
|
||||
### **project_forum_post_rules()**
|
||||
return a string describing message board policies.
|
||||
### **project_result($result)**
|
||||
Print project-specific text on result page
|
||||
### **project_rules_policies()**
|
||||
Show general rules and policies
|
||||
(e.g. don't run BOINC on someone else's computer without permission).
|
||||
If return value is *true*, standard rules and policies are appended.
|
||||
If function is not defined, default rules and policies are displayed.
|
||||
### **project_user_credit($user)**
|
||||
Print table row for project-defined credit info.
|
||||
### **project_user_links($user)**
|
||||
Return HTML to be shown after user name (e.g. donation icons).
|
||||
### **project_user_page_private($user)**
|
||||
Print project-specific content on private user page
|
||||
### **project_user_summary_public($user)**
|
||||
Print project-specific table row on user page
|
||||
### **project_workunit($wu)**
|
||||
Prints project-specific text on workunit page
|
||||
### **server_status_project_info()**
|
||||
Prints project-specific info on server status page (server_status.php).
|
||||
### **show_profile_heading1(), show_profile_heading2()**
|
||||
Text on user profile page
|
||||
### **show_profile_question1(), show_profile_question2()**
|
||||
Text on user profile page
|
||||
### **show_user_donations_private($user)**
|
||||
Print table row describing donations, shown only to user.
|
||||
### **show_user_page_private($user)**
|
||||
Print project-specific info at bottom of private user page.
|
||||
|
||||
To use [PHPMailer](https://github.com/PHPMailer/PHPMailer)
|
||||
(the preferred way to send emails to participants),
|
||||
you must download PHPMailer and put it in PROJECT/html/inc/phpmailer
|
||||
(i.e. the files class.smtp.php and class.phpmailer.php should be in that directory).
|
||||
Then modify the following function:
|
||||
|
||||
### **make_php_mailer()**
|
||||
return a PHPMailer object with authentication information
|
||||
(see [ServerIntro](ServerIntro)#PHPMailer),
|
||||
used when the above is set to true.
|
||||
|
||||
If you do not define **make_php_mailer()** then e-mail to participants can still be sent,
|
||||
but it will use PHP's simpler **mail()** function.
|
||||
|
|
Loading…
Reference in New Issue