autoStart with cookie

Page: 1

Author Post
JIK
Guest
First I have to say I am very happy for your work with Floatbox.

Now my suggestion for a new feature to Floatbox.

It would be very useful if there would be a choice in rev-attributes like autoStartOnce:true. It should be done with cookies and there should also be an individual attribute for that particular object with the autoStartOnce:true attribute.

With this feature you can add ads to your website without annoying users by constant ad flow.

What do think of this?

-JIK-
Administrator
Registered: Aug 2008
Posts: 3382
autoStartOnce would be a reasonable capability to add and would be fairly easy to code. It's probably more useful than the existing autoStart functionality (aka, autoStartEveryTime). The challenge I have, and hopefully people can help with suggestions, is the definition of "once". Does this mean ever, today, this browser session, or ??? My first inclination is to set it as a session cookie which clears when the browser is closed.

Note that you can fake this capability in the current version with a couple of parameters passed in a query string. http://floatboxjs.com/demo.php?autoStart=courthouse.jpg&loadPageOnClose=demo.php
This autoStarts the item based on the href and reloads the page without the query string on completion. I'm mentioning this just as an FYI. I understand the drawbacks of this approach and am not suggesting that it's a suitable substitue for an autoStartOnce option.

Let me know what you think about the duration of "once".
JIK
Guest
Maybe a session cookie would be most suitable.

Although there could also be an alternative attribute for cookie's expiration like autoStartOnce:true expires:1

For example:
0 = session cookie (default)
1 = today
2 = in a week
3 = never

and if expiration attribute is not set default expiration time would be used.
Administrator
Registered: Aug 2008
Posts: 3382
I've implemented this as a simple variant on the existing autoLoad option. autoLoad:once is recognized and uses a session cookie for tracking. This was simple to implement in just a few lines, session is probably the most useful duration, and this usage is easy to document and communicate.

In the next minor release.
Thanks for the suggestion.
JIK
Guest
Sounds great. I am waiting for the release (or the code lines) to get on testing it.

BTW: Here is my version for the Finnish language translation.
// Finnish
{
"hintClose": "Poistu (paina: Esc)",
"hintPrev": "Edellinen (paina: ?)",
"hintNext": "Seuraava (paina: ?)",
"hintPlay": "Toista (paina: v?lily?nti?)",
"hintPause": "Tauko (paina: v?lily?nti?)",
"hintResize": "Suurenna/pienenn? (paina: Tab)",
"imgCount": "Kuva %1 / %2",
"nonImgCount": "Sivu %1 / %2",
"mixedCount": "(%1 / %2)",
"infoText": "Info...",
"printText": "Tulosta..."
}

Don't be disturbed of those obscure (left and right arrow) chars . :D
« Last edit by Unknown on Thu Oct 30, 2008 1:45 pm. »
netslider
Guest
So will we be able to set a session duration in the next release? Thanks!

Page: 1