Skip to content
drupal.module 4.05 KiB
Newer Older
Dries Buytaert's avatar
 
Dries Buytaert committed
<?php
Dries Buytaert's avatar
Dries Buytaert committed

$module = array("page" => "drupal_page");

Dries Buytaert's avatar
 
Dries Buytaert committed
include_once "includes/common.inc";
include_once "includes/comment.inc";
Dries Buytaert's avatar
Dries Buytaert committed

Dries Buytaert's avatar
 
Dries Buytaert committed
function drupal_render($id, $cid) {
Dries Buytaert's avatar
 
Dries Buytaert committed
  global $theme, $user;
Dries Buytaert's avatar
 
Dries Buytaert committed

  $output  = " <P>Drupal is the English pronunciation for the Dutch word 'druppel' which stands for 'drop'.  Drupal is a full-featured content management/discussion engine suitable to setup a news-driven community or portal site.  Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities.  Due to its modular design drupal is flexible and easy to adapt or extend.</P>\n";
  $output .= " <P>Drupal is primarily written by Dries Buytaert (dries_at_drop.org) and build after Slash (<A HREF=\"http://slashcode.com/\">http://slashcode.com/</A>) and Scoop (<A HREF=\"http://scoop.kuro5hin.org/\">http://scoop.kuro5hin.org/</A>).  The source code is available under terms of GNU General Public License (GPL).</P>\n";
  $output .= " <P>We don't have a real demo site yet but drupal is used by (and created for) <A HREF=\"http://drop.org/\">http://drop.org/</A>.  Create an account, play with it for a bit, read the <A HREF=\"module.php?mod=documentation\">documentation</A> and spend some time getting used to it.</P>\n";
Dries Buytaert's avatar
 
Dries Buytaert committed
  $theme->box("Introduction", $output);

Dries Buytaert's avatar
Dries Buytaert committed
  $output  = "<LI><A HREF=\"drupal/drupal-2.00.tgz\">drupal 2.00</A> (2001/03/15 - latest version)</LI>\n";
  $output .= "<LI><A HREF=\"drupal/drupal-1.00.tgz\">drupal 1.00</A> (2001/01/15)</LI>\n";
Dries Buytaert's avatar
 
Dries Buytaert committed
  $output .= "<LI><A HREF=\"drupal/drupal-1.00-rc2.tgz\">drupal 1.00-rc2</A> (2001/01/08)</LI>\n";
  $output .= "<LI><A HREF=\"drupal/drupal-1.00-rc1.tgz\">drupal 1.00-rc1</A> (2001/01/01)</LI>\n";
Dries Buytaert's avatar
 
Dries Buytaert committed
  $theme->box("Download", $output);
Dries Buytaert's avatar
Dries Buytaert committed

Dries Buytaert's avatar
 
Dries Buytaert committed
  unset($output);
Dries Buytaert's avatar
Dries Buytaert committed
  $handle = opendir("drupal");
Dries Buytaert's avatar
 
Dries Buytaert committed
  while ($file = readdir($handle)) if (ereg(".jpg", $file) || ereg(".gif", $file)) $output .= " <LI><SMALL><A HREF=\"drupal/$file\">$file</A></SMALL></LI>\n";
Dries Buytaert's avatar
Dries Buytaert committed
  closedir($handle);
Dries Buytaert's avatar
 
Dries Buytaert committed
  $theme->box("Screenshots", $output);
Dries Buytaert's avatar
 
Dries Buytaert committed

Dries Buytaert's avatar
 
Dries Buytaert committed
  $output  = "<H2>Documentation</H2>\n";
  $output .= " <LI><A HREF=\"module.php?mod=documentation\">documentation</A></LI>\n";
  $output .= " <LI><A HREF=\"module.php?mod=wishlist\">wishlist</A></LI>\n";
  $output .= "<H2>Mailing list</H2>\n";
  $output .= " <P>The <CODE>drupal-support@drop.org</CODE> list discusses drupal development. All submissions relevant to that, such as bug reports, enhancement ideas, patches or reports that a patch fixed a bug are appropriate.</P>\n";
  $output .= " <LI>To subscribe to the <CODE>drupal-support@drop.org</CODE> mailing list, send an e-mail to <A HREF=\"mailto:drupal-support-request@drop.org\">drupal-support-request@drop.org</A> with no subject and put <B>subscribe</B> in the body of your message.</LI>\n";
  $output .= " <LI>To unsubscribe from the <CODE>drupal-support@drop.org</CODE> mailing list, send an e-mail to <A HREF=\"mailto:drupal-support-request@drop.org\">drupal-support-request@drop.org</A> and put <B>unsubscribe</B> in the body of your mail.\n";
  $theme->box("Support and development", $output);

  print "<H3>Comments</H3>\n";

  // Display comments:
  comment_render($id, $cid);
}

function drupal_page() {
  global $cid, $comment, $id, $op, $pid, $lid, $link, $mode, $order, $subject, $theme, $threshold;
Dries Buytaert's avatar
Dries Buytaert committed

Dries Buytaert's avatar
 
Dries Buytaert committed
  switch($op) {
Dries Buytaert's avatar
 
Dries Buytaert committed
    case t("Preview comment"):
Dries Buytaert's avatar
 
Dries Buytaert committed
      $theme->header();
      comment_preview($pid, $id, $subject, $comment);
      $theme->footer();
      break;
Dries Buytaert's avatar
 
Dries Buytaert committed
    case t("Post comment"):
Dries Buytaert's avatar
 
Dries Buytaert committed
      comment_post($pid, $id, $subject, $comment);
      $theme->header();
      drupal_render($id, $cid);
      $theme->footer();
Dries Buytaert's avatar
 
Dries Buytaert committed
      break;
    case "reply":
      $theme->header();
      comment_reply($pid, $id);
      $theme->footer();
      break;
Dries Buytaert's avatar
 
Dries Buytaert committed
    case t("Update settings"):
Dries Buytaert's avatar
 
Dries Buytaert committed
      comment_settings($mode, $order, $threshold);
      $theme->header();
      drupal_render($id, $cid);
      $theme->footer();
      break;
Dries Buytaert's avatar
 
Dries Buytaert committed
    case t("Moderate comments"):
Dries Buytaert's avatar
 
Dries Buytaert committed
      comment_moderate($moderate);
      $theme->header();
      drupal_render($id, $cid);
      $theme->footer();
      break;
    default:
      $theme->header();
Dries Buytaert's avatar
 
Dries Buytaert committed
      drupal_render($id, $cid);
Dries Buytaert's avatar
 
Dries Buytaert committed
      $theme->footer();
  }
Dries Buytaert's avatar
Dries Buytaert committed
}

Dries Buytaert's avatar
 
Dries Buytaert committed
?>