Jump to content

Recommended Posts

Posted

Hi All,

 

I hope the strange title grabbed your attention - I wasn't very sure how to ask the question!

 

Basically, I want to be able to boot up a computer and have it autostart a html page in kiosk mode (and I've managed to get that far!), but then for the html page to have some code in it which polls the computers date and redirects to a date-specific webpage.

 

E.G.

- Computer turns on and autostarts index.htm in kiosk mode (I can already do this)

- index.htm has code which polls the computers date

- the poll result then allows an automatic redirection from index.htm to monday.htm or tuesday.htm etc

 

Do any of you ultra clever coders know a way of achieving this?

 

Many thanks,

Posted

$day = date("w");

switch($day){
   case 0:
       include("sunday.php");
       break;
   case 1:
       include("monday.php");
       break;
   case 2:
       include("tuesday.php");
       break;
   case 3:
       include("wednesday.php");
       break;
   default:
       include("nodate.php");
       break;
}
?>

 

Like that? PHP that is...

  • Thanks 1
Posted

This should do - stick it in a blank HTML page.

 

<!--<br />
// ***********************************************<br />
// AUTHOR: WWW.CGISCRIPT.NET, LLC<br />
// URL: http://www.cgiscript.net<br />
// Use the script, just leave this message intact.<br />
// Download your FREE CGI/Perl Scripts today!<br />
// ( http://www.cgiscript.net/scripts.htm )<br />
// ***********************************************<br />
<br />
function initArray() {<br />
	this.length = initArray.arguments.length;<br />
	for (var i = 0; i < this.length; i++)<br />
	this[i+1] = initArray.arguments[i];<br />
}<br />
<br />
var weekDayArray = new;<br />
initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");<br />
var today = new Date();<br />
var day = weekDayArray[today.getDay()+1];<br />
<br />
if (day == "Monday") window.location = "Monday.htm"<br />
if (day == "Tuesday") window.location = "Tuesday.htm"<br />
if (day == "Wednesday") window.location = "Wednesday.htm"<br />
if (day == "Thursday") window.location = "Thursday.htm"<br />
if (day == "Friday") window.location = "Friday.htm"<br />
if (day == "Saturday") window.location = "Saturday.htm"<br />
if (day == "Sunday") window.location = "Sunday.htm"<br />
//--><br />

 

Source: CGIScript.net :: Automate your website for less!

  • Thanks 1
Posted

Wow that was a quick response - thank you all!

Webman I'll give yours a go but it certainly looks like it will do the job - thanks!

 

(For those keeping an eye on recent posts this is for my in-house digital signage solution - one day soon I'll upload some screenshots!)

Posted

Not sure if you can achieve this with HTML, but if you got the machine to run this little VBS script at startup, and named the files 2.html, 3.html, 4.html etc. (VBS returns Sunday as day 1) then it would open up the correct file on the correct day.

 

Set WshShell = WScript.CreateObject("WScript.Shell")

file = "C:\PATH\" & WeekDay(Now) & ".html"

WshShell.Run file

 

Mike.

  • Thanks 1
Posted
Not sure if you can achieve this with HTML, but if you got the machine to run this little VBS script at startup, and named the files 2.html, 3.html, 4.html etc. (VBS returns Sunday as day 1) then it would open up the correct file on the correct day.

 

Set WshShell = WScript.CreateObject("WScript.Shell")

file = "C:\PATH\" & WeekDay(Now) & ".html"

WshShell.Run file

 

Mike.

 

That is actually probably a better idea for the digital signage screens - I'll give that a go :)

(Webmans example will still be useful as I plan to "network" our digital signage and have available on Moodle)

Posted
That's what I'm using to run 4 screens at the moment, works like a charm :)

 

Mike.

 

I did - infact I have residual error messages clogging up my win7 machine where I installed it as a test lol. It looked promising but wasn't as customisable as I wanted, so as I'd half produced my own I continued with that.

 

Although it's blurred for anonymity the screenshot gives the idea! Large video section, scrolling daily messages and two advert areas.

 

(Once it's finished 100% i'll make up a generic template and possibly make available if I can confirm all codes are free to distribute etc)

mb2k01signage.png

Posted

Ok; let's be really flash :-) (well, a little bit ...)

Set WshShell = WScript.CreateObject("WScript.Shell")
file = "C:\PATH\" & weekdayname(WeekDay(Now)) & ".html"
WshShell.Run file

 

and then you can have "monday.html", "tuesday.html" etc

  • Thanks 1
Posted
Hmm, I just installed Xibo in ten minutes flat (having seen it but not played with it before), very impressive (we have our first sign going on the wall.. well, when somebody decides where).
Posted

This is a screen shot of one of our screens powered by Xibo, scrolling news across the bottom (RSS feed from BBC) 2 small areas and 1 large area for whatever content you want - Power point, text, images, web pages, flash objects - xibo will display them all.

 

The key to making digital signage work is keeping it simple, and producing a good template to use for all the screens for consistancy.

enterprise.JPG

Posted
Hmm, I just installed Xibo in ten minutes flat (having seen it but not played with it before), very impressive (we have our first sign going on the wall.. well, when somebody decides where).

 

Ha, same problem here. WE were going to do it over the summer but now there is uncertainty about where to install it or even what information will be displayed so on hold!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...