Commit 74d9266b authored by Dries's avatar Dries

- Bugfix: fixed calendar block caching.  Patch by Al.  Fixes bug #2131.

- Improvement: improved the block module documentation.  Patch #59 by
  Gerhard.
parent da80e620
......@@ -150,7 +150,7 @@ function archive_calendar($original = 0) {
$output .= "</table></div>\n\n";
cache_set("archive:calendar:$first", $output, time() + variable_get("cache_clear", 120));
cache_set("archive:calendar:$start_of_month", $output, time() + variable_get("cache_clear", 120));
return $output;
}
......
......@@ -150,7 +150,7 @@ function archive_calendar($original = 0) {
$output .= "</table></div>\n\n";
cache_set("archive:calendar:$first", $output, time() + variable_get("cache_clear", 120));
cache_set("archive:calendar:$start_of_month", $output, time() + variable_get("cache_clear", 120));
return $output;
}
......
......@@ -8,7 +8,7 @@ function block_help() {
$output .= "<p>The path setting lets you define on which pages you want a specific block to be shown. If you leave the path blank it will show on all pages. The path uses a regular expression syntax so remember to escape special characters!</p>";
$output .= "<p>In case you should not know what a regular expression is, you should read about them in the PHP manual. The chapter to look at is the one on <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expressions (PCRE)</a>.</p>";
$output .= "<p>However, for basic tasks it is sufficient to look at the following examples:</p>";
$output .= "<p>If the block should only show up on blog pages, use &lt;^/blog&gt;. To display on all node views use &lt;^/node/view&gt;. The angular brackets are used as delimiters of the regular expression. The caret indicates the start of the path. To show up on either forum or book pages use &lt;^(/forum|/book)&gt;. The round brackets form a group of expressions, divided by the | character. It matches if any of the expressions in it match. A more complicated example is &lt;^/node/add/(story|blog|image)&gt;. Blocks which have their paths set to this expression will show up on story, block, or image composition pages.</p>";
$output .= "<p>If the block should only show up on blog pages, use &lt;/blog&gt;. To display on all node views use &lt;/node/view&gt;. The angular brackets are used as delimiters of the regular expression. To show up on either forum or book pages use &lt;(/forum|/book)&gt;. The round brackets form a group of expressions, divided by the | character. It matches if any of the expressions in it match. A more complicated example is &lt;/node/add/(story|blog|image)&gt;. Blocks which have their paths set to this expression will show up on story, block, or image composition pages.</p>";
$output .= "<h3>Custom Blocks</h3>";
$output .= "<p>A custom block is a block that contains admin-supplied HTML, text or PHP content (as opposed to being generated automatically by a module). Each custom block consists of a title, a description, and a body of text, HTML, or PHP code which can be as long as you wish. The Drupal engine will 'render' the content of the custom block.</p>";
$output .= "<h4>PHP in custom blocks</h4>";
......
......@@ -8,7 +8,7 @@ function block_help() {
$output .= "<p>The path setting lets you define on which pages you want a specific block to be shown. If you leave the path blank it will show on all pages. The path uses a regular expression syntax so remember to escape special characters!</p>";
$output .= "<p>In case you should not know what a regular expression is, you should read about them in the PHP manual. The chapter to look at is the one on <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expressions (PCRE)</a>.</p>";
$output .= "<p>However, for basic tasks it is sufficient to look at the following examples:</p>";
$output .= "<p>If the block should only show up on blog pages, use &lt;^/blog&gt;. To display on all node views use &lt;^/node/view&gt;. The angular brackets are used as delimiters of the regular expression. The caret indicates the start of the path. To show up on either forum or book pages use &lt;^(/forum|/book)&gt;. The round brackets form a group of expressions, divided by the | character. It matches if any of the expressions in it match. A more complicated example is &lt;^/node/add/(story|blog|image)&gt;. Blocks which have their paths set to this expression will show up on story, block, or image composition pages.</p>";
$output .= "<p>If the block should only show up on blog pages, use &lt;/blog&gt;. To display on all node views use &lt;/node/view&gt;. The angular brackets are used as delimiters of the regular expression. To show up on either forum or book pages use &lt;(/forum|/book)&gt;. The round brackets form a group of expressions, divided by the | character. It matches if any of the expressions in it match. A more complicated example is &lt;/node/add/(story|blog|image)&gt;. Blocks which have their paths set to this expression will show up on story, block, or image composition pages.</p>";
$output .= "<h3>Custom Blocks</h3>";
$output .= "<p>A custom block is a block that contains admin-supplied HTML, text or PHP content (as opposed to being generated automatically by a module). Each custom block consists of a title, a description, and a body of text, HTML, or PHP code which can be as long as you wish. The Drupal engine will 'render' the content of the custom block.</p>";
$output .= "<h4>PHP in custom blocks</h4>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment