Skip to main content
Topic: [Theme] Lattice (Read 2771 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [Theme] Lattice

Reply #15
How can I change the displayed time on the index page in the 24-hour format?

index.template.php:
Code: [Select]
			<div id="time" class="floatleft"><i class="fa fa-clock-o"></i>
', standardTime(time(), '%d. %B %Y,'), '
<font id="clock">...</font>
<script>
refrClock();

function refrClock()
{
var d = new Date(),
s = d.getSeconds(),
m = d.getMinutes(),
h = d.getHours(),
am_pm;

if (s < 10)
s = "0" + s;

if (m < 10)
m = "0" + m;

if (h > 12) {
h -= 12;
am_pm = "pm";
}
else
am_pm = "am";

if (h < 10)
h = "0" + h;

document.getElementById("clock").innerHTML = h + ":" + m + ":" + s + am_pm;
setTimeout("refrClock()", 1000);
}
</script>
</div>

Re: [Theme] Lattice

Reply #16
This should do it, untested of course  O:-)
Code: [Select]
				<script>
refrClock();

function refrClock()
{
var d = new Date(),
s = d.getSeconds(),
m = d.getMinutes(),
h = d.getHours(),
am_pm;

if (s < 10)
s = "0" + s;

if (m < 10)
m = "0" + m;

if (h > 12)
am_pm = "pm";
else
am_pm = "am";

if (h < 10)
h = "0" + h;

document.getElementById("clock").innerHTML = h + ":" + m + ":" + s + am_pm;
setTimeout(function () {
"use strict";
refrClock();
}, 1000);
}
</script>

That still says am/pm which is useless, so change that  "+ s + am_pm;" to just "+ s;"
“The problem is not the problem. The problem is your attitude about the problem. Do you understand?” – Jack Sparrow

Re: [Theme] Lattice

Reply #17
Thank you, Spuds. It works perfect! :)

Re: [Theme] Lattice

Reply #18
Great looking theme, appears to function  perfectly

Re: [Theme] Lattice

Reply #19
Dunno why I haven't seen this yet, I actually like this one.

Re: [Theme] Lattice

Reply #20
I love this theme, but I don't like that the text is greyed-out when editing a post.  Is there any way to make the text while making a post black?

Re: [Theme] Lattice

Reply #21
I'm sure there is ... been a bit since I looked at this one, so let me get it refreshed a bit.
“The problem is not the problem. The problem is your attitude about the problem. Do you understand?” – Jack Sparrow

Re: [Theme] Lattice

Reply #22
Updated the zip file in the first post ... that should fix the color issue and update it to a 1.0.6 level of fixes.   

This has some new files due to font awesome changes etc ... So if you have not done any custom edits to the theme, I'd uninstall the theme, delete its directory, and then reinstall it as you need to remove old now unused files.
“The problem is not the problem. The problem is your attitude about the problem. Do you understand?” – Jack Sparrow

Re: [Theme] Lattice

Reply #23
Thanks!