Page 1 of 1

Inserting PHP snippets into HTML code

Posted: Tue Feb 05, 2019 5:34 pm
by JPasnikowski
I was hoping to use a snippet of php to be able to have each node pull in its page content from an external file, but pano2vr apparently comments out any attempts to do so. Is there a way to enable PHP code?
Image
becomes:
Image

Re: Inserting PHP snippets into HTML code

Posted: Tue Feb 05, 2019 11:17 pm
by Tony
Hi Jason,

Check out my tutorial 'Hotspot Templates and iFrames' at https://tonyredhead.com/pano2vr/hotspot ... nd-iframes

In Step 5: Adding the Interaction there are details on how to use a .php url

cheers,

Tony

Re: Inserting PHP snippets into HTML code

Posted: Wed Feb 06, 2019 8:57 pm
by JPasnikowski
Thank you, Tony. I did know I can use iframes, but my concern is whether iframes interfere with designing for accessibility. But, I will try using iframes to see if it's non-issue.

Re: Inserting PHP snippets into HTML code

Posted: Wed Feb 06, 2019 9:18 pm
by Tony
Hi,

In the context of an iFrame within a Pano2VR project it shouldn't cause any issues. In a normal html page you need to add some basic information if you are using a screen reader.

https://dequeuniversity.com/tips/provide-iframe-titles

What level of accessibility are you trying to provide?

Tony

Re: Inserting PHP snippets into HTML code

Posted: Thu Feb 07, 2019 4:13 pm
by JPasnikowski
Keyboard navigation is my current focus. An issue I've been running into so far is being able to tab to a content box that needs to be able to be scrolled... But if the content inside the iframe can be tabbed to without using a mouse to get focus, then I should be good. I just realized... I can simply create my own tab-able div... sometimes the most obvious solution takes time to bubble up!

Re: Inserting PHP snippets into HTML code

Posted: Thu Feb 07, 2019 5:02 pm
by JPasnikowski
Alrighty, so simply adding a <div tabindex="0"> into the text box allowed the section to be tabbed to so scrolling can be done with the arrows. Even so, I would still like to know how to disable the disabling of inserted PHP code as I can think of other uses for being able to embed snippets.