[ALLY] Re: Ready-to-use graphiacal web counter ?
[1/12] from: carl::rebol::com at: 19-Jun-2001 12:32
I think Bo wrote one of these a while back.... Should be pretty easy to. About ten lines, my guess. At 6/19/01 04:53 PM +0200, you wrote:
[2/12] from: jean:holzammer:faedv-n:bayern at: 19-Jun-2001 16:53
Hi, I wonder if someone here has already made a graphical webcounter I could use. For each chiffre (0..9) a separate image file should exist (0.png...9.png). A function should exist that gets a number (125351) representing the current count as input and produces an image or image file showing a graphical representation of this number. ? Jean
[3/12] from: cyphre:volny:cz at: 20-Jun-2001 9:23
> Can we put code into an index file anywhere? > In the effect block of an icon? > I don't think we can at the moment. >
I think this is not allowed due to security reasons ;-) Looks like RT did another dialect just for index files which filter-out any code. Cyphre
[4/12] from: gchiu:compkarori at: 20-Jun-2001 9:35
On Tue, 19 Jun 2001 12:32:18 -0700 Carl Sassenrath <[carl--rebol--com]> wrote:
> I think Bo wrote one of these a while back.... Should be > pretty easy to. About ten lines, my guess. >
There is a counter and gif number generator at http://www.rebol.org/cgi/index.html What I would like to see is a counter I can use for my rebsite. I tried setting the image of an icon to a cgi script that returned a gif image, but View objects :-(
> At 6/19/01 04:53 PM +0200, you wrote: > >Hi,
<<quoted lines omitted: 10>>> >representation of this number. > >
-- Graham Chiu
[5/12] from: cyphre:volny:cz at: 20-Jun-2001 9:45
Hi Brett, could you show me how to do it ?
[6/12] from: arolls:bigpond:au at: 20-Jun-2001 15:33
You could use draw dialect to draw a segment display for the icon. read http://www.nwlink.com/~ecotope1/index.r for an example of draw dialect to create icon images. Can we put code into an index file anywhere? In the effect block of an icon? I don't think we can at the moment. chiffre = "figure", by the way. Anton.
[7/12] from: brett:codeconscious at: 20-Jun-2001 17:43
Actually you can put code in. But it doesn't work very well. So if it was done for security reasons, then there is a hole. Brett.
[8/12] from: brett:codeconscious at: 20-Jun-2001 18:30
Cyphre, When I was playing with this I got View to crash quite convincingly but intermittantly. So I stayed away suspecting that by putting it in an index file I could be crashing my visitors Views without me knowing. Basically it came down to using a draw effect. Using the draw dialect draw an image. Now for the value of the image use an expression..... Brett.
[9/12] from: gchiu:compkarori at: 20-Jun-2001 20:49
On Wed, 20 Jun 2001 15:33:20 +1000 "Anton" <[arolls--bigpond--net--au]> wrote:
> You could use draw dialect to draw a segment > display for the icon.
Got it. See http://www.compkarori.com/cgi-local/index.r for a working example of a counter. -- Graham Chiu
[10/12] from: allenk:powerup:au at: 21-Jun-2001 0:58
FYI. On a similar topic. Just looked at the weblogs and found I've had 2001 hits on my index.r in the last two months. I take index.r as the best one to go by since it isn't cached when someone is live. Other scripts are averaging 500 hits each. Mainly all windows users too. Cheers, Allen K
[11/12] from: jean:holzammer:faedv-n:bayern at: 22-Jun-2001 8:56
>You could use draw dialect to draw a segment >display for the icon. >read http://www.nwlink.com/~ecotope1/index.r >for an example of draw dialect to create >icon images.
This seems to be a good approach. I could do something like this: 1.dynamically creating a layout with effect,draw and some load %image 2.viewing this layout 3. main-face: system/view/screen-face/pane/1 4. save/png %/temp/counter_image.png to-image main-face 5. image-data: read/binary %/temp/counter_image.png 6. print "Content-Type: image/png ^/" 7. print image-data The problem with this is that 3. will need the layout to be actually viewed. But I cannot/shouldn't do that on the web server. Is there a way to interpret the layout/creating the face without actually viewing it , sth. like view/invisible ? Jean
[12/12] from: joel:neely:fedex at: 22-Jun-2001 14:17
Hi, Jean, Holzammer, Jean wrote:
> I wonder if someone here has already made a graphical > webcounter I could use.
<<quoted lines omitted: 3>>> an image or image file showing a graphical > representation of this number.
The quick-and-dirty way to do this without constructing a graphical image for each hit is to have the separate digit images (as you mentioned above) and compose a table which has all of the appropriate digit images side by side. For example, for hit number 1046, you'd construct this: 8<-------------------------------------------------------------------- <table cellpadding=0 cellspacing=0 border=0 width=100%> <tr> <td align=left>contact info or whatever...</td> <td align=right><img src="1.png"><img src="0.png"><img src="4.png"><img src="6.png"><img src="hits.png"></td> </tr> </table> 8<-------------------------------------------------------------------- (Pardon the wrapped line -- set off by blank lines -- but it's necessary, for the following reason.) Placing the image tags consecutively without intervening whitespace (including linebreaks) causes them to display without gaps. For all practical purposes, the visitor can't tell (without viewing the html source) any difference between this and a dynamically- constructed image containing all the digits in one .png file. -jn- It's turtles all the way down! joel'dot'neely'at'fedex'dot'com
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted