Creating a field which can have PHP or Javascript code added to it

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 29, 2009   (RSS)

By Moonworks - June 27, 2009

I'm trying to create a field where I can add PHP or Javascript code.

It is for when I have the code given to me for showing banners, I can just go into admin, and paste in the required code, for example, one of these two:

<?php if(function_exists('oiopub_link_zone')) oiopub_link_zone(1, 'center'); ?>

<script type='text/javascript' src='http://www.residentialtraining.co.uk/wp-content/plugins/oiopub-direct/js.php?type=link&align=center&zone=1'></script>

What is the simplest way?
High quality residential training for writers, actors &amp; Film Making - Click Here for further information

Re: [Moonworks] Creating a field which can have PHP or Javascript code added to it

By ross - June 29, 2009

Hi there.

Thanks for posting!

What you'll want to do is create a new textbox field in your system and paste the code in that. You can then put that field onto your template.

The only thing is that I don't know for sure if the PHP code will run or not. The Javascript should be fine.

Give it a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@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: http://www.interactivetools.com/consulting/