[pmwiki-users] A fundraising thermometer (PHP script to draw an image) within pmwiki

David Sovinski aslan at aslandata.com
Wed Nov 30 15:40:43 CST 2005


Wendell
So is
http://www.arkie.net/~scripts/thermometer/
your web site? If so I can link to it as I describe how it was activated 
in pm-wiki. I am much more likely to look for new scripts to include on 
my sites with the help you and others gave me to get the thermometer 
going and I want to record the simple process. So I'll look for an 
appropriate(sic) place put it up on pm-wiki and then send an email so 
others can verify the instructions and experiment.

The site where I use the thermometer is a political site in Minnesota 
http://www.olmstedgop.org/pmwiki/pmwiki.php

The burst doesn't have to knock our socks off, just show that the goal 
has been exceeded. 16,000,000 colors, dancing monkeys, and a 32 piece 
brass band will suffice for the burst :-)
I forgot about having to scale the process. I can see where that could 
be fun to code.

Thanks again for your help. It was a good learning experience.

David Sovinski (Caspian)

Wendell Brown wrote:

>
>>
>> This fundraising thermometer has definately impressed some people at 
>> our sight. Thanks! We are almost at 75% of our fundraising goal.and 
>> it is fun watching it grow.
>
>
> I don't suppose you would be willing to share the URL of your site so 
> it can be seen in action?
>
>> Two questions
>> 1) Would it be appropriate to add this script to pm-wiki site with 
>> notes on how to get this type of PHP script working? I would like to 
>> do that for part of my contribution to pm-wiki in general and this 
>> script in particular. If it should be put on the site with 
>> instructions where should I put it? It's a pretty short script so I'd 
>> probable include the code in the text.
>
>
> I think it would be fine.  As to where to put it, I don't really know 
> - it's not really a cookbook (well maybe).  I would prefer that the 
> source not be copied here (a link to my site would make sure that 
> people would always get the most current version).
>
>> 2) Would anyone know how to add a couple of lines of code to make it 
>> look like the thermometer is bursting out the top whenever the 
>> "Current" excedes the "Goal"?
>> the code, currently, is at     
>> http://www.arkie.net/~scripts/thermometer/
>
>
> This can certainly be done.  I can think of  a couple of ways to code 
> it....
>
> 1)  Use GD commands from PHP to draw the "burst".  This is probably 
> the cleanest, but I'm not sure that it's ever going to knock your 
> socks off (or if it does, it's going to take a BUNCH of code).
>
> 2)  Merge a predesigned burst with the generated thermometer.  This 
> could be a cool solution, but it has a couple of down sides - first, 
> if you want to keep the script generic it will have to scale (not 
> easy) and second I don't think it's going to be easy to make the burst 
> move (come on, you know you had already thought of it) - the graphic 
> that is being generated is a PNG image and there isn't a standard 
> animated PNG format.  I guess you could change the format to GIF (you 
> would need to see if GIF support is available in your version of GD - 
> http://php.net/gd) but....
>
>





More information about the pmwiki-users mailing list