dmolsen / Detector

Detector is a simple, PHP- and JavaScript-based browser- and feature-detection library that can adapt to new devices & browsers on its own without the need to pull from a central database of browser information.
http://detector.dmolsen.com/
MIT License
844 stars 80 forks source link

Problem with perrequest #8

Closed b4z81 closed 7 years ago

b4z81 commented 12 years ago

Hi, first of all, thank you so muck for your great job.. i m testing the perrequest including the features.js.php into my head, what i get it s just a print of all the js code requried (modernizr, dpi and screenattributes). what s wrong?

thank you in advance

dmolsen commented 12 years ago

Can you copy out the code you're seeing into a Gist or a comment here? I think I understand what you're saying but I want to be sure we're on the same page. Thank you.

b4z81 commented 12 years ago

Hi, the gist: https://gist.github.com/2628930 i include the features.js.php inside the functions.php (the functions of the wordpress theme) and then opening the homepage i get the home.html code..

dmolsen commented 12 years ago

features.js.php needs to be called from a JavaScript tag like so:

Alternatively, you could modify your features.js.php file that you're already requiring so it outputs the script tags as well as the JS code.

I'll double check the docs to make sure I've written down the instructions correctly. I've been known to skip a step or two sometimes ;)

Hope this helps.

On May 7, 2012, at 1:03 PM, Stefano Guglielmireply@reply.github.com wrote:

Hi, the gist: git://gist.github.com/2628930.git i include the features.js.php inside the functions.php (the functions of the wordpress theme) and then opening the homepage i get the home.html code..


Reply to this email directly or view it on GitHub: https://github.com/dmolsen/Detector/issues/8#issuecomment-5554937

b4z81 commented 12 years ago

omg! thanks a lot! could i ask you another question? when i include just detector.php and then i print the dump of $ua on Chrome i can find also the screenattributes object but not on FF or IE..

tyssen commented 11 years ago

I don't know if it's just me, but I couldn't get features.js.php to set cookies until I added ?dynamic=true at the end.