Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Popup Window
  • Posted: 09.05.2007, 21:33
     
    lsuardi1
    rank:
    Freshman 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!
  • Posted: 09.05.2007, 22:52
     
    rank:
    Moderator 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
  • Posted: 10.05.2007, 07:38
     
    lsuardi1
    rank:
    Freshman 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...
  • Posted: 10.05.2007, 13:39
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    You can do whatever you need to do in the PHP code including using (or not) pnRender. The real key is you directly display your output and then return true back to the core.

    -Mark
  • Posted: 11.05.2007, 00:51
     
    lsuardi1
    rank:
    Freshman Freshman
    registered:
     April 2007
    Status:
    offline
    last visit:
    05.08.08
    Posts:
    19
    Yes, it works. Thank you very much!
  • Posted: 11.05.2007, 06:45
     
    cgstevens
    rank:
    Freshman 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.
  • Posted: 11.05.2007, 14:46
     
    rank:
    Moderator 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

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula