[pmwiki-users] Bug with SetTmplDisplay in preview handling?

Hans design at flutesong.net
Mon Mar 7 04:28:53 CST 2005


Neil Herber reported to me a strange bug using the latest gemini v7
skin, and I am wondering if it is a bug not in the skin code but in
pmwiki's handling of the preview format.

The problem appears as follows:
If in gemini/skin.php the rightbar is not shown by default using
  SetTmplDisplay('PageRightFmt', 0);
  
and a page has the rightbar shown by having set a custom markup
  (:showright:),
  
which is defined in gemini/altforms as
  Markup('showright','directives','/\\(:showright:\\)/e',
         "SetTmplDisplay('PageRightFmt', 1)");
         
then editing the page will show no rightbar, which is intended using
in gemini/altforms.php
  global $action;
  if ($action=='edit') {
                        SetTmplDisplay('PageRightFmt', 0);
                        SetTmplDisplay('PageHeaderFmt', 0);
                        SetTmplDisplay('PageTitleFmt', 0);
                        SetTmplDisplay('PageLeftFmt', 0);
                        SetTmplDisplay('PageFootMenuFmt', 0); 
        };
BUT, and this is the bug, when clicking Preview, the rightbar appears
as part of the edit window, which it should not, and did not before I
changed the code to use SetTmplDisplay.
So it seems that PageRightFmt is not suppressed through the above
condition when preview is invoked for the page edit.

you can see it here:
http://flutesong.net/testwiki/Test/WikiSandbox
edit page, and go to preview.

any help will be greatly appreciated!

 Hans                          




More information about the pmwiki-users mailing list