Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Adding in PHP code


Reply


2 Posts   1830 Views

Avatar
Magicmark

Community Member, 1 Post

29 April 2010 at 2:55am

I've just started looking into Silverstripe having developed a couple of sites in Wordpress and found it not quite fitting my needs. Open Source is great but a client will always ask for bits adding on.

So... I am looking a add a zip code locator such as 'Lookup Runner' to my silverstipe site http://www.lookuprunner.com does anyone know if this sort of thing is possible.

Thanks in advance

Avatar
mark_s

Community Member, 78 Posts

12 May 2010 at 9:53pm

Hi.

Yes, you can add PHP code from other sources into your SilverStripe site. A common practice is to create a "thirdparty" directory in your mysite folder (or module folder, if you're creating a module).

You may want to exclude that PHP code from being included by the manifest builder when a dev/build is run. This can be achieved by creating a file called _manifest_exclude in the folder that contains the third party code. (Note the leading underscore).

Then you can require() that code as requires in your site logic.

Mark