PDA

View Full Version : [release] Clock


filburt1
12-03-2002, 10:00 PM
Author: filburt1
Description: Graphical clock
Demo: http://www.webdesignforums.net/?styleid=3
Screenshot: Attached to this post.

If you use this mod, you MUST put the following text in your footer:

Graphical clock by filburt1.

I put a lot of work into this seemingly simple mod and it's the least you can do :)

This is basically a graphical cloc. Configure the following variables within the file clock.php to make it match your forums:

$backgroundimage = "background.jpg"; // filename of background
// image (must be a .jpg); omit to make a
// 300x300 blank black image. The image must be
// square (i.e., 1:1 ratio)
$outercutoff = 9; // nothing will be drawn outside this padding threshold

// Following are cutoffs relative to $outercutoff
$minutescutoff = 10; // smallest distance the minute hand will ever be from the edge
$hourscutoff = 20; // smallest distance the hour hand will ever be from the edge
$realistichourhand = 1; // make the hour hand shift according to the minute when 1
$realisticminutehand = 1; // make the minute hand shift according to the second when 1
$minutescolor = "666666"; // hex color to use for minute hand, omit for white
$hourscolor = "666666"; // hex color to use for hour hand, omit for white
$tickscolor = "777777"; // hex color to use for the ticks, omit to omit the ticks
$textcolor = ""; // hex color to use for the text, omit to omit the text


You need PHP with the GD library to use this.

The files and instructions are coming up in the next post.

[edit] just adding in your copyright text - loo]

filburt1
12-04-2002, 01:49 AM
Instructions:

0zeo
12-04-2002, 10:20 AM
Thanks.

I like this hack

CannonFodder
12-04-2002, 02:48 PM
very, very nice. must say, good job. this is a must have for me

alkatraz
12-05-2002, 12:06 AM
Looks great!

Rose
02-14-2003, 03:28 PM
Many thanks again! *clicks install*

Bad Bunny
02-14-2003, 03:37 PM
I missed this somehow.

Rose
02-14-2003, 04:38 PM
I've a question - My server time is set to EST, which is what the clock is accordingly set to. However, almost ALL of my users are in CST. Is there a way to configure the clock to add/subtract an hour from the server? I've given a good look over clock.php, but I'm afraid I can't figure it out.

filburt1
02-14-2003, 04:45 PM
Try this (untested):

Find:

if ($hourspercent > 12) $hourspercent -= 12;

Before that, add:

$hourspercent += your GMT time shift;
if ($hourspercent >= 24) $hourspercent -= 24;

Rose
02-14-2003, 05:01 PM
Sweet. It worked.

/me curtseys

SSJ4Gohan
02-15-2003, 04:28 PM
Awsome hack you have here. I love it I might even put on my forum :p

phill2003
02-16-2003, 07:32 AM
i tried this but i just get a broken image do you think this means i dont have the gd library on my host

filburt1
02-16-2003, 01:05 PM
Possibly.

UraniumPearl
02-17-2003, 02:05 AM
i tried this but i just get a broken image do you think this means i dont have the gd library on my host


Which version of PHP are you using?

phill2003
02-18-2003, 05:07 PM
4.1

filburt1
02-18-2003, 05:08 PM
What's your forums' URL?

imported_subu1
02-21-2003, 04:09 PM
hi sorry my englisch is bad, and i live in Europe/Bonn. Who can i install this Hack. I dont understand the installation

greetz subu

filburt1
02-21-2003, 04:55 PM
Well I only know a bit of Spanish so good luck with that.

Delmon
02-25-2003, 01:53 AM
hi

my local time is 7:45 and the clock is giving me 11:15

how can i fix it please

Delmon
02-26-2003, 01:47 PM
where are you filburt1 ?

filburt1
02-26-2003, 01:49 PM
I'm not a god and on all the time and seeing every post...

Look at the fix I gave Rose.

Delmon
02-26-2003, 03:17 PM
$hourspercent += your GMT time shift;
if ($hourspercent >= 24) $hourspercent -= 24;


what do you mean by this (your GMT time shift)

