i realy miss php option, i love php scripts
The content and new pages are html, so if i want to add php i must make iframes realy sucks and dont work good.
maybe future release make html files to php ?
lett me no..............
iframe vs php (feature)
Re: iframe vs php (feature)
Hi twc,
actually you can use PHP in the content (even on news pages since CMSimple_XH 1.5) via CMSimple scripting. As written in the linked article putting out anything directly is not possible (one has to use $output instead), and generally CMSimple scripting is somewhat clumsy. So alternatively one might better use the so called plugin call {{{PLUGIN:my_function(...);}}}. This has two benefits: the PHP code doesn't clutter the page contents, and the script is encapsulated in a function to avoid clashes with CMSimple's code. The latter is particularly important if the PHP script is not related to CMSimple, as CMSimple uses many global variables with short names, so one can easily overwrite one of these variables inadvertently.
This might work depending on the script. Complex standalone scripts (e.g. a gallery or guestbook script) will typically require an IFrame anyway.
Actually having PHP syntax (<?php ... ?>) on a page is probably not possible at all, as AFAIK it will be removed by the browser in design mode.
Christoph
actually you can use PHP in the content (even on news pages since CMSimple_XH 1.5) via CMSimple scripting. As written in the linked article putting out anything directly is not possible (one has to use $output instead), and generally CMSimple scripting is somewhat clumsy. So alternatively one might better use the so called plugin call {{{PLUGIN:my_function(...);}}}. This has two benefits: the PHP code doesn't clutter the page contents, and the script is encapsulated in a function to avoid clashes with CMSimple's code. The latter is particularly important if the PHP script is not related to CMSimple, as CMSimple uses many global variables with short names, so one can easily overwrite one of these variables inadvertently.
Instead of <iframe src="./test.php"> you can try the following:twc wrote:so if i want to add php i must make iframes
Code: Select all
#CMSimple ob_start(); include('./test.php'); $output = preg_replace('/'.chr(35).'CMSimple.*?'.chr(35).'/', ob_get_clean(), $c[$s]);#
Actually having PHP syntax (<?php ... ?>) on a page is probably not possible at all, as AFAIK it will be removed by the browser in design mode.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: iframe vs php (feature)
did not work........
http://encode-explorer.siineiolekala.net/
http://encode-explorer.siineiolekala.net/
cmb wrote:Hi twc,
actually you can use PHP in the content (even on news pages since CMSimple_XH 1.5) via CMSimple scripting. As written in the linked article putting out anything directly is not possible (one has to use $output instead), and generally CMSimple scripting is somewhat clumsy. So alternatively one might better use the so called plugin call {{{PLUGIN:my_function(...);}}}. This has two benefits: the PHP code doesn't clutter the page contents, and the script is encapsulated in a function to avoid clashes with CMSimple's code. The latter is particularly important if the PHP script is not related to CMSimple, as CMSimple uses many global variables with short names, so one can easily overwrite one of these variables inadvertently.
Instead of <iframe src="./test.php"> you can try the following:twc wrote:so if i want to add php i must make iframesThis might work depending on the script. Complex standalone scripts (e.g. a gallery or guestbook script) will typically require an IFrame anyway.Code: Select all
#CMSimple ob_start(); include('./test.php'); $output = preg_replace('/'.chr(35).'CMSimple.*?'.chr(35).'/', ob_get_clean(), $c[$s]);#
Actually having PHP syntax (<?php ... ?>) on a page is probably not possible at all, as AFAIK it will be removed by the browser in design mode.
Christoph
Re: iframe vs php (feature)
Hi twc,
Or you might use the CMSimple plugin WDir, which supports only a small subset of encode-explorer's features, but quite useful too.
Christoph
Well, ...twc wrote:did not work........
The encode-explorer emits a complete HTML document, so this can't work directly in a page. One has to use an IFrame for that. In this case I recommend the Wrapper plugin, which seems to work fine here (it resizes the height of the IFrame as needed).cmb wrote:Complex standalone scripts (e.g. a gallery or guestbook script) will typically require an IFrame anyway.
Or you might use the CMSimple plugin WDir, which supports only a small subset of encode-explorer's features, but quite useful too.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH