Register  |  Login  |  Forum  |  Search   

Board index » Development » Help requests




Post new topic Reply to topic  [ 7 posts ] 
 
Author Message
 Post subject: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 6:38 am 
Offline

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?


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 7:56 am 
Offline
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.


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 10:32 am 
Offline

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


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 11:05 am 
Offline
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.


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 4:37 pm 
Offline

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.


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Wed Jul 28, 2010 5:08 pm 
Offline
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?


Top 
 Profile  
 
 Post subject: Re: How to insert PHP script to page?
 Post Posted: Thu Jul 29, 2010 4:26 am 
Offline

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.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 7 posts ] 

Board index » Development » Help requests


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron