function quotes_help in Quotes 5
Same name and namespace in other branches
- 6 quotes.module \quotes_help()
- 7 quotes.module \quotes_help()
Implementation of hook_help().
File
- ./
quotes.module, line 1007
Code
function quotes_help($path, $args = NULL) {
switch ($path) {
case 'node/add#quotes':
return t('A quote is a famous, infamous, humorous, witty, or otherwise noteworthy quotation or fortune file entry. Quotes can be entered one at a time or mass imported in either tab-separated text or fortune file format.');
case 'node/add/quotes':
return t('Use the form below to enter a single quote.') . (user_access('import quotes') ? ' ' . t('Multiple quotes can also be !mass imported in either tab-separted text or fortune file format.', array(
'!mass imported' => l(t('mass imported'), 'node/add/quotes/import'),
)) : '');
case 'node/add/quotes/import':
$output = t('<p>Use the form below to mass import quotes in either tab-separated text or fortune file format.
Many quotes will be imported in this one step by creating an individual node for each imported quote.
Expand the %Notes section below for more information.</p>', array(
'%Notes' => t('Notes'),
));
$output .= theme('fieldset', array(
'#title' => t('Notes for importing'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#value' => t('<ul>
<li>Tab-separated quotes should appear one quote per line in the format
<em><span style="color: blue;">quote</span><span style="color: red;"><tab></span><span style="color:
green;">author</span></em>. The author and citation are optional; however, the tab is still required.
To import quotes, authors, or citations with more than one line, escape the embedded newlines with a backslash.
Examples:
<pre style="font-size: .75em;">
<span style="color: blue;">Single-line quote.</span><em style="color: red;"><tab></em><span style="color: green;">Author</span>
<span style="color: blue;">Quote without author.</span><em style="color: red;"><tab></em>
<span style="color: blue;">Multi-line quote: line 1...\\
...line 2.</span><em style="color: red;"><tab></em><span style="color: green;">Author line 1\\
Author line 2</span>
<span style="color: blue;">Another quote.<em style="color: red;"><tab></em><span style="color: green;">Another Author</span>
</pre></li>
<li>Fortune files do not explicitly provide an author or attribution
for each quote/fortune. This import will extract an author when
there is a line of the form <em>-- Author</em> with any amount of
leading whitespace. Examples:
<pre style="font-size: .75em;">
<span style="color: blue;">A fortune without an author.</span>
<em style="color: red;">%</em>
<span style="color: blue;">Fortune with author.</span>
--<span style="color: green;">Author</span>
<em style="color: red;">%</em>
<span style="color: blue;">Multi-line fortune: line 1...
...line 2.</span>
-- <span style="color: green;">Author line 1
Author line 2</span>
</pre></li>
<li>Any settings used in the form below (comment, moderation, sticky,
input format, categories, etc.) will be applied to all imported
quotes.</li>
<li>The title entered below will be applied to all quotes. You can use
the variable <em>%id</em> in the title which will be replaced by
the newly-created quote\'s node ID.</li>
<li>Fortune files and tab-separated text data can contain many
quotes. To avoid timeout errors while importing large amounts of
data, consider importing in smaller chunks with no more than 1000
quotes at a time.</li>
<li>If the path module is enabled, you cannot create a path alias
while importing, as the import will attempt to use the same path
for every quote.</li>
</ul>
'),
));
return $output;
case 'admin/settings/quotes':
$text = t('This page displays the status of, and settings for, the quotes module. The permissions for this module are found <a href="!url">here</a>.', array(
'!url' => url('admin/user/access'),
));
$text .= '<p>Version: ' . QUOTES_VERSION . '</p>';
return $text;
case 'admin/settings/quotes/blocks':
return t('You can define any number of blocks that will each display a randomly-selected quote,
the most-recent quotes, or unpublished quotes. The quotes displayed
in each block can be restricted to certain node IDs, roles, users, or
categories. Each block has a name that is used for identification on
on the !block administration page and as the default title when the
block is displayed.', array(
'!block administration page' => l(t('block administration page'), 'admin/build/block'),
));
case 'admin/settings/quotes/add':
return t('Use the form below to define a new quote block.');
case 'admin/help#quotes':
return t('The quotes module allows users to maintain a list of quotations that
they find notable, humorous, famous, infamous, or otherwise worthy of
sharing with website visitors. The quotes can be displayed in any
number of administrator-defined blocks. These blocks will display
quotes based on the restrictions of each block. Blocks can be
configured to restrict to certain nodes, roles, users, or categories.');
case 'user/' . arg(1) . '/quotes':
case 'quotes/author/' . arg(1):
case 'quotes/author':
case 'quotes/' . arg(1):
case 'quotes':
$links = array();
if (user_access('create quotes')) {
$links['add'] = array(
'title' => t('Add another'),
'href' => 'node/add/quotes',
);
}
if (user_access('administer quotes')) {
$links['admin'] = array(
'title' => t('Settings'),
'href' => 'admin/settings/quotes',
'query' => drupal_get_destination(),
);
}
return theme('links', $links);
}
}