brandonc503 Posted November 6, 2009 Share Posted November 6, 2009 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 More sharing options...
shacker Posted November 6, 2009 Share Posted November 6, 2009 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 More sharing options...
jennybeaumont Posted June 22, 2011 Share Posted June 22, 2011 Anyone know if this has changed since 2009? Just tried it to no avail Link to comment Share on other sites More sharing options...
shacker Posted June 22, 2011 Share Posted June 22, 2011 in version 1.4 with smarty 3, you cant use php tags in tpl Link to comment Share on other sites More sharing options...
jennybeaumont Posted June 23, 2011 Share Posted June 23, 2011 So how does one add custom PHP? I'm trying to add a stream to publish the number of Twitter and Facebook followers in the Footer...?!thnx!-jennyb Link to comment Share on other sites More sharing options...
Paul C Posted June 23, 2011 Share Posted June 23, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now