<div dir="ltr">Here is the modified code, not sure, if it works in all cases because I don't know exactly what it should do:<br><br><br><br><?php if (!defined('PmWiki')) exit();<br>    /* popupwindow.php, a module written for pmwiki 2<br>    for creating popup windows.<br>    copyright 2007 Hans Bracker.<br>    <br>    This program is free software; you can redistribute it and/or modify<br>    it under the terms of the GNU General Public License as published<br>    by the Free Software Foundation; either version 2 of the License, or<br>    (at your option) any later version.<br>    <br>    Simple syntax: %popwin%[[Group/PageName]] or %popwin%[[Group/PageName| Title]]<br>    Syntax with some parameters: %popwin height=300 width=400 top=20 left=20%[[link]]<br>    See list of available parameters below under $defaults<br>    For multiple popup-window links, each with some different parameters, <br>    add id= parameter, for instance id=1, id=2 etc. <br>    <br>    Additional markup:<br>    (:popclose Close Window:) creates a link for closing the popup window, <br>    replace "Close Window" with whatever label text.<br>    (:input closewindow 'Close Window':) creates a 'Close Window' button.<br>    replace "Close Window" with whatever label text.<br>    add ?action=popopen to the %popwin%link<br>        %popwin%[[PageName?action=popopen| link text]]    <br>    opens the popup and sets a page variable {$PopOpen}. <br>    Use it in the popup page in conditionals to trim side menus etc:<br>    (:if equal {$PopOpen} 1:)(:noleft:)(:popclose Close Window:)(:ifend:)<br>    */<br>$RecipeInfo['PopupWindow']['Version'] = '2023-06-17';<br><br>Markup('popwin1','<links','/%popwin\\s*(.*?)%\\[\\[(.*?)\\]\\]/i',<br>  "PopupWindow");<br> <br>Markup('popwin2','<popwin1',<br>  "/%popwin\\s*(.*?)%(?>\\[\\[([^|\\]]*)\\|\\s*)(.*?)\\s*\\]\\]($SuffixPattern)/i",<br>  "PopupWindow"); <br>  <br>function PopupWindow ($m) {<br>   global $LinkPopupFmt, $FmtPV, $PopupLinkPage;<br>   $opts=$m[1];<br>   $tgt=$m[2];<br>   $lbl=$m[3];<br>   $sfx=$m[4];<br>   extract($GLOBALS['MarkupToHTML']);<br>   <br>   static $cnt = 0; $cnt++;<br>   $defaults = array(<br>      'id' => '0',<br>      'width' => 500,<br>      'height' => 300,<br>      'left' => 'center',<br>      'top' => 'center',      <br>      'resizable' => 1,<br>      'scrollbars' => 1,<br>      'toolbar' => 0,<br>      'location' => 0,<br>      'directories' => 0,<br>      'statusbar' => 0, <br>      'menubar' => 0,<br>      );<br>   $opt = array_merge($defaults, ParseArgs($opts));<br>   <br>   $FmtV['$PopupLinkPage'] = $PopupLinkPage = $pagename;<br>   $FmtPV['$PopupLinkPage'] = '$GLOBALS["PopupLinkPage"]'; <br>   <br>   $LinkPopupFmt = "<a href='\$LinkUrl' onclick=\"return popWin('\$LinkUrl','popup".$opt['id'].<br>                "','".$opt['width']."','".$opt['height']."','".$opt['left']."','".$opt['top'].<br>                "','".$opt['resizable']."','".$opt['scrollbars']."','".$opt['toolbar'].<br>                "','".$opt['location']."','".$opt['directories']."','".$opt['statusbar'].<br>                "','".$opt['menubar']."')\">\$LinkText</a>".<br>     ($cnt==1 ? "\n       <script language='javascript' type='text/javascript'><!--<br>       function popWin(url,id,px,py,pl,pt,rs,sb,tb,lo,di,st,mb) {<br>         if(pl=='center') var pl = (screen.width-px)/2; if(pt=='center') var pt = (screen.height-py)/2;<br>             newwindow=window.open(url,id,'toolbar='+tb+',scrollbars='+sb+',location='+lo+',statusbar='+st+',menubar='+mb+',directories='+di+',resizable='+rs+',width='+px+',height='+py+',left='+pl+',top='+pt+'');<br>            if (window.focus) {newwindow.focus()} return false;} // --><br>       </script>" : "");<br>   return Keep(MakeLink($pagename,$tgt,$lbl,$sfx,$GLOBALS['LinkPopupFmt']),'L');<br>}<br><br># set PV {$PopOpen} with action=popopen<br>$HandleActions['popopen'] = 'PopOpenHandle';<br>function PopOpenHandle($pagename) {<br>    global $FmtPV;<br>    $FmtPV['$PopOpen'] = '"1"';<br>    HandleBrowse($pagename);<br>}<br><br># create link for closing popup with (:popclose Close Window:)<br>Markup('popclose','directives','/\\(:popclose\\s*(.*?):\\)/i', <br>       "PopCloseMarkup");<br>function PopCloseMarkup($pagename, $label='Close Window') {<br>  if(strlen($m[1] < 1)){<br>    $label='Close Window';<br>  }else{<br>    $label=$m[1] ;<br>  }<br>  extract($GLOBALS['MarkupToHTML']);<br><br>    $out = "<a href=\"$PageUrl?action=popclose\" onclick=\"self.close()\">$label</a>";<br>  return Keep($out);      <br>}<br><br># add markup (:input closewindow 'Close Window':)<br>SDVA($InputTags['closewindow'], array(<br>  ':args' => array('value'),<br>  'value' => XL('Close Window'),<br>  ':html' => "<input type='button' class='inputbutton' \$InputFormArgs onClick='window.close()' />",<br>   ));<br><br><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Sa., 17. Juni 2023 um 10:30 Uhr schrieb Piotr Dybczyński <<a href="mailto:piotr@dybczynski.pl">piotr@dybczynski.pl</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
after upgrading to Debian 12 I have a problem described in the subject.<br>
<br>
Are there any alternatives for this recipe?<br>
<br>
Thanks in advance,<br>
Piotr<br>
-- <br>
/************************************************************************<br>
                          dr Piotr A. Dybczyński<br>
  homepage: <a href="https://www.dybczynski.pl/Piotr" rel="noreferrer" target="_blank">https://www.dybczynski.pl/Piotr</a>   e-mail: <a href="mailto:piotr@dybczynski.pl" target="_blank">piotr@dybczynski.pl</a><br>
******************************************************************PAD***/<br>
<br>
_______________________________________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</blockquote></div>