Inserting PHP snippets into HTML code

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

Inserting PHP snippets into HTML code

Post by JPasnikowski » Tue Feb 05, 2019 5:34 pm

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: 649
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Re: Inserting PHP snippets into HTML code

Post by Tony » Tue Feb 05, 2019 11:17 pm

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: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/

User avatar
JPasnikowski
Posts: 59
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

Re: Inserting PHP snippets into HTML code

Post by JPasnikowski » Wed Feb 06, 2019 8:57 pm

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: 649
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Re: Inserting PHP snippets into HTML code

Post by Tony » Wed Feb 06, 2019 9:18 pm

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: http://tonyredhead.com - http://redsquare.com | roundme: http://round.me/@tonyredhead | instagram: https://www.instagram.com/tonyredhead/

User avatar
JPasnikowski
Posts: 59
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

Re: Inserting PHP snippets into HTML code

Post by JPasnikowski » Thu Feb 07, 2019 4:13 pm

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: 59
Joined: Fri Apr 22, 2016 10:42 am
Location: Newark, NY, USA
Contact:

Re: Inserting PHP snippets into HTML code

Post by JPasnikowski » Thu Feb 07, 2019 5:02 pm

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

Who is online

Users browsing this forum: panox and 17 guests