2011-04-30, 01:14:13
Is it possible to do so? Is there a "best practice" to embed php code in the body of a file?
php code in page body?
|
2011-04-30, 01:14:13
Is it possible to do so? Is there a "best practice" to embed php code in the body of a file?
2011-04-30, 01:27:40
you can either add it to the template file within your theme you are using, or you can use the exec php plugin to add it to your body content: http://get-simple.info/extend/plugin/exec-php/17/
2011-04-30, 01:29:44
Another nice one is DynPages: http://get-simple.info/forum/topic/1360/...es-plugin/
2011-04-30, 01:30:46
ccagle8 Wrote:you can either add it to the template file within your theme you are using, or you can use the exec php plugin to add it to your body content: http://get-simple.info/extend/plugin/exec-php/17/ Awesome. The template will make it visible in all pages. But the plugin will allow custom changes per file (I assume) so I'm guessing the exec-php is definitely a better approach.
2011-04-30, 01:33:42
2018-01-10, 21:55:49
Hi, I'd like to know how to use the Exec-PHP plugin along with CKEditor.
The plugin works well at first glance - if I insert for example <?php echo getrandmax(); ?> in source-editing mode through the editor the page displays correctly 2147483647. But if I edit the same page (anywhere else) the editor automatically replaces the above mentioned php code with <!--?php echo getrandmax() ?--> and there is a blank place instead of the number in the webpage then. This way the Exec-PHP plugin is unusable. Is it necessary to somehow reset the editor so that this plugin can be used?
Thank you.
2018-01-10, 23:55:07
Do not use the CKEditor for this purpose, turn it off completely in settings.
Another option is DynPages and components with your PHP snippets. Or use simple short codes/placeholders like {% your_data %} in editor and replace them with variables in your template file.
2018-01-10, 23:58:02
(2018-01-10, 21:55:49)lotova Wrote: I recommend using the plugin DynPages. http://get-simple.info/extend/plugin/dynpages/81/ |
« Next Oldest | Next Newest »
|