Hello,
For a site i'm making i wanted a browser update checker, some users still are using an outdated browser that will screw up the template.
So i used this droplet to warn people that they are using an older browser, and it will advice people to update to a more secure (and better template supported) version.
It's making use of an external javascript hosted on the site who provides the latest version, and they update it for the latest browsers
droplet code:
return'<script type="text/javascript">
var $buoop = {
vs: {i:6,f:2,o:9.63,s:2,n:10}, // browser versions to notify
reminder: 24, // atfer how many hours should the message reappear 0 = show all the time
onshow: function(infos){}, // callback function after the bar has appeared
l: false, // set a language for the message, e.g. "en" overrides the default detection
test: false, // true = always show the bar (for testing)
text: "'.$text.'", // custom notification html text , leave blank for default
newwindow: true // open link in new window/tab
}
$buoop.ol = window.onload;
window.onload=function(){
if ($buoop.ol) $buoop.ol();
var e = document.createElement("script");
e.setAttribute("type", "text/javascript");
e.setAttribute("src", "http://browser-update.org/update.js");
document.body.appendChild(e);
}
</script>';
i used the following name, you can save it as you like. Place the tag anywhere in you index.php to warn the visitor on every page, or in a wysiwyg page to warn them only with that page.
[[browsercheck]]
I may look into some changes to give the droplets some parameters, but for now this does work just fine for me. More info on the
browser-update.org siteedit 1: added a parameter for the text, use
[[browsercheck?text=your text here]]
to add you own text, if you leave this blank it will use the default
Hope this comes in handy for some of you.
Kind regards,
Michel