summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-06-26 19:13:32 +0000
committerDries Buytaert2003-06-26 19:13:32 +0000
commit1758fe779fca559faf255e5e5c9816e67fecb677 (patch)
treec742abd60dac3cc4606567a2c18987c1074b957f
parent594aff05f1acae4a8110ae132c7d302967da8f16 (diff)
*** empty log message ***
-rw-r--r--modules/block.module5
-rw-r--r--modules/block/block.module5
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/block.module b/modules/block.module
index e2da7eb..f840679 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -5,7 +5,10 @@ function block_help() {
$output .= "<p>Blocks are the boxes visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but you can also create your own blocks using either static HTML or dynamic PHP content.</p>";
$output .= "<p>Which sidebar each block appears in depends on which theme you're using (some are left-only, some right, some both), and also on the settings in block management.</p><p>Whether a block is visible in the first place depends on three things:</p><ul><li>It must have its \"enabled\" box checked in block management.</li><li>If it has its \"custom\" box checked in block management, the user must have chosen to display it in their user preferences.</li><li>If the \"path\" field in block management is set, the visitor must be on a page that matches the path specification (more on this later).</li></ul>";
$output .= "<p>The block management screen also lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a <b>weight</b> to each block. Lighter blocks (smaller weight) \"float up\" towards the top of the sidebar. Heavier ones \"sink down\" towards the bottom of it. Once you've positioned things just so, you can preview what the layout will look like in different types of themes by clicking the preview placement link in the menu to the left.</p>";
- $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!";
+ $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 .= "<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>";
diff --git a/modules/block/block.module b/modules/block/block.module
index e2da7eb..f840679 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -5,7 +5,10 @@ function block_help() {
$output .= "<p>Blocks are the boxes visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but you can also create your own blocks using either static HTML or dynamic PHP content.</p>";
$output .= "<p>Which sidebar each block appears in depends on which theme you're using (some are left-only, some right, some both), and also on the settings in block management.</p><p>Whether a block is visible in the first place depends on three things:</p><ul><li>It must have its \"enabled\" box checked in block management.</li><li>If it has its \"custom\" box checked in block management, the user must have chosen to display it in their user preferences.</li><li>If the \"path\" field in block management is set, the visitor must be on a page that matches the path specification (more on this later).</li></ul>";
$output .= "<p>The block management screen also lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a <b>weight</b> to each block. Lighter blocks (smaller weight) \"float up\" towards the top of the sidebar. Heavier ones \"sink down\" towards the bottom of it. Once you've positioned things just so, you can preview what the layout will look like in different types of themes by clicking the preview placement link in the menu to the left.</p>";
- $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!";
+ $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 .= "<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>";