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: [Jake] Insert PHP in CMSB

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 Jake - August 11, 2008

Hi Terry,

Sorry, that was my mistake - I was in an "Article Manager" way of thinking when I made that post.

The only way to actually execute extra PHP code like this would be to add it to your pages directly. Any PHP code entered into your database will not be processed, as the code needs to be parsed by the server before it comes from your database. This is something

Let us know if you have any other questions. [:)]
-----------------------------------------------------------
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: [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

Thanks Jake.

Re: [Dave] Insert PHP in CMSB

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