- web: add <no_computing> option to config.xml.

If present, don't show anything related to computing.
    Use this for Bossa/Bolt projects, and the BOINC message boards.


svn path=/trunk/boinc/; revision=15228
This commit is contained in:
David Anderson 2008-05-15 22:05:05 +00:00
parent df046f6753
commit 3a00adeb65
7 changed files with 85 additions and 37 deletions

View File

@ -4047,3 +4047,16 @@ Rom May 15 2008
clientscr/
screensaver_win.cpp
David May 15 2008
- web: add <no_computing> option to config.xml.
If present, don't show anything related to computing.
Use this for Bossa/Bolt projects, and the BOINC message boards.
html/
inc/
team.inc
user.inc
util.inc
user/
home.php

View File

@ -59,7 +59,10 @@ Installer splash screen:
</ul>
'Powered by BOINC' image:
<p>
<img src=logo/pb_boinc.gif>
<a href=http://boinc.berkeley.edu><img src=logo/pb_boinc.gif></a>
<p>
(always link this to http://boinc.berkeley.edu)
<p>
Wallpaper:

View File

@ -3,6 +3,14 @@
$biomed = array(
"Biology and Medicine",
array(
array(
"GPU Grid - PS3 Grid",
"http://www.ps3grid.net/",
"Barcelona Biomedical Research Park (PRBB)",
"Molecular simulations of proteins",
"PS3GRID opens novel computational scenarios by the first full-atom molecular dynamics code (CellMD) specially optimized to run on the Cell processor and the PlayStation3. New biomedical applications suddenly become possible giving a new role to computational biology for biomedical research.",
"ps3grid.png"
),
array(
"Superlink@Technion",
"http://cbl-link02.cs.technion.ac.il/superlinkattechnion/",

View File

@ -72,8 +72,10 @@ function display_team_page($team, $user) {
row2("Web site", "<a href=$x>$x</a>");
}
row2("Total credit", format_credit_large($team->total_credit));
row2("Recent average credit", format_credit_large($team->expavg_credit));
if (!no_computing()) {
row2("Total credit", format_credit_large($team->total_credit));
row2("Recent average credit", format_credit_large($team->expavg_credit));
}
row2("Country", $team->country);
row2("Type", team_type_name($team->type));
@ -160,21 +162,23 @@ function display_team_members($team, $offset, $sort_by) {
echo "<tr>
<th>Name</th>
";
if ($nosort) {
echo "
<th>Total credit</th>
<th>Recent average credit</th>
";
} else {
if ($sort_by == "total_credit") {
echo "<th>Total credit</th>";
if (!no_computing()) {
if ($nosort) {
echo "
<th>Total credit</th>
<th>Recent average credit</th>
";
} else {
echo "<th><a href=team_members.php?teamid=$team->id&sort_by=total_credit&offset=$offset>Total credit</a></th>";
}
if ($sort_by == "expavg_credit") {
echo "<th>Recent average credit</th>";
} else {
echo "<th><a href=team_members.php?teamid=$team->id&sort_by=expavg_credit&offset=$offset>Recent average credit</a></th>";
if ($sort_by == "total_credit") {
echo "<th>Total credit</th>";
} else {
echo "<th><a href=team_members.php?teamid=$team->id&sort_by=total_credit&offset=$offset>Total credit</a></th>";
}
if ($sort_by == "expavg_credit") {
echo "<th>Recent average credit</th>";
} else {
echo "<th><a href=team_members.php?teamid=$team->id&sort_by=expavg_credit&offset=$offset>Recent average credit</a></th>";
}
}
}
@ -201,8 +205,14 @@ function display_team_members($team, $offset, $sort_by) {
}
echo "<tr class=row1>
<td align=left>$j) $x
<td align=right>$user_total_credit</td>
<td align=right>$user_expavg_credit</td>
";
if (!no_computing()) {
echo "
<td align=right>$user_total_credit</td>
<td align=right>$user_expavg_credit</td>
";
}
echo "
<td align=center>$user->country</td>
</tr>
";

View File

@ -189,21 +189,27 @@ function show_user_info_private($user) {
row2(tra("%1 member since", PROJECT), date_str($user->create_time));
row2(tra("Change"), "<a href=\"edit_email_form.php\">".tra("email address")."</a> | <a href=\"edit_passwd_form.php\">".tra("password")."</a> | <a href=\"edit_user_info_form.php\">".tra("other account info")."</a>");
row2("", "<a href=\"logout.php?".url_tokens($user->authenticator)."\">".tra("Log out")."</a>");
row2(tra("User ID"), "<br/><span class=\"note\">".tra("Used in community functions")."</span>", $user->id);
row2(tra("Account key"), "<br/><span class=\"note\">".tra("Provides full access to your account")."</span>", $user->authenticator);
row2(tra("Weak account key"), "<br/><span class=\"note\">".tra("Provides")." <a href=\"weak_auth.php\">".tra("limited access")."</a>".tra("to your account")."</span>", weak_auth($user));
row2(tra("User ID")."<br/><span class=\"note\">".tra("Used in community functions")."</span>", $user->id);
if (!no_computing()) {
row2(tra("Account key")."<br/><span class=\"note\">".tra("Provides full access to your account")."</span>", $user->authenticator);
row2(tra("Weak account key"), "<br/><span class=\"note\">".tra("Provides")." <a href=\"weak_auth.php\">".tra("limited access")."</a>".tra("to your account")."</span>", weak_auth($user));
}
row1("<a name=\"prefs\"></a>".tra("Preferences"));
row2(
tra("When and how BOINC uses your computer"),
"<a href=\"prefs.php?subset=global\">".tra("Computing preferences")."</a>"
);
if (!no_computing()) {
row2(
tra("When and how BOINC uses your computer"),
"<a href=\"prefs.php?subset=global\">".tra("Computing preferences")."</a>"
);
}
row2(tra("Message boards and private messages"),
"<a href=\"edit_forum_preferences_form.php\">".tra("Community preferences")."</a>"
);
row2(tra("Resource share and graphics"),
"<a href=\"prefs.php?subset=project\">".tra("%1 preferences", PROJECT)."</a>"
);
if (!no_computing()) {
row2(tra("Resource share and graphics"),
"<a href=\"prefs.php?subset=project\">".tra("%1 preferences", PROJECT)."</a>"
);
}
}
function show_community_private($user) {
@ -285,12 +291,14 @@ function show_user_summary_public($user) {
if (strlen($user->url)) {
row2(tra("URL"), "<a href=\"http://$user->url\">http://$user->url</a>");
}
show_credit($user);
if (!no_computing()) {
show_credit($user);
if ($user->show_hosts) {
row2(tra("Computers"), "<a href=\"".URL_BASE."hosts_user.php?userid=$user->id\">".tra("View")."</a>");
} else {
row2(tra("Computers"), tra("hidden"));
if ($user->show_hosts) {
row2(tra("Computers"), "<a href=\"".URL_BASE."hosts_user.php?userid=$user->id\">".tra("View")."</a>");
} else {
row2(tra("Computers"), tra("hidden"));
}
}
if ($user->donated == 1) {
if (file_exists("../project/donations.inc")) {
@ -333,7 +341,7 @@ function community_links($user) {
$fuser = BoincUser::lookup_id($friend->user_dest);
$x .= friend_links($fuser);
}
row2(tra("Friends"), "($n)", $x);
row2(tra("Friends")." ($n)", $x);
}
}

View File

@ -80,7 +80,7 @@ $g_logged_in_user = null;
function get_logged_in_user($must_be_logged_in=true) {
global $g_logged_in_user;
$g_logged_in_user = null;
if ($g_logged_in_user) return $g_logged_in_user;
$login_request = false;
$authenticator = null;
@ -494,6 +494,10 @@ function parse_bool($xml, $tag) {
return false;
}
function no_computing() {
return parse_bool(get_config(), "no_computing");
}
// Generates a legal filename from a parameter string.
function get_legal_filename($name) {

View File

@ -35,7 +35,9 @@ start_table();
echo "<tr><td valign=top>";
start_table();
show_user_info_private($user);
show_user_stats_private($user);
if (!no_computing()) {
show_user_stats_private($user);
}
if (file_exists("../project/donations.inc")) {
require_once("../project/donations.inc");