Date: 25 December 2007

 

I want my popup windows to work like "help text" - only information and maybe a "Close Window" option.

I found the cookbook page Cookbook-PopupWindow

  • I downloaded the cookbook popupwindow.php file)
  • I followed the standard instructions for including it (added line in config.php).
  • I need my popup default window size to be a bit wider (I tend to have big titles) so I opened the code of the cookbook (popupwindow.php file) in dreamweaver and changed the default width (line 39) to 'width' => 600,
  • Then I tried to follow the directions for getting a trimmed popup. I am no pmwiki geek so here they are in step-by-step.
    • When you create the link to the page you want to popup, the link must be

%popwin%[[PopupPageLink?action=popopen|PopupPageLinkText]]

  • When you create - i.e. edit the pages with your popup text, the last line in each of the pages themselves needs to be the following line (without line breaks):
(:if equal {$PopOpen} 1:)(:noleft:)(:noright:)(:noheader:)(:nofooter:)
(:popclose Close Window:)(:ifend:)

which - when summoned with action=popopen as above - gives no left sidebar, no right sidebar, no header, no footer and a close window button.

  • However, I really like my fixflow skin, but it made a problem because it has an "extra" header-PageTopMenu and footer-PageFootMenu and the above line won't trim these. But the commands to get rid of these are built into the skin.

and then when editing my pages to popup add this line at the end (no line breaks)

(:if equal {$PopOpen} 1:)(:noleft:)(:noright:)(:noheader:)(:nofooter:)
(:notopmenu:)(:nofootmenu:)(:popclose Close Window:)(:ifend:)

which - when summoned with action=popopen as above - gives no left sidebar, no right sidebar, no header, no footer, no top menu, no foot menu and a close window button.

In the examples below the same page: popupwinex (which has the purple line in it is summoned).

  • A page with popup and trimmed using %popwin%[[popupwinex?action=popopen|Page -trimmed and popped]]: Page -trimmed and popped
  • Same page with popup without trim using %popwin%[[popupwinex|Page -no trim and popped]]: Page -no trim and popped
  • Same page without popup (or trim) using [[popupwinex|Page -regular link]]: Page -regular link

My thanks to the popupwindow cookbook creaters. LFS

 

 Up one level

 


Page last modified on December 23, 2008, at 07:03 AM