From 3a00adeb650a81aac44dad9a1d071e781e64687a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 15 May 2008 22:05:05 +0000 Subject: [PATCH] - web: add 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 --- checkin_notes | 13 +++++++++++++ doc/logo.php | 5 ++++- doc/projects.inc | 8 ++++++++ html/inc/team.inc | 46 ++++++++++++++++++++++++++++------------------ html/inc/user.inc | 40 ++++++++++++++++++++++++---------------- html/inc/util.inc | 6 +++++- html/user/home.php | 4 +++- 7 files changed, 85 insertions(+), 37 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3402edf429..f77dd1ff25 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4047,3 +4047,16 @@ Rom May 15 2008 clientscr/ screensaver_win.cpp + +David May 15 2008 + - web: add 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 diff --git a/doc/logo.php b/doc/logo.php index b7f8637a4a..3d8974dd0f 100644 --- a/doc/logo.php +++ b/doc/logo.php @@ -59,7 +59,10 @@ Installer splash screen: 'Powered by BOINC' image:

- + +

+(always link this to http://boinc.berkeley.edu) +

Wallpaper: diff --git a/doc/projects.inc b/doc/projects.inc index 7374b3b0fd..a85f2a66b0 100644 --- a/doc/projects.inc +++ b/doc/projects.inc @@ -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/", diff --git a/html/inc/team.inc b/html/inc/team.inc index 1ed7599511..97f15662ce 100644 --- a/html/inc/team.inc +++ b/html/inc/team.inc @@ -72,8 +72,10 @@ function display_team_page($team, $user) { row2("Web site", "$x"); } - 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 " Name "; - if ($nosort) { - echo " - Total credit - Recent average credit - "; - } else { - if ($sort_by == "total_credit") { - echo "Total credit"; + if (!no_computing()) { + if ($nosort) { + echo " + Total credit + Recent average credit + "; } else { - echo "id&sort_by=total_credit&offset=$offset>Total credit"; - } - if ($sort_by == "expavg_credit") { - echo "Recent average credit"; - } else { - echo "id&sort_by=expavg_credit&offset=$offset>Recent average credit"; + if ($sort_by == "total_credit") { + echo "Total credit"; + } else { + echo "id&sort_by=total_credit&offset=$offset>Total credit"; + } + if ($sort_by == "expavg_credit") { + echo "Recent average credit"; + } else { + echo "id&sort_by=expavg_credit&offset=$offset>Recent average credit"; + } } } @@ -201,8 +205,14 @@ function display_team_members($team, $offset, $sort_by) { } echo " $j) $x - $user_total_credit - $user_expavg_credit + "; + if (!no_computing()) { + echo " + $user_total_credit + $user_expavg_credit + "; + } + echo " $user->country "; diff --git a/html/inc/user.inc b/html/inc/user.inc index 8415199067..d930b6f661 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -189,21 +189,27 @@ function show_user_info_private($user) { row2(tra("%1 member since", PROJECT), date_str($user->create_time)); row2(tra("Change"), "".tra("email address")." | ".tra("password")." | ".tra("other account info").""); row2("", "authenticator)."\">".tra("Log out").""); - row2(tra("User ID"), "
".tra("Used in community functions")."", $user->id); - row2(tra("Account key"), "
".tra("Provides full access to your account")."", $user->authenticator); - row2(tra("Weak account key"), "
".tra("Provides")." ".tra("limited access")."".tra("to your account")."", weak_auth($user)); + row2(tra("User ID")."
".tra("Used in community functions")."", $user->id); + if (!no_computing()) { + row2(tra("Account key")."
".tra("Provides full access to your account")."", $user->authenticator); + row2(tra("Weak account key"), "
".tra("Provides")." ".tra("limited access")."".tra("to your account")."", weak_auth($user)); + } row1("".tra("Preferences")); - row2( - tra("When and how BOINC uses your computer"), - "".tra("Computing preferences")."" - ); + if (!no_computing()) { + row2( + tra("When and how BOINC uses your computer"), + "".tra("Computing preferences")."" + ); + } row2(tra("Message boards and private messages"), "".tra("Community preferences")."" ); - row2(tra("Resource share and graphics"), - "".tra("%1 preferences", PROJECT)."" - ); + if (!no_computing()) { + row2(tra("Resource share and graphics"), + "".tra("%1 preferences", PROJECT)."" + ); + } } function show_community_private($user) { @@ -285,12 +291,14 @@ function show_user_summary_public($user) { if (strlen($user->url)) { row2(tra("URL"), "url\">http://$user->url"); } - show_credit($user); + if (!no_computing()) { + show_credit($user); - if ($user->show_hosts) { - row2(tra("Computers"), "id\">".tra("View").""); - } else { - row2(tra("Computers"), tra("hidden")); + if ($user->show_hosts) { + row2(tra("Computers"), "id\">".tra("View").""); + } 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); } } diff --git a/html/inc/util.inc b/html/inc/util.inc index 0c17dd641e..32b40e6943 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -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) { diff --git a/html/user/home.php b/html/user/home.php index ae685ebd3b..1c34b6df19 100644 --- a/html/user/home.php +++ b/html/user/home.php @@ -35,7 +35,9 @@ start_table(); echo ""; 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");