mirror of https://github.com/BOINC/boinc.git
profile screening conditionally restored
svn path=/trunk/boinc/; revision=8182
This commit is contained in:
parent
8da3a3e9b7
commit
bd668c4b9e
|
@ -12155,3 +12155,10 @@ Matt 26 Sept 2005
|
|||
html/
|
||||
inc/
|
||||
cache.inc
|
||||
|
||||
David 26 Sept 2005
|
||||
- Restored the profile screening code, enabled by a
|
||||
<profile_screening/> flag in config.xml
|
||||
|
||||
html/inc
|
||||
profile.inc
|
||||
|
|
|
@ -2,6 +2,15 @@
|
|||
|
||||
$project_news = array(
|
||||
|
||||
array("September 25, 2005",
|
||||
"<a href=http://boinc.bakerlab.org/rosetta/>Rosetta@home<a>,
|
||||
a BOINC-based project at the University of Washington,
|
||||
has launched and is seeking participants.
|
||||
Its goal is \"... to develop methods that accurately
|
||||
predict and design protein structures
|
||||
and complexes, an endeavor that may ultimately help researchers
|
||||
develop cures for human diseases.\""
|
||||
),
|
||||
array("September 23, 2005",
|
||||
"<a href=server_perf.pdf>High-Performance Task Distribution for Volunteer Computing</a>, a paper about BOINC server performance,
|
||||
will appear in the e-Science 2005 conference in December."
|
||||
|
|
|
@ -35,6 +35,7 @@ htmlspecialchars("
|
|||
<log_dir> /path/to/directory </log_dir>
|
||||
|
||||
[ <disable_account_creation/> ]
|
||||
[ <profile_screening/> ]
|
||||
[ <show_results/> ]
|
||||
[ <one_result_per_user_per_wu/> ]
|
||||
[ <max_wus_to_send> N </max_wus_to_send> ]
|
||||
|
@ -129,6 +130,10 @@ list_item("sched_lockfile_dir",
|
|||
directory where scheduler lockfiles are stored.
|
||||
Must be writeable to the Apache user.
|
||||
");
|
||||
list_item("profile_screening",
|
||||
"If present, don't show profile pictures until they've been
|
||||
screened and approved by project admins."
|
||||
);
|
||||
list_end();
|
||||
|
||||
echo "
|
||||
|
|
|
@ -76,7 +76,11 @@ list_item_func(
|
|||
"
|
||||
);
|
||||
list_item_func(
|
||||
"project_attach(char* url, char* account_id, bool use_cached_credentials)",
|
||||
"project_attach(
|
||||
char* url,
|
||||
char* account_id,
|
||||
bool use_cached_credentials
|
||||
)",
|
||||
"Attach to the given project. Cached credentials are defined in the
|
||||
<a href=client_startup.php>project_init.xml</a> file."
|
||||
);
|
||||
|
@ -130,7 +134,12 @@ list_item_func(
|
|||
"
|
||||
);
|
||||
list_item_func(
|
||||
"acct_mgr_rpc(const char* url, const char* name, const char* passwd, bool use_cached_credentials)",
|
||||
"acct_mgr_rpc(
|
||||
const char* url,
|
||||
const char* name,
|
||||
const char* passwd,
|
||||
bool use_cached_credentials
|
||||
)",
|
||||
"Do an <a href=acct_mgt.php>Account Manager RPC</a>
|
||||
to the given URL, passing the given name/password.
|
||||
If use_cached_credentials is true, then the existing url, username,
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
require_once("docutil.php");
|
||||
page_head("Papers related to BOINC");
|
||||
echo"
|
||||
|
||||
<a href=server_perf.pdf>High-Performance Task Distribution for Volunteer Computing</a>
|
||||
<br>
|
||||
David P. Anderson, Eric Korpela, Rom Walton
|
||||
<br> To appear in First IEEE International Conference on e-Science and Grid Technologies
|
||||
<br>5-8 December 2005, Melbourne
|
||||
<hr>
|
||||
<a href=http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/proceedings/ipdps/&toc=comp/proceedings/ipdps/2005/2312/02/2312toc.xml&DOI=10.1109/IPDPS.2005.247>Homogeneous Redundancy: a Technique to Ensure Integrity of Molecular Simulation Results Using Public Computing</a>
|
||||
<br>
|
||||
M. Taufer, D. Anderson, P. Cicotti, C.L. Brooks III.
|
||||
<br> from 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS'05) Heterogeneous Computing Workshop.
|
||||
<br>
|
||||
April 4 2005, Denver CO.
|
||||
<hr>
|
||||
<a href=http://www.fatbat.dk/thesis/>
|
||||
Developing Distributed Computing Solutions Combining Grid Computing and
|
||||
Public Computing</a>.
|
||||
<br> Jakob Gregor Pedersen & Christian Ulrik Søttrup.
|
||||
<br> Master's thesis from University of Copenhagen.
|
||||
<br> March 2005.
|
||||
|
||||
<p>
|
||||
Describes tools for transparently moving jobs between Condor and BOINC.
|
||||
<hr>
|
||||
|
||||
<a href=grid_paper_04.pdf>BOINC: A System for Public-Resource Computing and Storage</a>
|
||||
<br>David P. Anderson.
|
||||
<br>5th IEEE/ACM International Workshop on Grid Computing,
|
||||
<br>November 8, 2004, Pittsburgh, USA.
|
||||
<p>
|
||||
A more technical paper.
|
||||
Also available in
|
||||
<ul>
|
||||
<li> <a href=http://boinc.oocp.org/grid_paper_04.html>Japanese</a>
|
||||
</ul>
|
||||
<hr>
|
||||
<p>
|
||||
<a href=boinc2.pdf>Public Computing: Reconnecting People to Science<a>
|
||||
<br>David P. Anderson.
|
||||
<br>Conference on Shared Knowledge and the Web,
|
||||
<br>Residencia de Estudiantes, Madrid, Spain, Nov. 17-19 2003.
|
||||
|
||||
<p>
|
||||
A paper about BOINC's goals.
|
||||
Also available in
|
||||
<ul>
|
||||
<li> <a href=madrid.html>HTML</a>
|
||||
<li> <a href=http://boinc.de/madrid_de.htm>HTML/German</a>
|
||||
<li> <a href=http://www.seti.nl/content.php?c=boinc_berkeley_madrid>HTML/Dutch</a>
|
||||
<li> <a href=http://boinc.oocp.org/madrid.html>Japanese</a>
|
||||
</ul>
|
||||
|
||||
|
||||
";
|
||||
page_tail();
|
||||
?>
|
|
@ -7,7 +7,6 @@ require_once("../inc/sanitize_html.inc");
|
|||
require_once("../inc/cache.inc");
|
||||
require_once("../inc/user.inc");
|
||||
|
||||
// TODO: Determine if we can always assume these will be the same number.
|
||||
define('SMALL_IMG_WIDTH', 64);
|
||||
define('SMALL_IMG_HEIGHT', 64);
|
||||
|
||||
|
@ -19,6 +18,11 @@ define('MAX_DESC_LENGTH', 90);
|
|||
define('GALLERY_WIDTH', 7);
|
||||
define('GALLERY_HEIGHT', 4);
|
||||
|
||||
function profile_screening() {
|
||||
$config = get_config();
|
||||
return parse_bool($config, "profile_screening");
|
||||
}
|
||||
|
||||
function profile_error_page($str) {
|
||||
page_head("Profile error");
|
||||
echo "$str<br>\n";
|
||||
|
@ -124,20 +128,21 @@ function show_textarea($name, $text) {
|
|||
// user the verification status of their profile.
|
||||
//
|
||||
function offensive_profile_warning($verify_flag) {
|
||||
return;
|
||||
if ($verify_flag == 0) {
|
||||
return "
|
||||
<font size='+2' color='33cc33'>
|
||||
Your profile will be made visible to other people<br>
|
||||
as soon as it has been approved by the project.<br>
|
||||
This may take up to a few days.<br>
|
||||
</font>";
|
||||
</font>
|
||||
";
|
||||
} else if ($verify_flag == -1) {
|
||||
return "
|
||||
<font size='+2' color='ff3333'>
|
||||
Your profile has been marked as unacceptable.<br>
|
||||
It is not visible to other people. Please change it.<br>
|
||||
</font>";
|
||||
</font>
|
||||
";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -146,6 +151,11 @@ function show_picture_option($profile) {
|
|||
|
||||
row1("Picture");
|
||||
|
||||
$warning = "";
|
||||
if (profile_screening()) {
|
||||
$warning = offensive_profile_warning($profile->verification);
|
||||
}
|
||||
|
||||
if ($profile->has_picture) {
|
||||
echo "
|
||||
<tr><td colspan=2>
|
||||
|
@ -153,7 +163,7 @@ function show_picture_option($profile) {
|
|||
<tr>
|
||||
<td valign=top><a href=\"" . IMAGE_URL . $profile->userid . '.jpg' . "\"><img src=\"" . IMAGE_URL . $profile->userid . '_sm.jpg' . "\"></a>
|
||||
</td>
|
||||
<td valign=top>" . offensive_profile_warning($profile->verification) . "Your profile picture is shown at left.
|
||||
<td valign=top> $warning Your profile picture is shown at left.
|
||||
<p>
|
||||
To replace it,
|
||||
click the \"Browse\" button and select a JPEG or PNG file (50KB or less).
|
||||
|
@ -167,8 +177,7 @@ check this box:
|
|||
rowify("<br>");
|
||||
end_table();
|
||||
echo "</td></tr>";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
rowify("
|
||||
If you would like include a picture with your profile,
|
||||
click the \"Browse\" button and select a JPEG or PNG file.
|
||||
|
@ -332,9 +341,13 @@ function getImages($fileName) {
|
|||
return array($image, $smallImage);
|
||||
}
|
||||
|
||||
function scale_image($image, $origWidth, $origHeight, $targetWidth, $targetHeight) {
|
||||
function scale_image(
|
||||
$image, $origWidth, $origHeight, $targetWidth, $targetHeight
|
||||
) {
|
||||
|
||||
// If the image is already smaller than the target dimensions, just return it.
|
||||
// If the image is already smaller than the target dimensions,
|
||||
// just return it.
|
||||
//
|
||||
if ($origWidth <= $targetWidth && $origHeight <= $targetHeight) {
|
||||
return $image;
|
||||
}
|
||||
|
@ -349,17 +362,25 @@ function scale_image($image, $origWidth, $origHeight, $targetWidth, $targetHeigh
|
|||
$destHeight = $origHeight;
|
||||
}
|
||||
|
||||
$gd_info = gd_info();
|
||||
$newGD = (strstr($gd_info["GD Version"], "2.0")!="");
|
||||
if ($newGD) {
|
||||
// If you are using a modern PHP/GD installation that does 'truecolor' images, this is what's needed.
|
||||
$newImage = ImageCreateTrueColor($destWidth, $destHeight);
|
||||
ImageCopyResampled($newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $origWidth, $origHeight);
|
||||
} else {
|
||||
// If not, use this block. The image quality is lower but it works using older PHP/GD versions.
|
||||
$newImage = ImageCreate($destWidth, $destHeight);
|
||||
ImageCopyResized($newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $origWidth, $origHeight);
|
||||
}
|
||||
$gd_info = gd_info();
|
||||
$newGD = (strstr($gd_info["GD Version"], "2.0")!="");
|
||||
if ($newGD) {
|
||||
// If you are using a modern PHP/GD installation that does
|
||||
// 'truecolor' images, this is what's needed.
|
||||
$newImage = ImageCreateTrueColor($destWidth, $destHeight);
|
||||
ImageCopyResampled(
|
||||
$newImage, $image, 0, 0, 0, 0, $destWidth,
|
||||
$destHeight, $origWidth, $origHeight
|
||||
);
|
||||
} else {
|
||||
// If not, use this block.
|
||||
// The image quality is lower but it works using older PHP/GD versions.
|
||||
$newImage = ImageCreate($destWidth, $destHeight);
|
||||
ImageCopyResized(
|
||||
$newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight,
|
||||
$origWidth, $origHeight
|
||||
);
|
||||
}
|
||||
|
||||
return $newImage;
|
||||
}
|
||||
|
@ -408,9 +429,11 @@ function show_user_table($members, $offset, $numToDisplay, $cols) {
|
|||
|
||||
echo "<td class=bordered width=7% height=64><center>";
|
||||
|
||||
// Only link an image if the user has uploaded one.;
|
||||
//if ($profile->has_picture && $profile->verification==1) {
|
||||
if ($profile->has_picture) {
|
||||
$show_picture = $profile->has_picture;
|
||||
if (profile_screening() && $profile->verification != 1) {
|
||||
$show_picture = false;
|
||||
}
|
||||
if ($show_picture) {
|
||||
echo "<a href=\"", URL_BASE, "view_profile.php?userid={$members[$count]}\"><img src=\"", URL_BASE, IMAGE_URL, "{$members[$count]}_sm.jpg\"></a>";
|
||||
|
||||
} else {
|
||||
|
@ -430,8 +453,10 @@ function show_user_table($members, $offset, $numToDisplay, $cols) {
|
|||
}
|
||||
|
||||
// Generates a string containing:
|
||||
// 1) the name of the user with ID == $userid, with a link to a view of their profile
|
||||
// 2) the first MAX_DESC_LENGTH characters from the response1 field of said user's profile.
|
||||
// 1) the name of the user with ID == $userid,
|
||||
// with a link to a view of their profile
|
||||
// 2) the first MAX_DESC_LENGTH characters from the response1 field
|
||||
// of said user's profile.
|
||||
|
||||
function get_profile_summary($profile) {
|
||||
$user = get_user_from_id($profile->userid);
|
||||
|
@ -486,13 +511,15 @@ function show_profile($userid, $verify_mode = FALSE) {
|
|||
}
|
||||
|
||||
|
||||
// Show picture only if there is a picture AND
|
||||
// - sysadmin is verifying it
|
||||
// - user is viewing/editing it
|
||||
// - profile has been approved by sysadmin
|
||||
// If doing screening, only show picture in certain situations
|
||||
//
|
||||
//if ($profile->has_picture && ($verify_mode || $can_edit || $profile->verification==1)) {
|
||||
if ($profile->has_picture) {
|
||||
$show_picture = $profile->has_picture;
|
||||
if (profile_screening()) {
|
||||
if (!$verify_mode && !$can_edit && $profile->verification!=1) {
|
||||
$show_picture = false;
|
||||
}
|
||||
}
|
||||
if ($show_picture) {
|
||||
echo "
|
||||
<tr><td colspan=2 align=center>
|
||||
<img vspace=6 hspace=9 src=\"" , URL_BASE, IMAGE_URL , $user->id , '.jpg' . "\">
|
||||
|
@ -500,13 +527,13 @@ function show_profile($userid, $verify_mode = FALSE) {
|
|||
";
|
||||
}
|
||||
|
||||
// If the user is viewing their own picture, display it's status if it's not
|
||||
// If the user is viewing their own picture, display its status if it's not
|
||||
// yet verified. This will tell them if other users can't view it yet, or
|
||||
// if there is a problem with it and they need to replace it.
|
||||
//
|
||||
//if ($can_edit && $profile->verification!=1) {
|
||||
// row1(offensive_profile_warning($profile->verification));
|
||||
//}
|
||||
if (profile_screening() && $can_edit && $profile->verification!=1) {
|
||||
row1(offensive_profile_warning($profile->verification));
|
||||
}
|
||||
|
||||
show_user_summary_public($user);
|
||||
|
||||
|
|
Loading…
Reference in New Issue