Inserting PHP snippets into HTML code

Q&A about the latest versions
Post Reply
User avatar
JPasnikowski
Posts: 62
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

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
Image
Jason Pasnikowski
https://www.eyebulb.tours
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

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
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
JPasnikowski
Posts: 62
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

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.
Image
Jason Pasnikowski
https://www.eyebulb.tours
User avatar
Tony
Posts: 1341
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

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
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
JPasnikowski
Posts: 62
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

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!
Image
Jason Pasnikowski
https://www.eyebulb.tours
User avatar
JPasnikowski
Posts: 62
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

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.
Image
Jason Pasnikowski
https://www.eyebulb.tours
Post Reply