How to integrate an existing php file into CMS Made Simple

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

How to integrate an existing php file into CMS Made Simple

Post by Essie »

Is it possible to embed a php script into CMS?  I am stuck with this one supposedly simple php file. I want to incorporate it into CMS so that I don't need to change it's template but I can't seem to get it work properly even with using User Defined Tags. 

So far I created a new User Defined Tag as "czodiac" for the php codes that are above the tag.  Then in my template, I simply add {czodiac} before the tag.  But my problem is what do I do with the rest of the embedded php codes?  I tried using the {literal}{/literal} but they don't work. 


Below is the file I am talking about.  I've truncated it a lot to make it easier for you to see quickly what I want to do.  Any help or suggestion is appreciated.
Last edited by Essie on Mon Dec 11, 2006 2:29 am, edited 1 time in total.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: How to integrate an existing php file into CMS Made Simple

Post by Dee »

Essie wrote: what do I do with the rest of the embedded php codes?
Also put them in a UDT, or (enable and) use {php} tags:
http://wiki.cmsmadesimple.org/index.php ... r_Template

Regards,
D
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

Re: How to integrate an existing php file into CMS Made Simple

Post by Essie »

Thanks Dee,

I did tried both using {php} tags and changing the config.php setting as instructed but no dice.  For some strange reason, I manage to make the CMSms show up the php user define tags but the problem is that the script is not working properly.  The script is using an if else statement and it's showing the one but not the other.  I hope I am making some sense here.  I am not very good with php script.

Here is what I did.  I must be missing a step somewhere 'coz when I run the script as is without embedding into CMSms, it works fine.  Just don't work at all when I embed.  So I would need some coaching. I probably missed some steps or wrote something wrong.  Based on the above coding that I showed you earlier, here is what I did to fit into using the user define tags.

First I created a user defined tag called "czodiac" to be added above the tag at my template page.  That's very easy.  No problem.
Then, I tried to add the if else statement which is a bit tricky 'coz CMSms keeps giving me error if I use the tag even though I had already changed my config.php file setting to true instead of false as taught.  So here is my revised one to make it work.  Could you please check it out for me to see if I made any typo error? Thanks.
Last edited by Essie on Mon Dec 11, 2006 2:30 am, edited 1 time in total.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Essie
Forum Members
Forum Members
Posts: 27
Joined: Sat Jan 21, 2006 8:13 pm

Re: How to integrate an existing php file into CMS Made Simple

Post by Essie »

I found another effective way to embed php file into CMSmadesimple. That is to use the {embed} tag instead and enclose the existing php file into a frame.  Too bad I did not know of this tag sooner.  Could have saved me many hours of tackling the user define tag issue.  :P

Anyway, I got the php script file working fine for now.
[url=http://"http://feeds.feedburner.com/Vancouver_Psychics_Journey]A Vancouver Psychic's Journey Blog[/url]
Post Reply

Return to “CMSMS Core”