I'm trying to add a JAVA countdown clock to my index.template file, either underneath the search bar, or next to the time, up in the header. Im using the default theme packaged with RC2. I know the code has to go in index.template.php, but I'm not sure where. While playing around with it, I had no luck getting it to work. Here's what I've tried.
I think my problem lies in how to get the script (in HTML) to work in the PHP environment. Here's what I have:
I've added:
<script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script>
just before the </head>
in index.template
The code that the author tells you to add for the clock is:
<h1>New Year 2007 Is Coming!</h1>
<p>
Counting down to New Year 2007: <span id="countdown1">2007-1-1 00:00:00 GMT+00:00</span>!
</p>
I've searched and can't find a way to get this to work how I want.
Any help would really be appreciated!
Anyone?
Quote from: dbrown on January 17, 2006, 07:35:34 PM
I'm trying to add a JAVA countdown clock to my index.template file, either underneath the search bar, or next to the time, up in the header. Im using the default theme packaged with RC2. I know the code has to go in index.template.php, but I'm not sure where. While playing around with it, I had no luck getting it to work. Here's what I've tried.
I think my problem lies in how to get the script (in HTML) to work in the PHP environment. Here's what I have:
I've added:
<script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script>
just before the </head>
in index.template
The code that the author tells you to add for the clock is:
<h1>New Year 2007 Is Coming!</h1>
<p>
Counting down to New Year 2007: <span id="countdown1">2007-1-1 00:00:00 GMT+00:00</span>!
</p>
I've searched and can't find a way to get this to work how I want.
Any help would really be appreciated!
ok...I was wondering about this as well...in your index.template.php add the
<script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script>
exactly where you have it..
then find
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
</table>';
and paste below it:
echo '
<table cellpadding="0" cellspacing="0" border="0" align="right">
New Year 2007 Is Coming!<br>
Counting down to New Year 2007: <span id="countdown1">2007-1-1 00:00:00 GMT+00:00</span>!
</table>';
the <h1> and <p> will mess up the left side of your forum (more than likely)...take those out, and you should be OK.
Let me know if this helps...
That worked great! I bow before your superior intellect!...
DB
not superior intellect...but about 20 minutes of "trial and error" (mostly error...) ;D
is there anyway to make it countdown from a set event on the calendar and embed it in to a post?
O.