View Full Version : editable counter
02-27-2007, 08:27 PM
i am looking for a script where my visitors can generate an output which counts up from a given date and time until this day, and shows it in a banner-like picture. it's gonna be a sobriety-counter. so every visitor would like to be able to generate their own counter, and then show it in their signature on the forum.
maybe one of you have seen this script on f.e. birthday-pages, or pregnancy-communities. (like snugglepie.com)
i have also php and mysql-fascilities, for if its worth to know..
thanks in advance
every help is appreciated!
02-28-2007, 06:42 AM
02-28-2007, 07:25 PM
oke thanks for the suggestion!
02-28-2007, 09:34 PM
Depending on how complex you want to make it, this is very simple, really.
Use a database, store the users' date(s), then just subtract date-time() (where time() is the function for current time) and you have the amount of time until it hits the goal.
basic php/mysql info there... should be plenty for this.
http://www.php.net and search for "date" (and time) in the function search box near the top.
That should be enough to get you started.
03-01-2007, 12:09 AM
oke thanx, i'm gonna read and practice
for later-on: any idea how to get this on an image in a bannerlike-way? so one month or 6 months can be visualy shown on this?
03-01-2007, 04:25 AM
the PHP GD library can do this.
Look up imagejpeg() on the PHP site to get a start on image functions and look around for related into. That gets complex quickly and it's also kinda buggy with a lot less help than normal functions. However, it's very cool too.
Another idea would be to use the banner as a background and the text in that div/cell/etc.
But... if you do need the image, there are ways with PHP... just takes some time.
03-01-2007, 04:46 AM
03-01-2007, 09:36 AM
Rendering an image with JS?
Do you just mean creating it by piecing together number chunks? You could do the same with PHP.
Or does JS actually have some real image ability?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.