Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv17139
Modified Files:
Template.php Toolbar.php
Log Message:
New template token ${THANK_YOU} for post-edit messages (for lack of a better name). The thank you or other messages can now easily be repositioned anywhere on the html template.
Index: Template.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/Template.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** Template.php 2002/01/05 10:17:07 1.14
--- Template.php 2002/01/08 00:06:45 1.15
***************
*** 339,342 ****
--- 339,345 ----
if ($page_revision)
$t->setPageRevisionTokens($page_revision);
+ global $thankyou;
+ if ($thankyou)
+ $t->replace('THANK_YOU', $thankyou);
$t->replace('CONTENT', $content);
$t->replace('TITLE', $title);
Index: Toolbar.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/Toolbar.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** Toolbar.php 2002/01/05 10:32:16 1.9
--- Toolbar.php 2002/01/08 00:06:45 1.10
***************
*** 335,338 ****
--- 335,372 ----
}
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // Template token: ${THANK_YOU}
+
+ // Requires:
+ // $pagename (from savepage.php)
+ // $warnings (from savepage.php)
+ // global $SignatureImg
+
+ function toolbar_Info_ThankYou($pagename, $warnings) {
+ $html = "";
+ $html .= sprintf(_("Thank you for editing %s."),
+ LinkExistingWikiWord($pagename));
+ $html .= "<br>\n";
+ $html .= _("Your careful attention to detail is much appreciated.");
+ $html .= "\n";
+
+ if ($warnings) {
+ $html .= Element('p', QElement('strong',_("Warning!")) ." "
+ . htmlspecialchars($warnings))
+ . QElement('br') ."\n";
+ }
+
+ global $SignatureImg;
+ if (!empty($SignatureImg)) {
+ $html .= Element('p',
+ QElement('img', array('alt' => $SignatureImg,
+ 'src' => DataURL($SignatureImg))));
+ }
+
+
+ $html .= QElement('hr', array('noshade' => 'noshade'));
+ return $html;
+ }
+
/////////////////////////////////////////////////////////////////////
|