Using images that can automatically change based on your needs

olin lagon
Posts: 12
Joined: 2008-01-29
User is offline
Using images that can automatically change based on your needs

If you want to place an image in your Sprout that you want rotated out, you can use a dynamic image. First create a script that returns an image. Then add &t=t.jpg to the end of your script's URL (Sprout requires that the last 4 digits of an image be .jpg/.png/.gif). The script I wrote for the Kanu widget is:

http://www.kanuhawaii.org/xxx/getThumbnail.php?position=1&t=jpg

Position 1 means get the latest member. If I changed that to position 2 it would be the second newest member. I then created ten image boxes each with the same URL above except for the position number. When run, the script redirects to the correct jpg file based on the position number. (Note this script above won't run as I changed a couple of things for security reasons).

Austin N.
Posts: 313
Joined: 2008-01-29
User is offline

h4x0r!

Jason Whatley
Posts: 6
Joined: 2008-02-14
User is offline

Wicked, wicked, wicked awesome.

Kimberlee Johnson
Posts: 31
Joined: 2008-03-16
User is offline

For those of us that are newbies that sounds awesome but very intimidating.

Austin N.
Posts: 313
Joined: 2008-01-29
User is offline

Here another idea that could improve upon this:

someone logs into your website
store their session cookie in their browser
they navigate to a page with a sprout on it
that sprout contains an asset like the one above, but your script also checks for the session cookie and returns an image depending on the cookie... of that particular user

i wish i had time to test this theory out. any volunteers? :)

tecHead gHost
Posts: 2
Joined: 2008-03-20
User is offline

I've done something similar to this on different occasions using FlashMX™; thus the theory is sound. However, it would more than likely be a better choice to track the username through a database connection.

Cookies are controlled by the enduser and don't give the site owner full control; as they can be easily deleted or even turned off. Some sites 'force' the enduser to turn cookies on; yet, this seems counter productive from a sales point because the cookies being turned off in the browser would have been 'deliberate' (not an accident).

Tracking the actual username allows the site owner to not only have full control, but would also open other opportunities to port more information; (from the database); to the Sprout. Thus making it even more interactive and engaging to the enduser.

Hope this helps...
tecHead

lowspark (not verified)
Posts: 572
Joined: 1969-12-31
User is offline

for some of us not so techy people can we get some one to go into a little more detail on this?

Michael (not verified)
Posts: 572
Joined: 1969-12-31
User is offline

Using sessions will not work because the widgets use a proxy. Your server never sees the actual viewers at all.

Graydon Peters
Posts: 40
Joined: 2008-02-14
User is offline

thanks for posting this tip... it is just what I was trying to figure out.

Danny Nguyen
Posts: 1
Joined: 2008-07-27
User is offline

Is it possible to pass in the image URL as one of the parameters in the embed code? This is a bit more flexible.

Austin N.
Posts: 313
Joined: 2008-01-29
User is offline

Hello Danny,

I'm sorry, we're don't currently support letting you customize your embed code with flashvars, however that has been a hot topic and we are investigating ways to do this in the future. Please stay tuned.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.