[Pmwiki-users] Cookbook coments: flexlayout printable-page smartquotes

Kirill Lapshin kir at lapshin.net
Sun Jun 29 19:35:14 CDT 2003


This is a multi-part message in MIME format.
--------------080408050803050901090903
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit

Hello everybody,

I did not have chance to upgrade my PmWiki installation since version 
0.5.0, and finally today I had some time for that.

Wow, since last time I looked you guys made a big progress. The whole 
Cookbook idea is very neat!

I plugged flexlayout, webmenu, printable-page and smart-quotes. I like 
these plugins qite a lot, however there were some problems and I had to 
tweak them here and there.

Flexlayout (please find attached a patch):
    Has number of XHTML problems -- unbalanced tags etc. The bigger 
problem though that it overwrites/ignores any changes to $HTMLDoctypeFmt 
which is abolutely unacceptable for me. I changed $HTMLStartFmt 
definition to read

$HTMLStartFmt = $HTMLDoctypeFmt . "
<link rel='stylesheet' href='\$ScriptDir/pmwiki.css' type='text/css' />
<link rel='stylesheet' href='\$ScriptDir/local.css' type='text/css' />";

not sure if it is the best way though.

Webmenu: very nice, it would be great to have a way to configure it in 
such way that menu appears on the right. I can make a change to local 
copy of course, but making it configurable would be much better. How 
about placing menu via CSS float attr, rather then table?

Printable page: awesome! There were some problems with XHTML as well, 
please find patch attached. One interesting problem: if one uses 
printable page together with webmenu, it would be nice to hide menu from 
print page. Currently I am doing that in my local.php via

if ($action!="print")
    include_once("local/webmenu.php");

but it would be nice to make it work out of a box. It should be very 
easy to check action in webmenu.php.

smartquotes: Unfortunetly I had to turn it off. The problem is that it 
replaces all quotes, while for instance 3.5" should not be replaced. 
Much bigger problem is that lines indented with one space often used to 
include source code snippets and other similiar information, and from my 
point of view it does not make any sense to process quotes in there. 
Also it might be useful to use n-dash when dash is between two digits; 
n-dash essentially is a minus sign. Another suggestion -- if I am not 
mistaken angle quotes are used for quoted text within quoted text. If it 
is possible to automatically place angle quotes that would be great.

Is anybody interested in adding math formulas support to PmWiki? I have 
some working code, and I can add it to Cookbook. It comes at a price of 
disabling some old browsers though. Or at least disabling formulas in 
old browsers. Works only in Mozilla and IE 6. Requires installation of 
additional fonts (Mozilla) or Mathplayer plugin (IE).

--Kirill





--------------080408050803050901090903
Content-Type: text/plain;
 name="flexlayout.php.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="flexlayout.php.diff"

--- flexlayout.php	2003-06-29 15:53:40.000000000 -0400
+++ 1\flexlayout.php	2003-06-29 16:00:00.000000000 -0400
@@ -31,10 +31,9 @@
 
 */
 
-$HTMLStartFmt = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
-    \"http://www.w3.org/TR/html40/loose.dtd\"><html><head>
-  <link rel='stylesheet' href='\$ScriptDir/pmwiki.css' type='text/css' />
-  <link rel='stylesheet' href='\$ScriptDir/local.css' type='text/css' />";
+$HTMLStartFmt = $HTMLDoctypeFmt . "
+<link rel='stylesheet' href='\$ScriptDir/pmwiki.css' type='text/css' />
+<link rel='stylesheet' href='\$ScriptDir/local.css' type='text/css' />";
 $HTMLEndFmt = "</body></html>";
 $HTMLBodyFmt = "</head><body>";
 
@@ -46,10 +45,10 @@
     <div id='wikiheadertitle'><a href='\$ScriptUrl?action=search&amp;text=\$Title_'>\$Title</a></div>
   </td>
   <td id='wikiheadercommands' valign='bottom'>
-    <a href='\$ScriptUrl/Main/SearchWiki'>SearchWiki</a><br>
-    <a href='\$ScriptUrl/\$Group/RecentChanges'>\$Group.RecentChanges</a><br>
-    <a href='\$PageUrl?action=edit'>Edit Page</a><br>
-    <a href='\$PageUrl?action=diff'>Page Revisions</a></td>
+    <a href='\$ScriptUrl/Main/SearchWiki'>SearchWiki</a><br />
+    <a href='\$ScriptUrl/\$Group/RecentChanges'>\$Group.RecentChanges</a><br />
+    <a href='\$PageUrl?action=edit'>Edit Page</a><br/>
+    <a href='\$PageUrl?action=diff'>Page Revisions</a>
   </td>
   </tr></table>";
 

--------------080408050803050901090903
Content-Type: text/plain;
 name="printable-page.php.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="printable-page.php.diff"

--- printable-page.php	2003-06-20 08:56:20.000000000 -0400
+++ 1\printable-page.php	2003-06-29 16:24:00.000000000 -0400
@@ -6,7 +6,6 @@
 
 	produces a printable version of a PmWiki page
 */
-
 $PageFooterFmt = str_replace("<br />", " - <a href='$PageUrl?action=print' 
   target='_blank'>Printable Version</a><br />",$PageFooterFmt);
 if ($action == "print") {
@@ -16,8 +15,8 @@
         a:visited  { color: #444444; font-weight: bold; text-decoration: none; }
     </style>";
     $PageHeaderFmt = "<big>From $WikiTitle</big>
-        <h1>\$Groupspaced: \$Titlespaced</h1><hr size=3 noshade><p>";
-    $PageFooterFmt = "<p><hr size=3 noshade><small>Retrieved from &ldquo;$PageUrlFmt&rdquo;<br>
+        <h1>\$Groupspaced: \$Titlespaced</h1><hr size=\"3\" noshade=\"on\" /><p />";
+    $PageFooterFmt = "<p /><hr size=\"3\" noshade=\"on\" /><small>Retrieved from &ldquo;$PageUrlFmt&rdquo;<br />
         Page last modified on \$LastModified</small>";
     $GroupHeaderFmt = '$Group.GroupPrintHeader';
     $DoubleBrackets["/\\[\\[mailto:($UrlPathPattern)(.*?)\\]\\]/"] =
@@ -32,5 +31,4 @@
        "<cite>\$LinkText</cite> [<a class='url' href='\$Url'>\$Url</a>]";
     $hide = 1;
 }
-
-?>
+?>
\ No newline at end of file

--------------080408050803050901090903--





More information about the pmwiki-users mailing list