21309 Posts in 5738 Topics by 2603 members
|Go to End|
31 August 2009 at 3:49am Last edited: 2 September 2009 6:16am
I'm trying to implement a 3rd party class that contains User Agent detection functions. I assume implementing it is more complex than just copying the file into mysite/code and using a standdard PHP include statement. I want to be able to call it in the Page_Controller so I assume it actually needs to extend one of the other Controllers to use it however, I can't find any documentation on how to this.
31 August 2009 at 9:12am Last edited: 31 August 2009 9:13am
You can do it a couple of ways. If you put it in your mysite folder then SS will include it automatically for you. You don't need to change / include anything, SS will 'know' where it is. You might need to do a ?flush=1 to make sure this works.
Or second option - if the autoloader doesn't work, eg if the classname doesn't equal the filename or if you have multiple class's in the same file you can put the file in its own folder with a '_manifest_exclude' blank file and then use the normal php include or require tag to include your file just as normal.
31 August 2009 at 12:27pm
Okay, thanks, that's what I thought, I think the problem was that the class name and file name had an underscore in it.
|Go to Top|