Jump to content

Where to put custom php code...?


Recommended Posts

Where do people put any custom code they have for PS that will not go in tpls in themes folder.. should i put in header so is referenced for all pages so that i only have to move themes and header.php.. or should i note where i make changes cause i will have to make changes to fresh install exactly where i edited old files? should i make new php file in themes and have it referenced from header.php or is there someother way to manage changes i make to PS so reinstalling a fresh copy but having all my tweaks is easier then finding some change i made in old version that i have not updated to fresh copy untill i find it?

Link to comment
Share on other sites

Where do people put any custom code they have for PS that will not go in tpls in themes folder.. should i put in header so is referenced for all pages so that i only have to move themes and header.php.. or should i note where i make changes cause i will have to make changes to fresh install exactly where i edited old files? should i make new php file in themes and have it referenced from header.php or is there someother way to manage changes i make to PS so reinstalling a fresh copy but having all my tweaks is easier then finding some change i made in old version that i have not updated to fresh copy untill i find it?


In the tpl files, use {php}PHP CODE {/php}
Link to comment
Share on other sites

  • 1 year later...

Jennyb,

You can either obtain/write a module or you could try using my "plugin" mod to add the code that way. One of the things I use my code for is adding css and js to the header in such a way that it can take advantage of the CCC functionality in 1.4 (if you just hard code them in header.tpl they'll just be ignored for minimising etc.).

I'm writing up some examples such as this right now, so if you want to send me the code you're trying to implement (via PM), then I could look at including it as a "How-To" example :)

Paul

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...