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!
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Popup Window
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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
--
Visit My homepage and Zikula themes. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 11
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: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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
--
Visit My homepage and Zikula themes. -
- Rank: Registered User
- Registered: Dec 19, 2006
- Last visit: Jun 01, 2009
- Posts: 33
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, Consulting. -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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
--
Visit My homepage and Zikula themes.
- Moderated by:
- Support
