Team:Illinois-Tools/Notebook

From 2009.igem.org

(Difference between revisions)
 
(26 intermediate revisions not shown)
Line 1: Line 1:
-
<?php
+
__NOTOC__
-
/**
+
<div style="background-color: white; font-color: black">
-
* MediaWiki SimpleCalendar Extension
+
<html>
-
*
+
<head>
-
* @package MediaWiki
+
<style>
-
* @subpackage Extensions
+
.firstHeading {display: none;}
-
* @author Aran Dunkley [http://www.organicdesign.co.nz/nad User:Nad]
+
table {
-
* @licence GNU General Public Licence 2.0 or later
+
  background-color: #FFFFFF;
-
*/
+
  font-color: black;
-
+
  color:black;
-
define('SIMPLECALENDAR_VERSION','1.2.4, 2007-10-18');
+
-
+
-
$wgExtensionFunctions[] = 'wfSetupSimpleCalendar';
+
-
$wgHooks['LanguageGetMagic'][] = 'wfCalendarLanguageGetMagic';
+
-
+
-
$wgExtensionCredits['parserhook'][] = array(
+
-
'name'        => 'Simple Calendar',
+
-
'author'      => '[http://www.organicdesign.co.nz/nad User:Nad]',
+
-
'description' => 'A simple calendar extension',
+
-
'url'        => 'http://www.mediawiki.org/wiki/Extension:Simple_Calendar',
+
-
'version'    => SIMPLECALENDAR_VERSION
+
-
);
+
-
+
-
function wfCalendarLanguageGetMagic(&$magicWords,$langCode = 0) {
+
-
$magicWords['calendar'] = array(0,'calendar');
+
-
return true;
+
}
}
-
+
table.calendar td {
-
function wfSetupSimpleCalendar() {
+
vertical-align:top;
-
global $wgParser;
+
align:center;
-
$wgParser->setFunctionHook('calendar','wfRenderCalendar');
+
-
return true;
+
}
}
-
+
 
-
# Renders a table of all the individual month tables
+
table.month {
-
function wfRenderCalendar(&$parser) {
+
background-color:#87CEFA;
-
$parser->mOutput->mCacheTime = -1;
+
border:solid 1px;
-
$argv = array();
+
-
foreach (func_get_args() as $arg) if (!is_object($arg)) {
+
-
if (preg_match('/^(.+?)\\s*=\\s*(.+)$/',$arg,$match)) $argv[$match[1]]=$match[2];
+
-
}
+
-
if (isset($argv['format']))    $f = $argv['format']; else $f = '%e %B %Y';
+
-
if (isset($argv['dayformat'])) $df = $argv['dayformat']; else $df = false;
+
-
if (isset($argv['title']))    $p = $argv['title'].'/'; else $p = '';
+
-
if (isset($argv['query']))    $q = $argv['query'].'&action=edit'; else $q = 'action=edit';
+
-
if (isset($argv['year']))      $y = $argv['year']; else $y = date('Y');
+
-
if (isset($argv['month'])) {
+
-
$m = $argv['month'];
+
-
return wfRenderMonth(strftime('%m',strtotime("$y-$m-01")),$y,$p,$q,$f,$df);
+
-
} else $m = 1;
+
-
$table = "{| class=\"calendar\"\n";
+
-
for ($rows = 3; $rows--; $table .= "|-\n")
+
-
for ($cols = 0; $cols < 4; $cols++)
+
-
$table .= '|'.wfRenderMonth($m++,$y,$p,$q,$f,$df)."\n";
+
-
return "$table\n|}\n";
+
}
}
-
+
 
