beach_defender
Joined: 11 Jan 2006
Posts: 78
Location: Dee Why Sydney (300 miles Sth of where I want to be)
|
| Posted: Fri May 05, 2006 7:40 am Post subject: Multiple Clocks |
|
|
Hi all,
I have a request to include 2 clocks on the left form.
I tried simply copying and changing the names of the clocks in ../MyTheme/header.html as follows
Code:
$xtpl->assign("CLOCK1_TITLE", $app_strings['LBL_WORLD_CLOCK']);
$xtpl->assign("WORLD_CLOCK1", get_world_clock($image_path));
if($currentModule != "Rss" && $WORLD_CLOCK_DISPLAY == 'true')
{
$xtpl->parse("main.left_form_clock1");
}
//$xtpl->assign("CLOCK2_TITLE", $app_strings['LBL_WORLD_CLOCK']);
$xtpl->assign("CLOCK2_TITLE", '2nd CLOCK');
$xtpl->assign("WORLD_CLOCK2", get_world_clock($image_path));
if($currentModule != "Rss" && $WORLD_CLOCK_DISPLAY == 'true')
{
$xtpl->parse("main.left_form_clock2");
}
and then in ../MyTheme/header.html I made these changes
Code:
<!-- BEGIN: left_form_clock1 -->
<br>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tbody>
<tr style="cursor:pointer;" unslectable="on" onclick="javascript:expandCont('wclock');">
<td width="4"><img src="{IMAGE_PATH}/head_start.gif"></td>
<td class="leftFormHeader" valign="middle" align="left" nowrap height="20">{CLOCK1_TITLE}</td>
<td align="right" class="leftFormHeader"><img src='themes/images/toggle2.gif' id="img_wclock" width='15' height='15'></td>
<td align="right" width="4"><img src="{IMAGE_PATH}/head_end.gif"></td>
</tr>
<tr>
</tr>
</tbody>
</table>
<div id="wclock" style="display:block;">
<table width="100%" cellpadding="2" cellspacing="0" border="0" align="center" class="leftFormBorder1">
<tr>
<td nowrap>
{WORLD_CLOCK1}
</td>
</tr>
</table>
</div>
<!-- END: left_form_clock1 -->
<!-- BEGIN: left_form_clock2 -->
<br>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
<tbody>
<tr style="cursor:pointer;" unslectable="on" onclick="javascript:expandCont('wclock');">
<td width="4"><img src="{IMAGE_PATH}/head_start.gif"></td>
<td class="leftFormHeader" valign="middle" align="left" nowrap height="20">{CLOCK2_TITLE}</td>
<td align="right" class="leftFormHeader"><img src='themes/images/toggle2.gif' id="img_wclock" width='15' height='15'></td>
<td align="right" width="4"><img src="{IMAGE_PATH}/head_end.gif"></td>
</tr>
<tr>
</tr>
</tbody>
</table>
<div id="wclock" style="display:block;">
<table width="100%" cellpadding="2" cellspacing="0" border="0" align="center" class="leftFormBorder1">
<tr>
<td nowrap>
{WORLD_CLOCK2}
</td>
</tr>
</table>
</div>
<!-- END: left_form_clock2 -->
This shows the two clocks, sorta but they both have the same time (we want to two zones).
I'm not great with javascript, and if anyone can tell me what stupid thing I've done wrong, thanks.
Barry |
|