PHP and StoryLine.
Oct 15, 2015
I recently started working with StoryLine as part of my job as a developer. There was a need for 'storage' of some user input variables which would be loaded/saved/edited throughout various courses. For a couple of days I investigated passing variables to and from StoryLine and saving them via various methods including WebStorage and at one point using PHP on a pop out window to save them in session storage and then retrieve them via JS in SL (though this is where the limitation occurred as although I can iterate through webstorage to check the number of key/value pairs - you cannot dynamically create variables in StoryLine).
I thought there would be a much easier way to achieve this and I found it.
There is a method to embed php directly in to your storyline slides. All it takes is a simple 'dummy' HTML file with a redirect to a PHP page. Since the WebObject loads in an iFrame, there is no limit/error in this method.
I create a file named 'index.html' in a folder and in this same folder I place my php file. When the webObject loads in StoryLine it redirects to the 'login.php' file. This also allows you to insert the WebObject in to a StoryLine slide as a 'marker' for where the PHP will load/show results.
Hope this helps someone. I have checked on the discussion groups and haven't found anything related, so sorry if this topic has been covered previously.
Here is the PHP page showing in storyline :
Here is the simple redirect script :
<meta http-equiv="refresh" content="1;url=login.php">
window.location.href = "login.php"
If you are not redirected automatically, follow the <a href='login.php'>link</a>
This discussion is closed. You can start a new discussion or contact Articulate Support.