imported_MALIGNO
02-26-2003, 04:03 PM
Yo lo instale sin cambiarle nada y me funciono, lo que lo quite por que me ocupaba bastante espacio, pero solo has de subir el clock.php a tu directorio del foro y poner el codigo <img src="clock.php?outputimage=1">
Las variables son de colores y demas.

saludos

filburt1
02-26-2003, 04:39 PM
No hablo espanol mucho, solo hablo ingles.

Vb-Hispano
02-26-2003, 05:32 PM
No importa aqui me teneis si me necesitais, antes como MALIGNO ahora como Vb-Hispano ;)

imported_Someguy
03-03-2003, 10:46 PM
hi

my local time is 7:45 and the clock is giving me 11:15

how can i fix it please

Change your time offset in your User CP? Seriously, I bet you tried that, and maybe the server's time is off.

filburt1
03-03-2003, 11:21 PM
The clock only goes by server time.

Gary W
03-12-2003, 07:22 PM
I can't seem to get this to work. I have php_gd.dll loaded, but it still doesn't show up (I just get a box with the red X).

Any idea?

filburt1
03-12-2003, 07:24 PM
If you installed the mod and the GD library correctly, the mod will work. 'Nuff said. :)

Gary W
03-12-2003, 07:28 PM
Didn't know you were around :p

Anyways, I got it fixed; I just didn't have a background.jpg and I left $backgroundimage = "background.jpg"; there :rolleyes:

It's all good now :D

Prankster
05-03-2003, 01:46 AM
i have a problem , and i dont know to fix them.

lokk a the attachment to see the Poblem.

greets Prankster

filburt1
05-03-2003, 01:47 AM
What's the problem?

Black Vivi
05-03-2003, 06:46 AM
k00l
wud be better to be an active one tho...
i got an active one, just it made in JavaScript, and it doesn't show a clock, just the digits

Prankster
05-03-2003, 08:23 AM
the problem is , that the numbers are not on the right position.

Did you not see this :D

in the clock.php i edit the hexcolors.

dstruct2k
05-06-2003, 10:38 PM
The numbers are in the best place they could be. If they were anywhere else they wouldn't be correct. If they bother you, disable them. I'm sure your users can live without them, and It might look better with no digits.

imported_subu1
06-07-2003, 04:31 PM
@Prankster wie hast Du das Ding eingebaut, hier steht doch nirgends ne vern?nftige Anleitung :mad:

hier hatte noch jemand Dein Problem, vielleicht kannst Du Ihm ja helfen;)

http://www.vbulletin-germany.com/forum/showthread.php?s=&threadid=5914

bis demn?chst :D

Loyalty4Life
04-08-2004, 10:51 PM
This isn't working for me. GD is installed and running. The problem is I don't know what to edit in clock.php. What am I supposed to do? Just upload clock.php into my directory? I don't have a background.jpg image BTW.

Any help is appreciated.

Also, I'm using vB3 Gold, FWIW.

filburt1
04-09-2004, 08:49 PM
Look at the large block of PHP code in the first post with comments describing each variable.

Loyalty4Life
04-09-2004, 09:47 PM
I did. I read the instructions. Do I have to edit anything in clock.php? Can I just upload it then put it in my header? Does this work for vB3?

Loyalty4Life
04-13-2004, 12:35 AM
Filburt?

filburt1
04-13-2004, 12:42 AM
You should not have to edit anything.

Yes, it works for vB3.

Loyalty4Life
04-16-2004, 04:00 AM
I uploaded clock.php into my forum direcory, and put <img src="clock.php?outputimage=1"> in my header. It does not work for vB3.

peterska2
10-19-2004, 04:41 PM
nice one

* me clicks install

Bounce
11-04-2004, 09:13 PM
I uploaded clock.php into my forum direcory, and put <img src="clock.php?outputimage=1"> in my header. It does not work for vB3.

Take out the background.jpg


$backgroundimage = ""; // filename of background

It will work after that :D

peterska2
11-05-2004, 09:03 PM
I just followed the instructions exactly when I did it and it worked first time. I created a clear gif 100x100 for the background.gif image so it will go with all my styles.