-
# Return a calendar table of the passed month and year
+
table.month .heading td {
-
function wfRenderMonth($m,$y,$prefix = '',$query = '',$format = '%e %B %Y',$dayformat = false) {
+
background-color:#1874CD;
-
$thisDay  = date('d');
+
color:#FFF;
-
$thisMonth = date('n');
+
text-align:center;
-
$thisYear  = date('Y');
+
font-weight:bold;
-
if (!$d = date('w',$ts = mktime(0,0,0,$m,1,$y))) $d = 7;
+
text-size:140%;
-
$month = wfMsg(strtolower(strftime('%B',$ts)));
+
}
-
$days = array();
+
 
-
foreach (array('M','T','W','T','F','S','S') as $i => $day)
+
table.month .dow td {
-
$days[] = $dayformat ? wfMsg(strftime($dayformat,mktime(0,0,0,2,$i,2000))) : $day;
+
color:#000;
-
$table = "\n{| class=\"month\"\n|- class=\"heading\"\n|colspan=\"7\"|$month\n|- class=\"dow\"\n";
+
text-align:center;
-
$table .= '|'.join('||',$days)."\n";
+
font-size:100%;
-
if ($d > 1) $table .= "|-".str_repeat("\n|&nbsp;\n",$d-1);
+
}
-
for ($i = $day = $d; $day < 32; $i++) {
+
 
-
$day = $i - $d + 1;
+
table.month td {
-
if ($day < 29 or checkdate($m,$day,$y)) {
+
border:none;
-
if ($i%7 == 1) $table .= "\n|-\n";
+
text-align:center;
-
$t = ($day == $thisDay and $m == $thisMonth and $y == $thisYear) ? ' class="today"' : '';
+
background-color:#87CEFA;
-
$ttext = $prefix.trim(strftime($format,mktime(0,0,0,$m,$day,$y)));
+
}
-
$title = Title::newFromText($ttext);
+
 
-
if (is_object($title)) {
+
table.month a:hover {
-
$class = $title->exists() ? 'day-active' : 'day-empty';
+
background-color:#CCC;
-
$url = $title->getFullURL($title->exists() ? '' : $query);
+
text-decoration:none;
-
} else $url = $ttext;
+
}
-
$table .= "|$t|[$url <span class='$class'>$day</span>]\n";
+
 
-
}
+
.day-active {
 +
color:#1874CD;
 +
font-weight:bold;
 +
}
 +
 
 +
.day-empty {
 +
color:#000;
 +
}
 +
a.menu {
 +
  background-color: #FFFFFF;
 +
  color: black;
 +
  width: 12em;
 +
}
 +
 
 +
.firstHeading {
 +
  color:black;
 +
}
 +
 
 +
#bodyContent {
 +
background-color: #FFFFFF;
}
}
-
return "$table\n|}";
+
 
 +
#content {
 +
background-color: white;
 +
}
 +
 
 +
#footer-box {
 +
  background-color: white;
}
}
 +
p {
 +
  color:black;
 +
}
 +
body {
 +
  background: white url(https://static.igem.org/mediawiki/2009/2/2b/IllinoisToolsBackground.gif) repeat-x;
 +
}
 +
 +
</style>
 +
</head>
 +
</html>
 +
[[Image:notebookanimationillinoistools.gif]]
 +
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 +
<head>
 +
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 +
<style type="text/css" media="screen">
 +
#wrapper {
 +
width: 0%;
 +
}
 +
#header-wrapper {
 +
width: 965px;
 +
height: 35px;
 +
margin: 0px auto;
 +
padding: 0px;
 +
}
 +
/* Menu */
 +
 +
#menu {
 +
width: 965px;
 +
height: 35px;
 +
margin: 0px auto;
 +
padding-left: 20px;
 +
background: url(https://static.igem.org/mediawiki/2009/2/25/Menubarillinoistools.jpg) no-repeat left top;
 +
}
 +
 +
#menu ul {
 +
margin: 0px;
 +
padding: 0px;
 +
list-style: none;
 +
}
 +
 +
#menu li {
 +
float: left;
 +
}
 +
 +
#menu a {
 +
display: block;
 +
padding: 8px 20px 0px 22px;
 +
letter-spacing: -1px;
 +
text-decoration: none;
 +
font-size: 20px;
 +
font-weight: normal;
 +
color: #9ADCF8;
 +
}
 +
 +
#menu a:hover {
 +
text-decoration: underline;
 +
}
 +
        #menu a.active{color: #fff;}
 +
 +
#menu .first a {
 +
background: none;
 +
padding-left: 0px;
 +
}
 +
</style>
 +
  </head>
 +
<body>
 +
<div id="wrapper">
 +
<div id="header-wrapper">
 +
<div id="menu">
 +
<ul>
 +
<li class="first"><a href="https://2009.igem.org/Team:Illinois-Tools">Home</a></li>
 +
        <li><a href="https://2009.igem.org/Team:Illinois-Tools/Team" >The Team</a></li>
 +
        <li><a href="https://2009.igem.org/Team:Illinois-Tools/Project">The Project</a></li>
 +
                                <li><a href="https://2009.igem.org/Team:Illinois-Tools/Demo">Demo</a></li>
 +
                                <li><a href="https://2009.igem.org/Team:Illinois-Tools/Modeling">Modeling</a></li>
 +
                                <li><a href="https://2009.igem.org/Team:Illinois-Tools/Safety">Safety</a></li>
 +
                                <li><a href="https://2009.igem.org/Team:Illinois-Tools/Resources">Resources</a></li>
 +
                                <li><a href="https://2009.igem.org/Team:Illinois-Tools/Notebook"class="active">Notebook</a></li>
 +
</ul>
 +
</div>
 +
</div>
 +
</div>
 +
</body>
 +
</html>
 +
***Note: Our notebook is organized in a weekly fashion.  Click on the Saturday of every week to view the notes from the previous week.
 +
{{IllinoisToolsCalendar}}

Latest revision as of 19:11, 16 October 2009

Notebookanimationillinoistools.gif

      • Note: Our notebook is organized in a weekly fashion. Click on the Saturday of every week to view the notes from the previous week.


May
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
June
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
July
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
August
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
September
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
October
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31