- Moderated by:
- Support Team
-
- rank:
-
Freshman
- registered:
- April 2007
- Status:
- offline
- last visit:
- 05.08.08
- Posts:
- 19
Hello from a newbie... my module needs to popup a separate browser window where I have full control of the output, but still need to be able to access PN APIs from the PHP code. Right now it seems I can only do this by placing the PHP file in the PN home directory so that I can include all necessary PN stuf. How can I keep the PHP file with my module?
Thanks for any hints!
-
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
Write your module function as normal except using the display method of pnRender rather than fetch then return true from your module function. This will display your module output not wrapped in your theme (the true return lets the core know that you've performed all the necessary output).
For an example see the 'viewinstanceinfo' function in the permissions module admin panel.
-Mark -
- rank:
-
Freshman
- registered:
- April 2007
- Status:
- offline
- last visit:
- 05.08.08
- Posts:
- 19
That is a good example, however it is not going to work for me. I need more control on the output, cannot use pnRenderer... i.e. I have to use PHP flush APIs to display messages as they are generated, etc... -
- rank:
-
Freshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 21.09.08
- Posts:
- 20
Mark,
I see alot of sites use javascript to pop-up windows with certain dimensions, without toolbars, etc... Do we have anything like that in the Core? Is that possible with the pnRender->display() method described above?
Chris
--
Chris Stevens, CEO
OpenTaxi Systems LLC
866.OPENTAXI
www.opentaxi.com
On-Demand Air Taxi Reservations Platform, Flight Reservations,and Consulting. -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
Chris,
There's nothing in the code i've referenced that does or doesn't limit the window like this. This is more about how you format the content of that window without the theme.
What you need to look at is *how* you create the popup window. In your case a simple link with a target won't work. You'd need to use some javascript to limit the window. Take a look, for example, at this article from A List Apart.
-Mark
