Insert PHP in CMSB

8 posts by 3 authors in: Forums > CMS Builder
Last Post: August 12, 2008   (RSS)

By terryally - August 8, 2008

I created a section called footer and in that I wanted insert some PHP code but your CMSB keeps stripping out my PHP code.

Is there a way to get this done please?


Terry

Re: [terryally] Insert PHP in CMSB

By Jake - August 10, 2008

Hi Terry,

If you use a plain text box field to enter in your PHP code it should work - I'm assuming you're trying to enter in this code through the WYSIWYG editor right now. Is that correct?

If you absolutely need to enter in this code through the WYSIWYG editor, I can see if there's a setting that can be adjusted to allow this in the WYSIWYG editor for you. [:)]
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.

Re: [Jake] Insert PHP in CMSB

By terryally - August 11, 2008

Hi Jake,

I used the textbox instead of the wysiwyg and it reprinted the php on the page. Somehow the code was not processed server side.

Terry

Re: [terryally] Insert PHP in CMSB

By Dave - August 11, 2008

There is ways to execute PHP code but it's a little tricky and opens up a potential security hole. Also since PHP tags aren't valid html you have to get around the wysiwyg stripping them out.

Is there something in particular you're trying to do? There may be another way to do it that doesn't require inserting PHP code in your content.
Dave Edis - Senior Developer
interactivetools.com

Re: [Jake] Insert PHP in CMSB

By terryally - August 12, 2008

Thanks Jake.

Re: [Dave] Insert PHP in CMSB

By terryally - August 12, 2008

There is ways to execute PHP code but it's a little tricky and opens up a potential security hole. Also since PHP tags aren't valid html you have to get around the wysiwyg stripping them out.

Is there something in particular you're trying to do? There may be another way to do it that doesn't require inserting PHP code in your content.


Hi Dave,

I can find a work around for it. As I am structuring the site for the client to update I thought I would create a "footer" as a section and insert that on the template. As part of that footer I usually use PHP DATE() function to set the year and I thought it would be neat. What I've done is to hard code the PHP on the template and then still use the footer in CMSB with the other information. It still looks okay and fits with the design.

Cheers
Terry

Re: [terryally] Insert PHP in CMSB

By Dave - August 12, 2008

Ok, glad it's working. If I think of an easy way to do that I'll post back on this thread.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com