GetSimple Support Forum
Enable php code - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Enable php code (/showthread.php?tid=4272)



Enable php code - lakechicago - 2013-02-08

Hi. I just want to put a php include in one of my pages. GS converts it to a comment. I've installed dynpages and exec-php to no avail.

Anyone have any suggestions?

-DD


RE: Enable php code - shawn_a - 2013-02-08

you can only put php code in components


RE: Enable php code - Carlos - 2013-02-08

@lakechicago
Dynpages is the best solution for this, but you have to read the docs
http://mvlcek.bplaced.net/get-simple/dynpages:en/


RE: Enable php code - lakechicago - 2013-02-09

Hi. Ok, I put this code in a component I called "contactform" --

<?php
include '/plugins/p01-contact/p01-contact.php';
?>

Then, on my contact page, I put this:

{% contactform %}

I add meta-descriptions, etc., save it and when I view it all I see on the page is {% contactform %}

I've installed dynpages and the p01-contact plugin. So what am I not doing right?

Thanks.

Don

P.S. I have to admit: this problem makes me feel like I've never programmed before.


RE: Enable php code - Carlos - 2013-02-09

I haven't used p01-contact but its descritpion in Extend says:
Quote:Just place in a page the tag :

(% contact %)

To put a default contact form.

So you really don't need Dynpages for this.

You don't need to include a plugin, BTW. It is loaded by GS (if activated).


RE: Enable php code - Carlos - 2013-02-09

Anyway it's strange that your {% contactform %} tag wasn't transformed.

You could test something like creating a component hello with:
<?php echo 'Hello world!'; ?>

then in your page content:

{% hello %}