mirror of https://github.com/BOINC/boinc.git
- web: add RSS feed for notifications
- make_project: disable community-related periodic tasks for newly-created projects svn path=/trunk/boinc/; revision=14468
This commit is contained in:
parent
e454677e94
commit
757c41b1fa
|
@ -88,3 +88,22 @@ David Jan 3 2008
|
||||||
boinc_api.C
|
boinc_api.C
|
||||||
stripchart/
|
stripchart/
|
||||||
stripchart
|
stripchart
|
||||||
|
|
||||||
|
David Jan 4 2008
|
||||||
|
- web: add RSS feed for notifications
|
||||||
|
- make_project: disable community-related periodic tasks
|
||||||
|
for newly-created projects
|
||||||
|
|
||||||
|
html/
|
||||||
|
inc/
|
||||||
|
forum.inc
|
||||||
|
friend.inc
|
||||||
|
notify.inc (new)
|
||||||
|
pm.inc
|
||||||
|
user.inc
|
||||||
|
user/
|
||||||
|
img/
|
||||||
|
rss_icon.gif
|
||||||
|
sample_index.php
|
||||||
|
tools/
|
||||||
|
make_project
|
||||||
|
|
|
@ -6,3 +6,6 @@ alter table bolt_enrollment
|
||||||
|
|
||||||
alter table bolt_view
|
alter table bolt_view
|
||||||
add index bv_cs(course_id, start_time);
|
add index bv_cs(course_id, start_time);
|
||||||
|
|
||||||
|
alter table bolt_refresh
|
||||||
|
add unique br_u(user_id, course_id);
|
||||||
|
|
|
@ -57,10 +57,13 @@ create table bolt_view (
|
||||||
primary key (id)
|
primary key (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- represents the result of an exercise
|
-- represents the result of a single exercise
|
||||||
--
|
--
|
||||||
create table bolt_exercise_result (
|
create table bolt_result (
|
||||||
id integer not null auto_increment,
|
id integer not null auto_increment,
|
||||||
|
create_time integer not null,
|
||||||
|
user_id integer not null,
|
||||||
|
course_id integer not null,
|
||||||
view_id integer not null,
|
view_id integer not null,
|
||||||
-- the original display of exercise
|
-- the original display of exercise
|
||||||
score double not null,
|
score double not null,
|
||||||
|
|
|
@ -1077,5 +1077,11 @@ function subscribed_post_web_line($notify) {
|
||||||
return "New posts in the thread <a href=forum_thread.php?id=$thread->id>$thread->title</a>";
|
return "New posts in the thread <a href=forum_thread.php?id=$thread->id>$thread->title</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function subscribe_rss($notify, &$title, &$msg, &$url) {
|
||||||
|
$thread = BoincThread::lookup_id($notify->opaque);
|
||||||
|
$title = "New posts in subscribed thread";
|
||||||
|
$msg = "There are new posts in the thread '$thread->title'";
|
||||||
|
$url = URL_BASE."forum_thread.php?id=$thread->id";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -75,4 +75,18 @@ Do not reply to this message.
|
||||||
send_email($src_user, "[".PROJECT."] friend confirmed", $message);
|
send_email($src_user, "[".PROJECT."] friend confirmed", $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function friend_req_rss($notify, &$title, &$msg, &$url) {
|
||||||
|
$src_user = BoincUser::lookup_id($notify->opaque);
|
||||||
|
$title = "Friend request";
|
||||||
|
$msg = "$src_user->name has added you as a friend; please confirm or decline";
|
||||||
|
$url = URL_BASE."friend.php?action=query&userid=$notify->opaque";
|
||||||
|
}
|
||||||
|
|
||||||
|
function friend_accept_rss($notify, &$title, &$msg, &$url) {
|
||||||
|
$src_user = BoincUser::lookup_id($notify->opaque);
|
||||||
|
$title = "Friendship confirmation";
|
||||||
|
$msg = "$src_user->name has confirmed you as a friend";
|
||||||
|
$url = URL_BASE."home.php";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once("../project/project.inc");
|
||||||
|
|
||||||
|
function notify_rss_auth($user) {
|
||||||
|
return md5($user->authenticator.$user->passwd_hash."notify_rss");
|
||||||
|
}
|
||||||
|
|
||||||
|
function notify_rss_url($user) {
|
||||||
|
return URL_BASE."notify_rss.php?userid=$user->id&auth=".notify_rss_auth($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -172,5 +172,13 @@ function pm_email_remind($user) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pm_rss($notify, &$title, &$msg, &$url) {
|
||||||
|
$pm = BoincPrivateMessage::lookup_id($notify->opaque);
|
||||||
|
$from_user = BoincUser::lookup_id($pm->senderid);
|
||||||
|
$title = "New private message";
|
||||||
|
$msg = "$from_user->name sent you a private message; subject: $pm->subject";
|
||||||
|
$url = URL_BASE."pm.php";
|
||||||
|
}
|
||||||
|
|
||||||
$cvs_version_tracker[]="\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $";
|
$cvs_version_tracker[]="\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -6,6 +6,7 @@ require_once("../inc/util.inc");
|
||||||
require_once("../inc/team.inc");
|
require_once("../inc/team.inc");
|
||||||
require_once("../inc/friend.inc");
|
require_once("../inc/friend.inc");
|
||||||
require_once("../inc/forum_db.inc");
|
require_once("../inc/forum_db.inc");
|
||||||
|
require_once("../inc/notify.inc");
|
||||||
|
|
||||||
function parse_project($f) {
|
function parse_project($f) {
|
||||||
$p->total_credit = 0.0;
|
$p->total_credit = 0.0;
|
||||||
|
@ -220,8 +221,9 @@ function show_community_private($user) {
|
||||||
if (count($notifies)) {
|
if (count($notifies)) {
|
||||||
$x = "";
|
$x = "";
|
||||||
foreach ($notifies as $notify) {
|
foreach ($notifies as $notify) {
|
||||||
$x .= notify_description($notify)."<br>";
|
$x .= "• ".notify_description($notify)."<br>";
|
||||||
}
|
}
|
||||||
|
$x .= "<a href=".notify_rss_url($user)."><img vspace=4 border=0 src=img/rss_icon.gif alt=RSS></a>";
|
||||||
row2("Notifications", $x);
|
row2("Notifications", $x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 641 B |
|
@ -127,7 +127,7 @@ if (count($project_news) > 5) {
|
||||||
echo "
|
echo "
|
||||||
<p class=\"smalltext\">
|
<p class=\"smalltext\">
|
||||||
News is available as an
|
News is available as an
|
||||||
<a href=\"rss_main.php\">RSS feed</a> <img src=\"img/xml.gif\" alt=\"XML\">.</p>
|
<a href=\"rss_main.php\">RSS feed</a> <img src=\"img/rss_icon.gif\" alt=\"RSS\">.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
";
|
";
|
||||||
|
|
|
@ -232,36 +232,43 @@ t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '24 hours'
|
t.period = '24 hours'
|
||||||
t.output = 'db_dump.out'
|
t.output = 'db_dump.out'
|
||||||
t.cmd = 'db_dump -d 2 -dump_spec ../db_dump_spec.xml'
|
t.cmd = 'db_dump -d 2 -dump_spec ../db_dump_spec.xml'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '1 days'
|
t.period = '1 days'
|
||||||
t.output = 'update_uotd.out'
|
t.output = 'update_uotd.out'
|
||||||
t.cmd = 'run_in_ops ./update_uotd.php'
|
t.cmd = 'run_in_ops ./update_uotd.php'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '1 hour'
|
t.period = '1 hour'
|
||||||
t.output = 'update_forum_activities.out'
|
t.output = 'update_forum_activities.out'
|
||||||
t.cmd = 'run_in_ops ./update_forum_activities.php'
|
t.cmd = 'run_in_ops ./update_forum_activities.php'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '7 days'
|
t.period = '7 days'
|
||||||
t.output = 'update_stats.out'
|
t.output = 'update_stats.out'
|
||||||
t.cmd = 'update_stats -update_users -update_teams -update_hosts'
|
t.cmd = 'update_stats -update_users -update_teams -update_hosts'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '24 hours'
|
t.period = '24 hours'
|
||||||
t.output = 'update_profile_pages.out'
|
t.output = 'update_profile_pages.out'
|
||||||
t.cmd = 'run_in_ops ./update_profile_pages.php'
|
t.cmd = 'run_in_ops ./update_profile_pages.php'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '24 hours'
|
t.period = '24 hours'
|
||||||
t.output = 'team_import.out'
|
t.output = 'team_import.out'
|
||||||
t.cmd = 'run_in_ops ./team_import.php'
|
t.cmd = 'run_in_ops ./team_import.php'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
t = project.config.tasks.make_node_and_append("task")
|
t = project.config.tasks.make_node_and_append("task")
|
||||||
t.period = '24 hours'
|
t.period = '24 hours'
|
||||||
t.output = 'notify.out'
|
t.output = 'notify.out'
|
||||||
t.cmd = 'run_in_ops ./notify.php'
|
t.cmd = 'run_in_ops ./notify.php'
|
||||||
|
t.disabled = 1
|
||||||
|
|
||||||
project.config.write()
|
project.config.write()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue