How does one create their own dynamic graphic? |
How does one create their own dynamic graphic? |
denmarks |
Oct 7 2013, 11:47 AM
Post
#1
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
I am referring to the type of graphic used in countdown clocks. Parameters are passed to a URL and a graphic is returned that is created using the parameters. Where would I even start looking for information on creating such a script?
I do not want a site that does it for me. There are hundreds of those sites. I want to know how they do it. This post has been edited by denmarks: Oct 7 2013, 11:55 AM |
jimlongo |
Oct 7 2013, 12:22 PM
Post
#2
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
The best solution I've found is this jQuery plugin "Countdown".
It's basically 10 small images ( zero to nine ) Javascript that rolls the numbers over every second. It's pretty easy to customize and use if you know a little css. You need to download the script and the underConstruction packages (to get the images). If by "want to do it yourself" you mean code it yourself, well, if you know enough javascript/jQuery to do that you probably don't need me to give you the psuedo code, but you could look at his script to get an idea of how it's done. This post has been edited by jimlongo: Oct 7 2013, 12:27 PM |
denmarks |
Oct 7 2013, 01:07 PM
Post
#3
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
Let me clarify. I want to call the URL from ANY website and a graphic is returned to display at that website. The contents of the graphic is dynamic and changes based on the parameters. It is trivial for my own website since I can easily run a Javascript or Jquery to do it. How does one run a script independent of a website? Look at countdown clocks that are included in signatures on many forums. They basically insert a graphic but the call includes parameters which alter the graphic.
|
jimlongo |
Oct 7 2013, 01:23 PM
Post
#4
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
I'd suspect that's flash.
I can put the clock on a webpage, but most forums won't let you display html in a sig will they? |
Christian J |
Oct 7 2013, 01:24 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Let me clarify. I want to call the URL from ANY website and a graphic is returned to display at that website. Not sure I understand. Do you want to see a countdown on other peoples' sites that you visit? Then you might use a bookmarklet script. You'll only see the countdown yourself, of course. QUOTE How does one run a script independent of a website? Look at countdown clocks that are included in signatures on many forums. They basically insert a graphic but the call includes parameters which alter the graphic. In that case the graphic is created on the fly by the server hosting it. I've never seen countdowns in signatures (maybe because I disable animated GIFs --can you link to an example?), but I have seen graphics displaying e.g. your IP, which is sent when you request the graphic. |
Brian Chandler |
Oct 7 2013, 01:27 PM
Post
#6
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
Let me clarify. I want to call the URL from ANY website and a graphic is returned to display at that website. The contents of the graphic is dynamic and changes based on the parameters. It is trivial for my own website since I can easily run a Javascript or Jquery to do it. How does one run a script independent of a website? Look at countdown clocks that are included in signatures on many forums. They basically insert a graphic but the call includes parameters which alter the graphic. At least some of your question doesn't really make sense: "How does one run a script independent of a website?" for example. But perhaps you simply want to know how a URL can provide a variable image, depending on parameters passed? The answer is very simple: the URL accesses a program which generates the appropriate image, and sends it. You can do this quite easily in PHP using the GD library, or you can use the Google chart api if you don't want to do everything from the bottom level. Does this answer your question? |
denmarks |
Oct 7 2013, 02:31 PM
Post
#7
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
The answer is very simple: the URL accesses a program which generates the appropriate image, and sends it. You can do this quite easily in PHP using the GD library, or you can use the Google chart api if you don't want to do everything from the bottom level. Does this answer your question? This is exactly what I meant. I assume there is no easy way without learning PHP. I did a quick look at Google Chart it is seems to be something you insert into your own website. I guess there is no easy way. What I wanted to do was create an image that I would place in my signature on another forum that would be my own design of a countdown until a cruise. I did not want to use the boilerplate counters that are available. |
jimlongo |
Oct 7 2013, 02:43 PM
Post
#8
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
Like I said many forums allow flash in signatures, that's the only way any smart forum would allow such a thing.
If they allowed html (other than links) php and javascript in signatures all hell would break loose. |
Brian Chandler |
Oct 7 2013, 11:22 PM
Post
#9
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
The answer is very simple: the URL accesses a program which generates the appropriate image, and sends it. You can do this quite easily in PHP using the GD library, or you can use the Google chart api if you don't want to do everything from the bottom level. Does this answer your question? This is exactly what I meant. I assume there is no easy way without learning PHP. I did a quick look at Google Chart it is seems to be something you insert into your own website. I guess there is no easy way. What I wanted to do was create an image that I would place in my signature on another forum that would be my own design of a countdown until a cruise. I did not want to use the boilerplate counters that are available. This still seems a bit confused, and it seems to me some of the other comments are also confused. (How would it help to use Flash? Do forums let you embed[?] Flash, but not write an <img> tag or the URL of an image?) If you can write the URL of an image, then it can be an image you generate dynamically. Generally if the image is in PNG format (for example), the URL will need to be something.png, but this can happily be a php script. (You have to cope with even more confusion: typical OS behaviour is to tell you that a php script is of "type" PNG, if its name happens to be something.png, but this just means "This filename ends in .png and it is thought helpful to misbelieve this means it is a PNG image.") The script could for example just generate the appropriate Google chart url, and pass this file through. The script does also need to send appropriate MIME headers. HTH |
Lo-Fi Version | Time is now: 24th April 2024 - 08:46 AM |