| Author |
Message |
|
rean22
|
Post subject: How to insert PHP script to page? Posted: Wed Jul 28, 2010 6:38 am |
|
Joined: Wed Jul 28, 2010 6:35 am Posts: 8
|
|
How to insert PHP script to page?
In addition, is there any wrapper for external pages?
|
|
 |
|
 |
|
maskas
|
Post subject: Re: How to insert PHP script to page? Posted: Wed Jul 28, 2010 7:56 am |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 194
|
|
Ca you tell us more what you are trying to achieve?
Currently there is no widget "PHP", but there is possible to make a workaround.
And what do you mean by wrapper? Do you need an Iframe? You can add Iframe using HTML widget.
|
|
 |
|
 |
|
rean22
|
Post subject: Re: How to insert PHP script to page? Posted: Wed Jul 28, 2010 10:32 am |
|
Joined: Wed Jul 28, 2010 6:35 am Posts: 8
|
|
I mean, for example, how to insert <? date(); ?> script? It's a must have option IMAO.
About the IFrame - now it's clear for me. Thanks
|
|
 |
|
 |
|
maskas
|
Post subject: Re: How to insert PHP script to page? Posted: Wed Jul 28, 2010 11:05 am |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 194
|
|
Currently there is no straight forward way to add something like dynamically changing date in the middle of the content.
But there are some workarounds:
1 You can write TinyMCE plugin that insert required data.
2 You also can use HTML widget and write some javascript there.
3 You can write some tags in your content, like: [[date]] and automatically replace them to actual date in your template:
instead: echo $site->generateContent();
write: echo replace('[[date]]', date("Y-m-d"),$site->generateContent());
This job can by done also by JavaScript using onLoad function.
|
|
 |
|
 |
|
rean22
|
Post subject: Re: How to insert PHP script to page? Posted: Wed Jul 28, 2010 4:37 pm |
|
Joined: Wed Jul 28, 2010 6:35 am Posts: 8
|
|
Thanks for an answer. I'll be happy if you include this option in next release.
|
|
 |
|
 |
|
maskas
|
Post subject: Re: How to insert PHP script to page? Posted: Wed Jul 28, 2010 5:08 pm |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 194
|
|
But what is the actual need? It didn't sound like the only need is to include the date. What is that feature you really need:
PHP widget or Snippets in middle of text (like [[date]]) that are automatically transformed into values
And in such case what do you need except [[date]]?
Do you have some examples where it is done exactly in that way you need?
|
|
 |
|
 |
|
rean22
|
Post subject: Re: How to insert PHP script to page? Posted: Thu Jul 29, 2010 4:26 am |
|
Joined: Wed Jul 28, 2010 6:35 am Posts: 8
|
|
Well I need some queries from MySQL db, and some PHP snippets to work, just to insert some dynamic external info. So I believe there is a need in PHP widget. Thank you.
|
|
 |
|
 |
|