layout-0.5.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php if (!defined('PmWiki')) exit();
  2. /* Copyright 2004 Patrick R. Michaud (pmichaud@pobox.com)
  3. This file is part of PmWiki; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version. See pmwiki.php for full details.
  7. This file attempts to provide 0.5 layout compatibility for PmWiki
  8. version 0.6 by restoring the previous definitions of $PageHeaderFmt,
  9. $PageEditFmt, etc.
  10. To use this file, simply place
  11. include_once("scripts/layout-0.5.php");
  12. at the very beginning of your local/config.php file.
  13. */
  14. $EnableStdLayout = 0; # turn off stdlayout
  15. $EnableTemplateLayout = 0; # turn off tlayout
  16. $ScriptDir = preg_replace("#/[^/]*\$#","",$ScriptUrl,1);
  17. $WikiImgUrl = "$ScriptDir/pub/pmwiki-32.gif";
  18. $BodyWidth = 600;
  19. $BodyLeft = 20;
  20. $HTMLHeaderFmt = "<style type='text/css'>
  21. HR { text-align:left; }
  22. .wikiheader { font-size:32px; font-weight:bold; }
  23. .wikiops, .wikifooter { font-size:13px; }
  24. .wikibody { margin-left:\$BodyLeftpx; width:\$BodyWidthpx; }
  25. .diffbox { border:1px #999999 solid; }
  26. .diffauthor { font-weight:bold; }
  27. .difftime
  28. { font-family:verdana,sans-serif; font-size:66%; background-color:#dddddd; }
  29. .difftype
  30. { font-family:verdana,sans-serif; font-size:66%; font-weight:bold; }
  31. .diffadd
  32. { border-left:5px #99ff99 solid; padding-left:5px; }
  33. .diffdel
  34. { border-left:5px #ffff99 solid; padding-left:5px; }
  35. .diffrestore
  36. { font-family:verdana,sans-serif; font-size:66%; margin:1.5em 0px; }
  37. </style>";
  38. $HTMLBodyFmt = "</head><body bgcolor='#ffffff'><div class='wikibody'>";
  39. $HTMLStartFmt = array('headers:',&$HTMLDoctypeFmt,&$HTMLTitleFmt,
  40. &$HTMLHeaderFmt,&$HTMLBodyFmt);
  41. $HTMLEndFmt = "</div></body></html>";
  42. $PageNameFmt = '$Group.$Title_';
  43. $PageFileFmt = '$PageName';
  44. $PageUrlFmt = '$ScriptUrl/$Group/$Title_';
  45. $PageHeaderFmt = "
  46. <table width='\$BodyWidth' cellpadding='0' cellspacing='0' border='0'>
  47. <tr><td valign='bottom' align='left' width='10%'>\$WikiImg&nbsp;&nbsp;</td>
  48. <td valign='bottom' align='left'><a href='\$ScriptUrl/\$Group'>\$Group</a> /<br />
  49. <span class='wikiheader'><a href='\$PageUrl?action=search&amp;text=\$Title_'>\$Title</a></span></td>
  50. <td valign='bottom' align='right' class='wikiops'>
  51. <a href='\$ScriptUrl/$[Main/SearchWiki]'>$[SearchWiki]</a><br />
  52. <a href='\$ScriptUrl/$[\$Group/RecentChanges]'>\$Group.$[RecentChanges]</a><br />
  53. <a href='\$PageUrl?action=edit'>$[Edit Page]</a><br />
  54. <a href='\$PageUrl?action=diff'>$[Page Revisions]</a></td>
  55. </tr></table><hr /><p />";
  56. $PageTitleFmt = '';
  57. $PageRedirectFmt = "<i>($[redirected from] <a href='\$PageUrl?action=edit'>\$PageName</a>)</i><p />\n";
  58. $PageFooterFmt = "<hr /><small>
  59. <a href='\$PageUrl?action=edit'>$[Edit Page]</a> -
  60. <a href='\$PageUrl?action=diff'>$[Page Revisions]</a> -
  61. <a href='\$ScriptUrl/$[PmWiki/WikiHelp]'>$[WikiHelp]</a> -
  62. <a href='\$ScriptUrl/$[Main/SearchWiki]'>$[SearchWiki]</a> -
  63. <a href='\$ScriptUrl/$[\$Group/RecentChanges]'>$[RecentChanges]</a><br />
  64. $[Page last modified on \$LastModified]</small>";
  65. $PageEditFmt = "<a id='top' name='top'></a><h1>Editing \$PageName</h1>
  66. <form action='\$PageUrl' method='post'>
  67. <input type='hidden' name='pagename' value='\$PageName' />
  68. <input type='hidden' name='action' value='edit' />
  69. <textarea name='text' rows='25' cols='80'
  70. onkeydown='if (event.keyCode == 27) event.returnValue=false;'
  71. >\$Text</textarea><br />
  72. <input type='submit' name='post' value=' $[Save] ' />
  73. <input type='submit' name='preview' value=' $[Preview] ' />
  74. <input type='reset' value=' $[Reset] ' />
  75. </form>";
  76. $PagePreviewFmt = array(
  77. "function:ProcessTextDirectives",
  78. "<h2>Preview \$PageName</h2><b>Page is unsaved</b><hr /><p />",
  79. "function:PrintText",
  80. "<hr /><b>End of preview -- remember to save</b>
  81. <br /><a href='#top'>$[Top]</a>");
  82. $PageDiffFmt = "<h1><a href='\$PageUrl'>\$PageName</a> $[Revisions]</h1>";
  83. $PageDiffFootFmt = "<p /><hr />$[Back to] <a href='\$PageUrl'>\$PageName</a>";
  84. $PageAttrFmt = "<h1>$[\$PageName Attributes]</h1>
  85. <p>Enter new attributes for this page below. Leaving a field blank
  86. will leave the attribute unchanged. To clear an attribute, enter
  87. 'clear'.</p>";
  88. $PageStartFmt = &$HTMLStartFmt;
  89. $PageEndFmt = &$HTMLEndFmt;
  90. $HandleBrowseFmt = array(&$HTMLStartFmt,&$PageHeaderFmt,&$PageTitleFmt,
  91. &$PageRedirectFmt,"function:PrintText",&$PageFooterFmt,&$HTMLEndFmt);
  92. $HandleEditFmt = array(&$HTMLStartFmt,&$PageEditFmt,
  93. "wiki:$[PmWiki.EditQuickReference]",&$PagePreviewFmt,&$HTMLEndFmt);
  94. #$HandleDiffFmt = array(&$HTMLStartFmt,&$PageDiffFmt,'function:PrintDiff',
  95. # &$HTMLEndFmt);
  96. $WikiPageExistsFmt = "<a href='\$PageUrl\$Fragment'>\$LinkText</a>";
  97. $WikiPageCreateFmt =
  98. "\$LinkText<a href='\$PageUrl?action=edit'>?</a>";
  99. $WikiPageCreateSpaceFmt =
  100. "\$LinkText<a href='\$PageUrl?action=edit'>?</a>";
  101. $UrlLinkFmt = "<a href='\$Url'>\$LinkText</a>";
  102. $UrlImgFmt = "<img src='\$Url' border='0' alt='' img>";
  103. $RecentChanges = array(
  104. "Main.AllRecentChanges"=>'* $Group.$Tlink . . . $CurrentTime',
  105. '$Group.RecentChanges'=>'* $Group/$Tlink . . . $CurrentTime');
  106. SDV($WikiImg,"<a href='\$ScriptUrl'><img src='$WikiImgUrl' alt='$WikiTitle'
  107. border='0' /></a>");
  108. ?>