diff --git a/checkin_notes b/checkin_notes index 08180c5ceb..49941ba14d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -23,3 +23,21 @@ Charlie 2 Jan 2007 mac_build/ boinc.xcodeproj/ project.pbxproj + +Rytis 3 Jan 2007 + - User web: + - Add optional 3rd element to project news file (title) + - Certificate now shows DEFINEd project name + - Front page now styled with CSS + + html/ + user/ + cert.php + sample_index.php + sample_rss_main.php + white.css + inc/ + news.inc + util.inc + project.sample/ + project_news.inc diff --git a/html/inc/news.inc b/html/inc/news.inc index 167725f8e5..887bccb267 100644 --- a/html/inc/news.inc +++ b/html/inc/news.inc @@ -1,11 +1,9 @@ $date -
- $text -

- "; +function news_item($date, $text, $title) { + echo '

'.$date.' '.$title.'

+

'.$text.'

+ '; } function show_news($items, $n) { @@ -13,7 +11,7 @@ function show_news($items, $n) { $n = count($items); } for ($i=0; $i<$n; $i++) { - news_item($items[$i][0], $items[$i][1]); + news_item($items[$i][0], $items[$i][1], $items[$i][2]); } } diff --git a/html/inc/util.inc b/html/inc/util.inc index b55331aba9..5bc98074b9 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -107,15 +107,17 @@ function page_head($title, $java_onload=null, $title_plain=null, $prefix="") { header("Content-type: text/html; charset=".tr(CHARSET)); } +// echo ''; + if (!$title_plain) { echo "".strip_tags($title)." - + "; } else { echo "".strip_tags($title_plain)." - + "; } if ($java_onload){ @@ -466,9 +468,9 @@ function sched_stopped() { } function user_links($user) { - $x = "id>$user->name"; + $x = ''.$user->name.''; if ($user->has_profile) { - $x .= " id>"; + $x .= ' User profile image'; } # Does this project accept donations? # If so, do you want to have a link next to user name as it appears on the web site? diff --git a/html/project.sample/project_news.inc b/html/project.sample/project_news.inc index 075c998843..f3f9b2533b 100644 --- a/html/project.sample/project_news.inc +++ b/html/project.sample/project_news.inc @@ -2,10 +2,12 @@ $project_news = array( array("March 1, 2004", - "Sample news item" + "Sample news item", + "Sample news item title" ), array("March 2, 2004", - "Another item" + "Another item", + "Another item title" ) ); diff --git a/html/user/cert1.php b/html/user/cert1.php index 75cf9f1407..e31dd75a3c 100644 --- a/html/user/cert1.php +++ b/html/user/cert1.php @@ -37,9 +37,9 @@ $user->name

-has participated in PROJECT_NAME since $join, +has participated in ".PROJECT." since $join, and has contributed $credit -to PROJECT_NAME. +to ".PROJECT.".


@@ -50,7 +50,7 @@ to PROJECT_NAME.
PROJECT DIRECTOR NAME -
Director, PROJECT +
Director, ".PROJECT."

$today diff --git a/html/user/sample_index.php b/html/user/sample_index.php index 6a6012c9c8..989e06e2e3 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -15,35 +15,36 @@ require_once("../project/project_news.inc"); function show_nav() { $config = get_config(); $master_url = parse_config($config, ""); - echo " -

Join ".PROJECT."

+ echo "
+

Join ".PROJECT."

    -
  1. ".tr(RULES_TITLE)." -
  2. Download BOINC -
  3. When prompted, enter $master_url +
  4. ".tr(RULES_TITLE)." +
  5. Download BOINC +
  6. When prompted, enter ".$master_url."
-

Returning participants

+

Returning participants

-

Community

+

Community

-

Project totals and leader boards

+

Project totals and leader boards

+
"; } @@ -57,30 +58,35 @@ $stopped = web_stopped(); $rssname = PROJECT . " RSS 2.0" ; $rsslink = URL_BASE . "rss_main.php"; -echo ' +if (defined("CHARSET")) { + header("Content-type: text/html; charset=".tr(CHARSET)); +} + +echo ""; +echo " - '.PROJECT.' - - + ".PROJECT." + + -

'.PROJECT.'

- -
-'; +

".PROJECT."

+ + "; @@ -88,8 +94,8 @@ if (!$stopped) { $profile = get_current_uotd(); if ($profile) { echo " -
+"; if ($stopped) { echo " ".PROJECT." is temporarily shut down for maintenance. - Please try again later. + Please try again later. "; } else { db_init(); show_nav(); } -echo" +echo "

- Powered by + Powered by \"BOINC

- User of the day

+
+

User of the day

"; $user = lookup_user_id($profile->userid); echo uotd_thumbnail($profile, $user); @@ -100,21 +106,20 @@ if (!$stopped) { } echo " -
- News +
+

News

"; show_news($project_news, 5); -if (count($project_news > 5)) { - echo "...more\n"; +if (count($project_news) > 5) { + echo "...more"; } echo " -

- News is available as an - RSS feed . +

+ News is available as an + RSS feed \"XML\".

- - "; if ($caching) { diff --git a/html/user/sample_rss_main.php b/html/user/sample_rss_main.php index f8d3ecd46d..15fe7ef792 100644 --- a/html/user/sample_rss_main.php +++ b/html/user/sample_rss_main.php @@ -63,12 +63,17 @@ $tot = count($project_news); $news = min( $tot, $news); for( $item=0; $item < $news; $item++ ) { $j = $tot - $item; - if( count($project_news[$item]) == 2) { + if( count($project_news[$item]) >= 2) { $d = strtotime($project_news[$item][0]); $news_date=gmdate('D, d M Y H:i:s',$d) . ' GMT'; $unique_url=URL_BASE."all_news.php#$j"; + if (isset($project_news[$item][2])) { + $title = strip_tags($project_news[$item][2]); + } else { + $title = "Project News ".strip_tags($project_news[$item][0]); + } echo " - Project News ".strip_tags($project_news[$item][0])." + ".$title." $unique_url $unique_url diff --git a/html/user/white.css b/html/user/white.css index eb41246723..f68741457e 100644 --- a/html/user/white.css +++ b/html/user/white.css @@ -226,7 +226,6 @@ tr.postseperator td{ } td.threadline { -#font-size:10pt; text-align:left; } @@ -239,3 +238,32 @@ span.note{ font-family: System, Fixed, sans-serif; color: #000000; } + +#news { + background-color: #dddddd; + vertical-align: top; +} + +#news h2, #uotd h2, #mainnav h2 { + font-size: 1.2em; + font-weight: bold; +} + +#news h3 { + color: #666666; + font-size: 1em; + margin-bottom: 2px; +} + +#news p { + margin-top: 0px; +} + +#uotd { + background-color: #ffeeff; + vertical-align: top; +} + +.smalltext { + font-size: 0.8em; +} \ No newline at end of file