Skip to content
Snippets Groups Projects
Select Git revision
  • 70875e9dbe2e108d9f718533643d34c3b0708039
  • 11.x default protected
  • 10.6.x protected
  • 10.5.x protected
  • 11.2.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

system.module

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    node.module 47.50 KiB
    <?php
    // $Id$
    
    function node_help($section = "admin/help#node") {
      global $mod;
      $output = "";
    
      switch ($section) {
    
        case 'admin/help#node':
          $output .= "<h3>Nodes</h3>";
          $output .= "<p>The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes.";
          $output .= "A base node contains:<dl>";
          $output .= "<dt>A Title</dt><dd>Up to 128 characters of text that titles the node.</dd>";
          $output .= "<dt>A Teaser</dt><dd>A small block of text that is meant to get you interested in the rest of node. Drupal will automatically pull a small amount of the body of the node to make the teaser (To configure how long the teaser will be %teaser). The teaser can be changed if you don't like what Drupal grabs.</dd>";
          $output .= "<dt>The Body</dt><dd>The main text that comprises your content.</dd>";
          $output .= "<dt>A Type</dt><dd>What kind of node is this? Blog, book, forum, comment, unextended, etc.</dd>";
          $output .= "<dt>An Author</dt><dd>The author's name. It will either be \"anonymous\" or a valid user. You <i>cannot</i> set it to an arbitrary value.</dd>";
          $output .= "<dt>Authored on</dt><dd>The date the node was written.</dd>";
          $output .= "<dt>Changed</dt><dd>The last time this node was changed.</dd>";
          $output .= "<dt>Static on front page</dt><dd>The front page is configured to show the teasers from only a few of the total nodes you have on your site (To configure how many teasers %teaser), but if you think a node is important enough that you want it to stay on the front page enable this.</dd>";
          $output .= "<dt>Allow user comments</dt><dd>A node can have comments. These comments can be written by other users (Read-write), or only by admins (Read-only).</dd>";
          $output .= "<dt>Attributes</dt><dd>A way to sort nodes.</dd>";
          $output .= "<dt>Revisions</dt><dd>Drupal has a revision system so that you can \"roll back\" to an older version of a post if the new version is not what you want.</dd>";
          $output .= "<dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd>";
          $output .= "<dt>In moderation queue</dt><dd>Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are moderating a node it should be in the moderation queue.</dd>";
          $output .= "<dt>Votes</dt><dd>If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be approved or dropped.";
          $output .= "<dt>Score</dt><dd>The score of the node is gotten by the votes it is given.</dd>";
          $output .= "<dt>Users</dt><dd>The list of users who have voted on a moderated node.</dd>";
          $output .= "<dt>Published</dt><dd>When using Drupal's moderation system a node remains unpublished -- unavaliable to non-moderators -- until it is marked Published.</dd></dl>";
          $output .= "<p>Now that you know what is in a node, here are some of the types of nodes available.</p>";
    
          $output = t($output, array("%teaser" => l(t("click here"), "admin/system/modules/node")));
    
          if ($mod == "admin") {
            foreach (module_list() as $name) {
              if (module_hook($name, "node") && $name != "node") {
                $output .= "<h3>". t("Node type: %module", array("%module" => module_invoke($name, "node", "name"))) ."</h3>";
                $output .= module_invoke($name, "node", "description");
              }
            }
          }
          break;
    
        case 'admin/system/modules#description':
          $output = t("The core that allows content to be submitted to the site.");
          break;
        case 'admin/system/modules/node':
          $output = t("Settings for the core of Drupal. Almost everything is a node so these settings will affect most of the site.");
          break;
        case 'admin/node':
          $output = t("Below is a list of all of the nodes in your site. Other forms of content are listed elsewhere (e.g. %comments).<br />Clicking a title views that node, while clicking an author's name edits their user information.<br />Other node-related tasks are available from the menu on the left.", array("%comments" => l(t("comments"), "admin/comment")));
          break;
        case 'admin/node/search':
          $output = t("Enter a simple pattern to search for a post. This can include the wildcard character *.<br />For example, a search for \"br*\" might return \"bread bakers\", \"our daily bread\" and \"brenda\".");
          break;
        case 'admin/node/settings':
          $output = t("This page lets you set the defaults used during creation of nodes for all the different node types.<br /><b>comment:</b> Read/write setting for comments.<br /><b>publish:</b> Is this node publicly viewable, has it been published?<br /><b>promote:</b> Is this node to be promoted to the front page?<br /><b>moderate:</b> Does this node need approval before it can be viewed?<br /><b>static:</b> Is this node always visible on the front page?<br /><b>revision:</b> Will this node go into the revision system allowing multiple versions to be saved?");
          break;
    
      }
    
      return $output;
    }
    
    /*
    ** Accepts a DB result object which can be used to fetch node objects.
    ** Returns an HTML list suitable as content for a block.
    */
    function node_title_list($result, $title = NULL) {