home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / wiki / template / diff.php < prev    next >
PHP Script  |  2004-03-08  |  2KB  |  39 lines

  1. <?php
  2. // $Id: diff.php,v 1.1 2004/01/12 22:14:05 comsubvie Exp $
  3.  
  4. require_once(TemplateDir . '/common.php');
  5.  
  6. // The diff template is passed an associative array with the following
  7. // elements:
  8. //
  9. //   page      => A string containing the name of the wiki page being viewed.
  10. //   diff_html => A string containing the XHTML markup for the differences.
  11. //   html      => A string containing the XHTML markup for the page itself.
  12. //   editable  => An integer.  Will be nonzero if user is allowed to edit page.
  13. //   timestamp => Timestamp of last edit to page.
  14.  
  15. function template_diff($args)
  16. {
  17.   template_common_prologue(array('norobots' => 1,
  18.                                  'title'    => TMPL_DifferencesIn .' '. $args['page'],
  19.                                  'heading'  => TMPL_DifferencesIn .' ',
  20.                                  'headlink' => $args['page'],
  21.                                  'headsufx' => '',
  22.                                  'toolbar'  => 1));
  23. ?>
  24. <div id="body">
  25. <strong><?php echo TMPL_DifferenceBetweenVersions; ?></strong><br /><br />
  26. <?php print $args['diff_html']; ?>
  27. <hr />
  28. <?php print $args['html']; ?>
  29. </div>
  30. <?php
  31.   template_common_epilogue(array('twin'      => $args['page'],
  32.                                  'edit'      => $args['page'],
  33.                                  'editver'   => $args['editable'] ? 0 : -1,
  34.                                  'history'   => $args['page'],
  35.                                  'timestamp' => $args['timestamp'],
  36.                                  'nosearch'  => 0));
  37. }
  38. ?>
  39.