This could be useful to use on a meeting page, on one side of the agenda. It uses CoolClock.
Instructions are for Drupal 5.x; version 6 changes things a bit, as described in the Javascript Startup Guide.
Download CoolClock
Download the javascript files from CoolClock's homepage: coolclock.js, moreskins.js and excanvas.js (for IE6).
Create a /sites/all/misc/custom directory in your Drupal installation, and save the files there. (The location was suggested in the thread Best practices for inserting Javascript into a Drupal page).
Include the CoolClock javascript code
Edit the theme's page.tpl.php file, right after:
<?php print $scripts ?>
to include:
<script type="text/javascript" src="/sites/all/misc/custom/coolclock.js"></script>
Call the script when the document initializes
In the page.tpl.php file, add:
<script type="text/javascript">
if (Drupal.jsEnabled) {
$(document).ready(
function() { CoolClock.findAndCreateClocks(); }
);
}
</script>
Create the Block
In /admin/build/block, add a new block, using the full html input format, with this code:
<canvas id="clk1" class="CoolClock:swissRail:80"></canvas>
Where swissRail is the CoolClock theme, and 80 is the radius of the clock.
Configure the new block to appear in the desired region, and to show or hide in certain pages only.
- Inicie sesión para enviar comentarios
