Revision 6e9292aa
Added by Assos Assos over 9 years ago
drupal7/sites/all/modules/advanced_help/advanced-help-popup.tpl.php | ||
---|---|---|
34 | 34 |
</div> <!-- /content-content --> |
35 | 35 |
</div> <!-- /content --> |
36 | 36 |
|
37 |
<?php print $closure; ?> |
|
37 |
<!-- |
|
38 |
See comment about $closure in main module. |
|
39 |
print $closure; |
|
40 |
--> |
|
38 | 41 |
|
39 | 42 |
</div> <!-- /page --> |
40 | 43 |
</body> |
drupal7/sites/all/modules/advanced_help/advanced_help.info | ||
---|---|---|
10 | 10 |
attributions[click_icon][license] = 'Creative Commons 0' |
11 | 11 |
attributions[click_icon][license_url] = 'https://creativecommons.org/publicdomain/zero/1.0/' |
12 | 12 |
|
13 |
; Information added by Drupal.org packaging script on 2015-03-27
|
|
14 |
version = "7.x-1.2"
|
|
13 |
; Information added by Drupal.org packaging script on 2015-05-25
|
|
14 |
version = "7.x-1.3"
|
|
15 | 15 |
core = "7.x" |
16 | 16 |
project = "advanced_help" |
17 |
datestamp = "1427460482"
|
|
17 |
datestamp = "1432557782"
|
|
18 | 18 |
|
drupal7/sites/all/modules/advanced_help/advanced_help.install | ||
---|---|---|
50 | 50 |
'primary key' => array('sid'), |
51 | 51 |
'indexes' => array('language' => array('language')), |
52 | 52 |
'foreign keys' => array( |
53 |
'module' => array('system' => 'name'), |
|
53 |
'system' => array( |
|
54 |
'table' => 'system', |
|
55 |
'columns' => array('name' => 'name'), |
|
56 |
), |
|
54 | 57 |
), |
55 | 58 |
); |
56 | 59 |
|
drupal7/sites/all/modules/advanced_help/advanced_help.module | ||
---|---|---|
34 | 34 |
|
35 | 35 |
/** |
36 | 36 |
* Implements hook_menu(). |
37 |
* |
|
38 |
* Strings in hook_help() should not be run through t(). |
|
37 | 39 |
*/ |
38 | 40 |
function advanced_help_menu() { |
39 |
// View help topic index. |
|
40 |
// |
|
41 |
// This is structured little oddly so that POTX can handle the translation. |
|
42 |
if (module_exists('help')) { |
|
43 |
$items['admin/advanced_help'] = array( |
|
44 |
'title' => 'Advanced help', |
|
41 |
$help_exists = module_exists('help') ? TRUE : FALSE; |
|
42 |
if ($help_exists) { |
|
43 |
// Add tabs to core Help page to access Advanced Help. |
|
44 |
$items['admin/help/tab1'] = array( |
|
45 |
'title' => 'Help', |
|
46 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
|
47 |
'weight' => 0, |
|
48 |
); |
|
49 |
|
|
50 |
$items['admin/help/ah'] = array( |
|
51 |
'title' => 'Advanced Help', |
|
45 | 52 |
'page callback' => 'advanced_help_index_page', |
46 | 53 |
'access arguments' => array('view advanced help index'), |
47 |
'weight' => 9, |
|
54 |
'type' => MENU_LOCAL_TASK, |
|
55 |
'weight' => 2, |
|
48 | 56 |
); |
49 | 57 |
} |
50 | 58 |
else { |
51 |
$items['admin/advanced_help'] = array( |
|
59 |
// Make Advanced Help the normal help. |
|
60 |
$items['admin/help/ah'] = array( |
|
52 | 61 |
'title' => 'Help', |
53 | 62 |
'page callback' => 'advanced_help_index_page', |
54 | 63 |
'access arguments' => array('view advanced help index'), |
64 |
'type' => MENU_NORMAL_ITEM, |
|
55 | 65 |
'weight' => 9, |
56 | 66 |
); |
57 | 67 |
} |
58 |
$items['advanced_help/search/%'] = array(
|
|
68 |
$items['help/ah/search/%'] = array(
|
|
59 | 69 |
'title' => 'Search help', |
60 | 70 |
'page callback' => 'advanced_help_search_view', |
61 | 71 |
'page arguments' => array('advanced_help'), |
... | ... | |
134 | 144 |
if (!isset($return)) { |
135 | 145 |
// Extract keys as remainder of path |
136 | 146 |
// Note: support old GET format of searches for existing links. |
137 |
$path = explode('/', $_GET['q'], 3);
|
|
147 |
$path = explode('/', $_GET['q'], 4);
|
|
138 | 148 |
$keys = empty($_REQUEST['keys']) ? '' : $_REQUEST['keys']; |
139 |
$return = count($path) == 3 ? $path[2] : $keys;
|
|
149 |
$return = count($path) == 4 ? $path[3] : $keys;
|
|
140 | 150 |
} |
141 | 151 |
return $return; |
142 | 152 |
} |
... | ... | |
149 | 159 |
return drupal_not_found(); |
150 | 160 |
} |
151 | 161 |
|
152 |
$breadcrumb[] = advanced_help_l(t('Help'), 'admin/advanced_help');
|
|
162 |
$breadcrumb[] = advanced_help_l(t('Advanced help'), 'admin/help/ah');
|
|
153 | 163 |
|
154 | 164 |
if (!isset($_POST['form_id'])) { |
155 | 165 |
$keys = advanced_help_search_get_keys(); |
... | ... | |
216 | 226 |
advanced_help_get_topic_hierarchy($topics); |
217 | 227 |
$items = advanced_help_get_tree($topics, $topics[$module]['']['children']); |
218 | 228 |
|
219 |
$breadcrumb[] = advanced_help_l(t('Help'), 'admin/advanced_help');
|
|
229 |
$breadcrumb[] = advanced_help_l(t('Advanced help'), 'admin/help/ah');
|
|
220 | 230 |
|
221 | 231 |
drupal_set_title(t('@module help index', array('@module' => advanced_help_get_module_name($module)))); |
222 | 232 |
$output['items-module'] = array( |
... | ... | |
247 | 257 |
else { |
248 | 258 |
$name = t($module_name); |
249 | 259 |
} |
250 |
$items[] = advanced_help_l($name, "admin/advanced_help/$module");
|
|
260 |
$items[] = advanced_help_l($name, "admin/help/ah/$module");
|
|
251 | 261 |
} |
252 | 262 |
} |
253 | 263 |
|
254 |
drupal_set_title(t('Module help index'));
|
|
264 |
drupal_set_title(t('Advanced help'));
|
|
255 | 265 |
$output['items-nomodule'] = array( |
256 | 266 |
'#theme' => 'item_list', |
257 | 267 |
'#items' => $items, |
... | ... | |
362 | 372 |
$form['modules'][$group][$module]['links']['help'] = array( |
363 | 373 |
'#type' => 'link', |
364 | 374 |
'#title' => t('Help'), |
365 |
'#href' => "admin/advanced_help/$module",
|
|
375 |
'#href' => "admin/help/ah/$module",
|
|
366 | 376 |
'#options' => array( |
367 | 377 |
'attributes' => array( |
368 | 378 |
'class' => array('module-link', 'module-link-help'), |
... | ... | |
383 | 393 |
*/ |
384 | 394 |
function advanced_help_search_form($form, &$form_state, $keys = '') { |
385 | 395 |
module_load_include('inc', 'search', 'search.pages'); |
386 |
$form = search_form($form, $form_state, 'admin/advanced_help', $keys, 'advanced_help', t('Search help'));
|
|
396 |
$form = search_form($form, $form_state, 'admin/help/ah', $keys, 'advanced_help', t('Search help'));
|
|
387 | 397 |
|
388 | 398 |
$form['basic']['inline']['submit']['#validate'] = array('search_form_validate'); |
389 | 399 |
$form['basic']['inline']['submit']['#submit'] = array('advanced_help_search_form_submit'); |
... | ... | |
404 | 414 |
$popup = !empty($_GET['popup']) && user_access('view advanced help popup'); |
405 | 415 |
|
406 | 416 |
if ($popup) { |
407 |
$form_state['redirect'] = array('advanced_help/search/' . $keys, array('query' => array('popup' => 'true')));
|
|
417 |
$form_state['redirect'] = array('help/ah/search/' . $keys, array('query' => array('popup' => 'true')));
|
|
408 | 418 |
} |
409 | 419 |
else { |
410 |
$form_state['redirect'] = 'advanced_help/search/' . $keys;
|
|
420 |
$form_state['redirect'] = 'help/ah/search/' . $keys;
|
|
411 | 421 |
} |
412 | 422 |
} |
413 | 423 |
|
... | ... | |
477 | 487 |
$breadcrumb[] = advanced_help_l($parent['title'], "help/$pmodule/$ptopic"); |
478 | 488 |
} |
479 | 489 |
|
480 |
$breadcrumb[] = advanced_help_l(advanced_help_get_module_name($pmodule), "admin/advanced_help/$pmodule");
|
|
481 |
$breadcrumb[] = advanced_help_l(t('Help'), "admin/advanced_help");
|
|
490 |
$breadcrumb[] = advanced_help_l(advanced_help_get_module_name($pmodule), "admin/help/ah/$pmodule");
|
|
491 |
$breadcrumb[] = advanced_help_l(t('Help'), "admin/help/ah");
|
|
482 | 492 |
|
483 | 493 |
$output = advanced_help_view_topic($module, $topic, $popup); |
484 | 494 |
if (empty($output)) { |
... | ... | |
646 | 656 |
} |
647 | 657 |
} |
648 | 658 |
else { |
649 |
$output = '<div class="advanced-help-topic"><pre class="readme">' . check_plain($output) . '</pre></div>'; |
|
659 |
$readme = ''; |
|
660 |
if ('md' == $ext) { |
|
661 |
$readme .= |
|
662 |
'<p>' . |
|
663 |
t('If you install the !module module, the text below will be filtered by the module, producing rich text.', |
|
664 |
array('!module' => l(t('Markdown filter'), |
|
665 |
'https://www.drupal.org/project/markdown', |
|
666 |
array('attributes' => array('title' => t('Link to project.')))))) . '</p>'; |
|
667 |
} |
|
668 |
$readme .= |
|
669 |
'<div class="advanced-help-topic"><pre class="readme">' . check_plain($output) . '</pre></div>'; |
|
670 |
$output = $readme; |
|
650 | 671 |
} |
651 | 672 |
return $output; |
652 | 673 |
} |
... | ... | |
705 | 726 |
$up = "help/$parent[0]/$parent[1]"; |
706 | 727 |
} |
707 | 728 |
else { |
708 |
$up = "admin/advanced_help/$module";
|
|
729 |
$up = "admin/help/ah/$module";
|
|
709 | 730 |
} |
710 | 731 |
|
711 | 732 |
$siblings = $topics[$parent_module][$parent_topic]['children']; |
... | ... | |
1109 | 1130 |
$variables['content'] = drupal_render($variables['content']); |
1110 | 1131 |
} |
1111 | 1132 |
// Closure should be filled last. |
1112 |
$variables['closure'] = theme('closure'); |
|
1133 |
// There has never been a theme hook for closure (going back to |
|
1134 |
// first release 2008-04-17). Unable to figure out its purpose. |
|
1135 |
// $variables['closure'] = theme('closure'); |
|
1113 | 1136 |
} |
1114 | 1137 |
|
1115 | 1138 |
/** |
drupal7/sites/all/modules/advanced_help/help-popup.css | ||
---|---|---|
116 | 116 |
padding: 0; |
117 | 117 |
} |
118 | 118 |
|
119 |
code, |
|
120 | 119 |
pre { |
121 | 120 |
background: #f1f1f1; |
122 |
border: 1px solid #444;
|
|
121 |
border: 1px solid #ccc;
|
|
123 | 122 |
display: block; |
124 | 123 |
margin: 1em; |
125 | 124 |
padding: .2em; |
drupal7/sites/all/modules/advanced_help/help.css | ||
---|---|---|
6 | 6 |
padding: .4em; |
7 | 7 |
} |
8 | 8 |
|
9 |
.advanced-help-topic p.bob { |
|
10 |
background: #f1f1f1; |
|
11 |
border: 1px solid #ccc; |
|
12 |
display: block; |
|
13 |
margin: 1em; |
|
14 |
padding: .4em; |
|
15 |
} |
|
16 |
|
|
9 | 17 |
.advanced-help-topic pre.readme { |
10 | 18 |
background: white; |
11 | 19 |
border: none; |
... | ... | |
40 | 48 |
width: 42%; |
41 | 49 |
} |
42 | 50 |
|
51 |
.help-leftalign { |
|
52 |
text-align: left; |
|
53 |
} |
|
54 |
|
|
43 | 55 |
.help-up { |
44 | 56 |
display: block; |
45 | 57 |
float: left; /* LTR */ |
drupal7/sites/all/modules/advanced_help/help/readme.html | ||
---|---|---|
12 | 12 |
provide help texts for, but also that read access to these files |
13 | 13 |
are not managed by any content access restrictions imposed by Drupal.</p> |
14 | 14 |
|
15 |
<p>The help texts can be marked up with standard HTML, but are
|
|
16 |
rendered within your site's Drupal theming structure.</p>
|
|
15 |
<p>The help texts can be marked up with standard HTML. They will be
|
|
16 |
rendered using your site's theme.</p>
|
|
17 | 17 |
|
18 |
<p>If the module or theme author does not make use of the full
|
|
19 |
<em>Advanced help</em> framework, but if there is a |
|
18 |
<p>If the module or theme author does not make use of the |
|
19 |
<em>Advanced help</em> HTML-framework, but if there is a
|
|
20 | 20 |
<code>README.md</code> or <code>README.txt</code> in the package, |
21 | 21 |
the content of that file will be shown instead.</p> |
22 | 22 |
|
23 |
<p>The help texts may appear in a popup or not as the module prefers.
|
|
23 |
<p>The help texts may appear in a popup or not as the project prefers.
|
|
24 | 24 |
By taking away access to view the popups, a site can hide popups from |
25 | 25 |
users.</p> |
26 | 26 |
|
27 | 27 |
<p>The help texts can be placed in a hierarchy, allowing for top down |
28 | 28 |
navigation of help.</p> |
29 | 29 |
|
30 |
<p>The hierarchy is tied into Drupal's search system. If this is
|
|
30 |
<p>The help texts may be made searchable. If advanced help search is
|
|
31 | 31 |
enabled, all help texts are fully indexed. This means that the entire |
32 | 32 |
contents of the advanced help set of pages can be searched for |
33 | 33 |
keywords.</p> |
34 | 34 |
|
35 | 35 |
<h2 id="use">Using the module</h2> |
36 | 36 |
|
37 |
<p>When you enable the module, a new tab with the legend “Advanced |
|
38 |
help” will show up under “Help”: |
|
39 |
|
|
40 |
<div class="ta-center"> |
|
41 |
<img class="help-img-center" alt="ahelp_tab.png" src="&path&ahelp_tab.png" width="661" height="225" border="1" /> |
|
42 |
</div> |
|
43 |
|
|
37 | 44 |
<p>By itself, this module doesn't do much. The <strong>Advanced |
38 | 45 |
help</strong> assists other modules and themes in showing help texts. |
39 | 46 |
Nothing will show up until you enable at least one other module that |
... | ... | |
44 | 51 |
For more extensive example of use of the advanced help features, see |
45 | 52 |
the <strong>Views</strong> project.</p> |
46 | 53 |
|
54 |
<!-- |
|
47 | 55 |
<h2 id="project-recommended">Recommended modules</h2> |
48 | 56 |
|
49 | 57 |
<ul> |
50 |
<!-- |
|
51 | 58 |
<li><a href="https://www.drupal.org/project/markdown">Markdown filter</a>:<br> |
52 | 59 |
When this module is enabled, display of any <code>README.md</code> the |
53 | 60 |
module shows will be rendered with markdown.</li> |
54 |
--> |
|
55 | 61 |
<li><a href="https://www.drupal.org/project/attributions">Attributions</a>:<br> |
56 | 62 |
When this module is enabled, attributions of third party content used |
57 | 63 |
by the project (i.e. some text from Wikipedia) will be available in an |
58 | 64 |
attribution block and on an atribution page.</li> |
59 | 65 |
</ul> |
66 |
--> |
|
60 | 67 |
|
61 | 68 |
<h2 id="support-status">Support status</h2> |
62 | 69 |
|
... | ... | |
95 | 102 |
<li><a href="https://www.drupal.org/u/redndahead">redndahead</a> (8 commits)</li> |
96 | 103 |
<li><a href="https://www.drupal.org/u/dmitrig01">dmitrig01</a> (3 commits)</li> |
97 | 104 |
<li><a href="https://www.drupal.org/u/amitgoyal">amitgoyal </a> (5 commits)</li> |
98 |
<li><a href="https://www.drupal.org/u/gisle">gisle</a> (current maintainer)</li> |
|
105 |
<li><a href="https://www.drupal.org/u/gisle">gisle</a> (current maintainer, D7)</li> |
|
106 |
<li><a href="https://www.drupal.org/u/gnuget">gnuget</a> (current maintainer, D8)</li> |
|
99 | 107 |
</ul> |
drupal7/sites/all/modules/advanced_help/help/translation.html | ||
---|---|---|
1 |
<p>To translate advanced help, first create a
|
|
2 |
directory <code>translations/help/<em>language</em></code> in the
|
|
3 |
module directory. Then, copy the .ini file and all the .html files
|
|
4 |
from the help directory into this. If you need to alter an image to
|
|
5 |
use it in a translation, you also put the altered image there.</p>
|
|
1 |
<p>To translate a help-file indexed by <strong>Advanced help</strong>,
|
|
2 |
first create a directory
|
|
3 |
<code>translations/help/<em>language</em></code> in the project's
|
|
4 |
root directory. The <em>language</em> is the language code that
|
|
5 |
appears on the <em>Languages</em> page in the administrative UI.</p>
|
|
6 | 6 |
|
7 |
<p>The .ini file only needs to keep the titles, and if there is |
|
7 |
<p>Then, copy the <code>.ini</code> file and all |
|
8 |
the <code>.html</code> files from the help directory into this. If |
|
9 |
you need to alter an image to use it in a translation, you may also |
|
10 |
put the altered image there.</p> |
|
11 |
|
|
12 |
<p>In the topics section, the <code>.ini</code> file only needs to |
|
13 |
keep the topic names (unaltered) and titles (translated). If there is |
|
8 | 14 |
a <code>name</code> or <code>index name</code> setting in the |
9 | 15 |
'advanced help settings' portion, that should be retained. Any |
10 | 16 |
retained settings should be translated. The rest of the data in the |
11 |
.ini file may be discarded or ignored.</p> |
|
17 |
<code>.ini</code> file may be discarded or ignored.</p> |
|
18 |
|
|
19 |
<p>Each <code>.html</code> file should then be translated in place.</p> |
|
20 |
|
|
21 |
<p>When translating a <code>.html</code> file, you will find that |
|
22 |
the <code>&path&</code> keyword (used for images and links) |
|
23 |
will lead to the original directory. If you must translate items that |
|
24 |
are linked, such as images containing text, |
|
25 |
use <code>&trans_path&</code> instead, which will lead to the |
|
26 |
translated directory. This will allow you to pick and choose which |
|
27 |
linked items, if any, will be translated.</p> |
|
28 |
|
|
29 |
<p>If a topic is not tranlated, the default (untranslated) version |
|
30 |
will be shown instead.</p> |
|
31 |
|
|
32 |
<h2>Translating Advanced help's help files</h2> |
|
12 | 33 |
|
13 |
<p>Each file should then be translated in place.</p> |
|
34 |
<p>If you want to help with the translation of |
|
35 |
<strong>Advanced help</strong> help texts for a particular language, look for an issue named named “Translation to XXX” (where |
|
36 |
“XXX” is the language you want to translate the help texts to) in the <a href="https://www.drupal.org/project/issues/advanced_help">issue queue for Advanced help</a>. |
|
37 |
If such an issue does not exist, please can create it. |
|
38 |
Choose <em>Category</em> “Task”, |
|
39 |
<em>Status</em> “Needs review” and |
|
40 |
<em>Component</em> “Documentation”. |
|
41 |
Upload translated files as an attachment (change the file type from <code>.html</code> to <code>.txt</code> to be allowed to upload). </p> |
|
14 | 42 |
|
15 |
<p>When translating a .html file, you will find that |
|
16 |
the <code>&path&</code> keyword will lead to the original |
|
17 |
directory. If you must translate items that are linked, such as images |
|
18 |
containing text, use <code>&trans_path&</code> instead, which |
|
19 |
will lead to the translated directory. This will allow you to pick and |
|
20 |
choose which linked items, if any, will be translated.</p> |
|
43 |
<p>Uploaded translations will be included in the next version if |
|
44 |
reviewed and approved by other users (i.e. gets to status “RTBC”).</p> |
drupal7/sites/all/modules/advanced_help/help/using-advanced-help.html | ||
---|---|---|
1 | 1 |
<p>The <strong>Advanced help</strong> module provides a framework that |
2 | 2 |
allows module and theme developers integrate help texts in a Drupal |
3 |
site. Although the advanced help does not provide general help by
|
|
4 |
itself, it provides a powerful and easy framework that modules and
|
|
5 |
themes may use to provide their own help.</p> |
|
3 |
site. Although the <strong>Advanced help</strong> does not provide
|
|
4 |
general help by itself, it provides a powerful and easy framework that
|
|
5 |
modules and themes may use to provide their own help.</p>
|
|
6 | 6 |
|
7 | 7 |
<p>Modules and themes utilizing <strong>Advanced help</strong> should |
8 | 8 |
create a subdirectory named <code>help</code> inside their own main |
... | ... | |
33 | 33 |
parent = usage |
34 | 34 |
</pre> |
35 | 35 |
|
36 |
<p>This file defines five help topics (inside the square brackets, and |
|
36 |
<p>This file defines five help topics (inside the square brackets), and
|
|
37 | 37 |
some settings for them. |
38 | 38 |
See: <a href="&topic:advanced_help/ini-file&">Advanced help .ini file format</a> for |
39 | 39 |
a list of defined settings.</p> |
... | ... | |
86 | 86 |
<p>This format will ensure the popup status remains consistent when |
87 | 87 |
switching between links.</p> |
88 | 88 |
|
89 |
<p>To reference items within the help directory, such as images you |
|
90 |
wish to embed within the help text, use:</p> |
|
89 |
<p>To reference items within the help directory, such as images you wish to embed within the help text, use:</p>
|
|
90 |
|
|
91 | 91 |
<pre> |
92 | 92 |
<img src="&path&example.png"/> |
93 | 93 |
<img src="&trans_path&example.png"/> |
94 | 94 |
</pre> |
95 | 95 |
|
96 |
<p>The latter is to refer to a translated version of the image if it differs from the original.</p>
|
|
96 |
<p>The <code>trans_path</code> keyword refers to a translated version of the image in the translation directory and may be used it differs from the original.</p>
|
|
97 | 97 |
|
98 | 98 |
<p>To reference any normal path in the site, use:</p> |
99 | 99 |
<pre> |
... | ... | |
102 | 102 |
|
103 | 103 |
<p><strong>NOTE: </strong> In previous versions <strong>Advanced |
104 | 104 |
help</strong> did not require the &'s to be wrapped around |
105 |
<code>topic:</code>, <code>path</code>, and <code>base_url</code>.
|
|
106 |
This is currently still supported, but may be removed in a future
|
|
105 |
<code>topic</code>, <code>path</code>, and <code>base_url</code>. |
|
106 |
This is currently still supported, but will be removed in a future
|
|
107 | 107 |
version. By adding the &'s these tokens are now not limited |
108 | 108 |
to <code>href=""</code> and <code>src=""</code> parameters.</p> |
109 | 109 |
|
... | ... | |
130 | 130 |
</Files> |
131 | 131 |
</pre> |
132 | 132 |
|
133 |
<p>It as the responsibility of the project author to make sure this
|
|
134 |
type of protection is in place if the project's author has help files
|
|
135 |
that merits protection from direct access.</p>
|
|
133 |
<p>It as the responsibility of the site manager to make sure this type
|
|
134 |
of protection is in place if the site has help files that merits
|
|
135 |
protection from direct access.</p> |
|
136 | 136 |
|
137 | 137 |
<p>See also this tracker in the project's issue queue: |
138 | 138 |
<a href="https://www.drupal.org/node/1980936">#1980936 Typing complete path to .html help files in module bypasses user permissions</a>.</p> |
139 | 139 |
|
140 | 140 |
<h2 id="search">Search</h2> |
141 | 141 |
|
142 |
<p>To enable advanced help search, navigate to |
|
143 |
<em>Administration → Configuration → Search and metadata → Search settings</em>. |
|
144 |
Scroll down to <em>Active search modules</em> and tick the box to the |
|
145 |
left of “Advanced help”. The search form will appear on the top of |
|
146 |
the advanced help index pages.</p> |
|
147 |
|
|
142 | 148 |
<p>If the core <strong>Search</strong> module is enabled, the contents |
143 | 149 |
of the advanced help framework will be indexed on cron. If you enable |
144 | 150 |
new modules or themes and wish to immediately index their help text, |
145 |
navigate to <em>Administration → Reports → Status report</em> and click the link |
|
146 |
“run cron manually”.</p> |
|
151 |
navigate to <em>Administration → Reports → Status report</em> and |
|
152 |
click the link “run cron manually”.</p> |
drupal7/sites/all/modules/advanced_help/help_example/help/history.html | ||
---|---|---|
1 | 1 |
<div class="help-box help-left"> |
2 |
<div class="thumbinner" style="width:182px;"><a href="http://en.wikipedia.org/wiki/Image:Lerdorf.jpg" class="image" title="Rasmus Lerdorf, who wrote the original Common Gateway Interface binaries"><img alt="Rasmus Lerdorf, who wrote the original Common Gateway Interface binaries" src="path:180px-Lerdorf.jpg" width="180" height="270" border="0" class="thumbimage" /></a> |
|
3 |
<div class="thumbcaption"> |
|
4 |
<a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a>, who wrote the original <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" title="Common Gateway Interface">Common Gateway Interface</a> binaries</div> |
|
5 |
</div> |
|
2 |
<a href="http://en.wikipedia.org/wiki/Image:Lerdorf.jpg" class="image" title="Rasmus Lerdorf, who wrote the original Common Gateway Interface binaries"><img alt="Rasmus Lerdorf, who wrote the original Common Gateway Interface binaries" src="&path&180px-Lerdorf.jpg" width="180" height="270" border="0" /></a> |
|
3 |
<div><a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a>, who wrote the original <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" title="Common Gateway Interface">Common Gateway Interface</a> binaries.</div> |
|
6 | 4 |
</div> |
7 | 5 |
|
8 | 6 |
<p>PHP, standing for Personal Home Page, began as a set of <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" title="Common Gateway Interface">Common Gateway Interface</a> <a href="http://en.wikipedia.org/wiki/Binary_file" title="Binary file">binaries</a> written in the <a href="http://en.wikipedia.org/wiki/C_programming_language" class="mw-redirect" title="C programming language">C programming language</a> in 1994 by the <a href="http://en.wikipedia.org/wiki/Danish_people" title="Danish people">Danish</a>/<a href="http://en.wikipedia.org/wiki/Greenland" title="Greenland">Greenlandic</a> programmer <a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a>. Lerdorf initially created these Personal Home Page Tools to replace a small set of <a href="http://en.wikipedia.org/wiki/Perl" title="Perl">Perl</a> scripts he had been using to maintain his <a href="http://en.wikipedia.org/wiki/Personal_homepage" class="mw-redirect" title="Personal homepage">personal homepage</a>. The tools were originally created to perform tasks such as displaying his <a href="http://en.wikipedia.org/wiki/R%C3%A9sum%C3%A9" title="Résumé">résumé</a> and recording how much <a href="http://en.wikipedia.org/wiki/Web_traffic" title="Web traffic">traffic</a> his page was receiving. He combined these binaries with his Form Interpreter to create PHP/FI, which had more functionality. It included a larger <a href="http://en.wikipedia.org/wiki/C_%28programming_language%29" title="C (programming language)">C implementation</a> which could communicate with <a href="http://en.wikipedia.org/wiki/Database" title="Database">databases</a> and helped build simple, dynamic <a href="http://en.wikipedia.org/wiki/Web_application" title="Web application">web applications</a>. He released PHP publicly on <a href="http://en.wikipedia.org/wiki/June_8" title="June 8">June 8</a>, <a href="http://en.wikipedia.org/wiki/1995" title="1995">1995</a> to speed up the finding of <a href="http://en.wikipedia.org/wiki/Software_bug" title="Software bug">bugs</a> and improving the code. This release was named PHP version 2, and already had basic functionality that PHP has today. This includes Perl-like variables, form handling, and the ability to embed HTML. The syntax was similar to Perl but was more limited, simpler, and less consistent.</p> |
9 | 7 |
|
10 | 8 |
<div class="help-box help-right"> |
11 |
<div class="thumbinner" style="width:182px;"><a href="http://en.wikipedia.org/wiki/Image:Andi_Gutmans_1.jpg" class="image" title="Andi Gutmans, who, along with Zeev Suraski, rewrote the parser that formed PHP 3"><img alt="Andi Gutmans, who, along with Zeev Suraski, rewrote the parser that formed PHP 3" src="path:180px-Andi_Gutmans_1.jpg" width="180" height="244" border="0" class="thumbimage" /></a> |
|
12 |
<div class="thumbcaption"> |
|
13 |
<a href="http://en.wikipedia.org/wiki/Andi_Gutmans" title="Andi Gutmans">Andi Gutmans</a>, who, along with <a href="http://en.wikipedia.org/wiki/Zeev_Suraski" title="Zeev Suraski">Zeev Suraski</a>, rewrote the <a href="http://en.wikipedia.org/wiki/Parsing#Parser" title="Parser">parser</a> that formed PHP 3</div> |
|
14 |
</div> |
|
9 |
<a href="http://en.wikipedia.org/wiki/Image:Andi_Gutmans_1.jpg" class="image" title="Andi Gutmans, who, along with Zeev Suraski, rewrote the parser that formed PHP 3"><img alt="Andi Gutmans, who, along with Zeev Suraski, rewrote the parser that formed PHP 3" src="&path&180px-Andi_Gutmans_1.jpg" width="180" height="244" border="0" class="thumbimage" /></a> |
|
10 |
<div class="help-leftalign"><a href="http://en.wikipedia.org/wiki/Andi_Gutmans" title="Andi Gutmans">Andi Gutmans</a>, who, along with <a href="http://en.wikipedia.org/wiki/Zeev_Suraski" title="Zeev Suraski">Zeev Suraski</a>, rewrote the <a href="http://en.wikipedia.org/wiki/Parsing#Parser" title="Parser">parser</a> that formed PHP 3.</div> |
|
15 | 11 |
</div> |
12 |
|
|
16 | 13 |
<p><a href="http://en.wikipedia.org/wiki/Zeev_Suraski" title="Zeev Suraski">Zeev Suraski</a> and <a href="http://en.wikipedia.org/wiki/Andi_Gutmans" title="Andi Gutmans">Andi Gutmans</a>, two <a href="http://en.wikipedia.org/wiki/Israelis" title="Israelis">Israeli</a> developers at the <a href="http://en.wikipedia.org/wiki/Technion_IIT" class="mw-redirect" title="Technion IIT">Technion IIT</a>, rewrote the <a href="http://en.wikipedia.org/wiki/Parsing#Parser title="Parser">parser</a> in 1997 and formed the base of PHP 3, changing the language's name to the <a href="http://en.wikipedia.org/wiki/Recursive_initialism" class="mw-redirect" title="Recursive initialism">recursive initialism</a> <i>PHP: Hypertext Preprocessor</i>. The development team officially released PHP/FI 2 in November 1997 after months of <a href="http://en.wikipedia.org/wiki/Development_stage#beta" class="mw-redirect" title="Development stage">beta</a> testing. Afterwards, public testing of PHP 3 began, and the official launch came in June 1998. Suraski and Gutmans then started a new <a href="http://en.wikipedia.org/wiki/Rewrite_%28programming%29" title="Rewrite (programming)">rewrite</a> of PHP's core, producing the <a href="http://en.wikipedia.org/wiki/Zend_Engine" title="Zend Engine">Zend Engine</a> in 1999. They also founded <a href="http://en.wikipedia.org/wiki/Zend_Technologies" title="Zend Technologies">Zend Technologies</a> in <a href="http://en.wikipedia.org/wiki/Ramat_Gan" title="Ramat Gan">Ramat Gan</a>, Israel, which manages the development of PHP.</p> |
17 | 14 |
|
18 | 15 |
<p>On <a href="http://en.wikipedia.org/wiki/May_22" title="May 22">May 22</a>, <a href="http://en.wikipedia.org/wiki/2000" title="2000">2000</a>, PHP 4, powered by the Zend Engine 1.0, was released. On <a href="http://en.wikipedia.org/wiki/July_13" title="July 13">July 13</a>, <a href="http://en.wikipedia.org/wiki/2004" title="2004">2004</a>, PHP 5 was released and is powered by the new Zend Engine II. PHP 5 included new features such as improved support for <a href="http://en.wikipedia.org/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>, the PHP Data Objects extension (which defines a lightweight and consistent interface for accessing databases), and numerous performance enhancements. The most recent update released by The PHP Group is for the older PHP version 4 code branch. As of January 2008, this branch is up to version 4.4.8. PHP 4 will be supported by security updates until <a href="http://en.wikipedia.org/wiki/August_8" title="August 8">August 8</a>, <a href="http://en.wikipedia.org/wiki/2008" title="2008">2008</a>.</p> |
19 | 16 |
|
20 | 17 |
<p>PHP 5 is the only stable version still being developed. <a href="http://en.wikipedia.org/wiki/Late_static_binding" class="mw-redirect" title="Late static binding">Late static binding</a> has been missing from PHP and will be added in version 5.3. Development on PHP 4 ceased at the end of 2007, except for the critical security updates for PHP 4 already mentioned. PHP 6 is now under development and major changes include the removal of <code>register_globals</code>, <a href="http://en.wikipedia.org/wiki/Magic_quotes" title="Magic quotes">magic quotes</a>, and <a href="http://en.wikipedia.org/wiki/Safe_mode#Application_software_safe_mode" title="Safe mode">safe mode</a>. PHP does not have complete native support for <a href="http://en.wikipedia.org/Unicode" title="Unicode">Unicode</a> or multibyte strings; unicode support will be added in PHP 6. Many high profile open source projects ceased to support PHP 4 in new code as of <a href="http://en.wikipedia.org/wiki/February_5" title="February 5">February 5</a>, <a href="http://en.wikipedia.org/wiki/2008" title="2008">2008</a>, due to the GoPHP5 initiative, provided by a consortium of PHP developers promoting the transition from PHP 4 to PHP 5.</p> |
21 | 18 |
|
22 |
<p class="attribution">This excerpt is adapted from <a href="http://en.wikipedia.org/wiki/PHP#History">Wikipedia: PHP - history</a>. It is used here under a <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons BY-SA 3.0</a> license.</p> |
|
23 |
|
|
19 |
<p class="attribution">This excerpt is adapted from <a href="http://en.wikipedia.org/wiki/PHP#History">Wikipedia: PHP - history</a>. It is used here under a <a href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons BY-SA 3.0</a> license. |
|
20 |
Picture of Rasmus <a href="http://en.wikipedia.org/wiki/File:Lerdorf.jpg" title="Link to work">Lerdorf</a> by Jud Dagnall, available under <a href="http://creativecommons.org/licenses/by-sa/3.0/deed.en" title="Link to license">Creative Commons BY-SA 3.0</a>. |
|
21 |
Picture of <a href="http://en.wikipedia.org/wiki/File:Andi_Gutmans_1.jpg" title="Link to work">Andi Gutmans</a> by <a href="https://www.flickr.com/people/81342178@N00" title="Link to author">Jim Winstead</a>, available under <a href="http://creativecommons.org/licenses/by/2.0/deed.en" title="Link to license">Creative Commons BY 2.0</a>.</p> |
drupal7/sites/all/modules/advanced_help/help_example/help_example.info | ||
---|---|---|
32 | 32 |
attributions[gutmans][license] = 'Creative Commons BY 2.0' |
33 | 33 |
attributions[gutmans][license_url] = 'http://creativecommons.org/licenses/by/2.0/deed.en' |
34 | 34 |
|
35 |
; Information added by Drupal.org packaging script on 2015-03-27
|
|
36 |
version = "7.x-1.2"
|
|
35 |
; Information added by Drupal.org packaging script on 2015-05-25
|
|
36 |
version = "7.x-1.3"
|
|
37 | 37 |
core = "7.x" |
38 | 38 |
project = "advanced_help" |
39 |
datestamp = "1427460482"
|
|
39 |
datestamp = "1432557782"
|
|
40 | 40 |
|
drupal7/sites/all/modules/advanced_help/translations/help/nb/advanced_help.help.ini | ||
---|---|---|
1 |
[readme] |
|
2 |
title = LESMEG |
|
3 |
|
|
4 |
[using-advanced-help] |
|
5 |
title = Bruk av Avansert hjelp |
|
6 |
|
|
7 |
[translation] |
|
8 |
title = Oversettelse av Avansert hjelp |
|
9 |
|
|
10 |
[ini-file] |
|
11 |
title = Avansert hjelp .ini-filformat |
|
12 |
|
|
13 |
[why-advanced-help] |
|
14 |
title = Hvorfor Avansert hjelp? |
drupal7/sites/all/modules/advanced_help/translations/help/nb/ini-file.html | ||
---|---|---|
1 |
<p>The advanced help configuration file is in simple .ini file format. |
|
2 |
It has an optional section for global settings that might be inherited |
|
3 |
for each help file, followed by sections for each help file.</p> |
|
4 |
|
|
5 |
<p>Global settings may be put into a section named <code>[advanced help |
|
6 |
settings]</code>. This means that this name is reserved and it cannot |
|
7 |
be a help file in any module or theme. The following settings may be |
|
8 |
set in this section, with the default value (if any) in brackets.</p> |
|
9 |
|
|
10 |
<dl> |
|
11 |
<dt><code>line break</code> (FALSE)</dt> |
|
12 |
<dd>If set, the line break filter will be applied to all help files |
|
13 |
defined by this module or theme, unless that help file specifically is |
|
14 |
set otherwise. The line break converts line breaks |
|
15 |
into <code>br</code> and <code>p</code> tags automatically.</dd> |
|
16 |
|
|
17 |
<dt><code>navigation</code> (TRUE)</dt> |
|
18 |
<dd>If set, this navigation will be displayed at the end of the topic: |
|
19 |
<em>previous topic</em>, Up (parent), <em>next topic</em>.</dd> |
|
20 |
|
|
21 |
<dt><code>css</code></dt> |
|
22 |
<dd>Specify a css file that will be used for all help files (unless |
|
23 |
overridden), including the .css extension. This .css file must reside |
|
24 |
in the help directory along with the .html files, and will not be |
|
25 |
affected by translation.</dd> |
|
26 |
|
|
27 |
<dt><code>name</code></dt> |
|
28 |
<dd>May be set to override the module or theme name as displayed in |
|
29 |
both the module/theme index as well as the navigation and breadcrumb |
|
30 |
trail. Usually, this is not set, but for some projects you may want to |
|
31 |
use a more friendly name than appears in the project's .info file.</dd> |
|
32 |
|
|
33 |
<dt><code>index name</code></dt> |
|
34 |
<dd>This may be set to change the name of the module or theme in the |
|
35 |
module/theme index. It overrides the <code>name</code> setting above, |
|
36 |
as well as the project's name in its .info file.</dd> |
|
37 |
|
|
38 |
<dt><code>hide</code> (FALSE)</dt> |
|
39 |
<dd>This may be used to hide a module or theme in the module/theme |
|
40 |
index. This is particularly useful for modules who insert their help |
|
41 |
files into the hierarchy of another module or theme, as might be done |
|
42 |
by modules that extend <strong>Views</strong> or derived themes that |
|
43 |
extend base themes like <strong>Zen</strong>. By setting this to TRUE |
|
44 |
the project will not appear as its own entry.</dd> |
|
45 |
</dl> |
|
46 |
|
|
47 |
<p>Each section after that will correspond to a single help file for a |
|
48 |
single topic. It starts with the topic name in square brackets |
|
49 |
(e.g. <code>[ini-file]</code>). The following settings may be set for |
|
50 |
each file/topic, with the default value (if any) in brackets.</p> |
|
51 |
|
|
52 |
<dl> |
|
53 |
<dt><code>title</code></dt> |
|
54 |
<dd>The title of the topic, presented to the user and used in |
|
55 |
links. If you have special characters in your title, be sure to |
|
56 |
enclose it in quotes. (This setting is currently not optional.)</dd> |
|
57 |
|
|
58 |
<dt><code>file</code> (topic name)</dt> |
|
59 |
<dd>The filename, without the .html extension, used for the file with |
|
60 |
the help text for the topic. This is optional; if not specified, the |
|
61 |
topic name wil be the file name.</dd> |
|
62 |
|
|
63 |
<dt><code>weight</code> (0)</dt> |
|
64 |
<dd>The weight, used for sorting topics on the administration |
|
65 |
page. The default is 0 (zero) if unspecified. Items with the same weight |
|
66 |
are sorted alphabetically.</dd> |
|
67 |
|
|
68 |
<dt><code>parent</code></dt> |
|
69 |
<dd>The topic ID to use in a hierarchy; children will be listed |
|
70 |
beneath parents in the topic list, and will have the parent in their |
|
71 |
breadcrumb trail. You may parent this topic to a topic in another |
|
72 |
module or theme by using <code>module%topic</code> |
|
73 |
or <code>theme%topic</code> as the identifier, |
|
74 |
where <code>module</code> or <code>theme</code> is the project's short |
|
75 |
name. For example if parent is set to, '<code>views%display</code>', |
|
76 |
the topic will be regarded as a child of the |
|
77 |
<code>display</code> topic in the <strong>Views</strong> module.</dd> |
|
78 |
|
|
79 |
<dt><code>line break</code> (FALSE)</dt> |
|
80 |
<dd>Set the line break filter for this topic. Set to FALSE to disable |
|
81 |
the line break filter if this has been turned on in the global |
|
82 |
settings.</dd> |
|
83 |
|
|
84 |
<dt><code>css</code></dt> |
|
85 |
<dd>Specify a css file that will be used for this file. This .css file |
|
86 |
must reside in the help directory along with the .html files. This |
|
87 |
will override any .css file added by the global settings.</dd> |
|
88 |
|
|
89 |
<dt><code>popup width</code> (500)</dt> |
|
90 |
<dd>The width in pixels of the popup window.</dd> |
|
91 |
|
|
92 |
<dt><code>popup height</code> (500)</dt> |
|
93 |
<dd>The height in pixels of the popup window.</dd> |
|
94 |
</dl> |
|
95 |
|
|
96 |
<p>For example, here is a version of the <code>advanced_help.help.ini</code> file:</p> |
|
97 |
|
|
98 |
<pre> |
|
99 |
[readme] |
|
100 |
title = README |
|
101 |
weight = -11 |
|
102 |
|
|
103 |
[using-advanced-help] |
|
104 |
title = Using advanced help |
|
105 |
weight = -10 |
|
106 |
|
|
107 |
[translation] |
|
108 |
title = Translating advanced help |
|
109 |
|
|
110 |
[ini-file] |
|
111 |
title = Help .ini file format |
|
112 |
line break = FALSE |
|
113 |
|
|
114 |
[why-advanced-help] |
|
115 |
title = Why advanced help? |
|
116 |
line break = TRUE |
|
117 |
</pre> |
drupal7/sites/all/modules/advanced_help/translations/help/nb/readme.html | ||
---|---|---|
1 |
<h2>Om denne oversettelsen</h2> |
|
2 |
|
|
3 |
<p>Dette er en (delvis) oversettelse til <em>norsk</em> (bokmål) av |
|
4 |
hjelpeteksene for <strong>Avansert hjelp</strong>. Den er i første |
|
5 |
rekke laget for å vise hvordan en oversettelse av hjelpetekstene ser |
|
6 |
ut.</p> |
|
7 |
|
|
8 |
<h2 id="project-description">Synopsis</h2> |
|
9 |
|
|
10 |
<p>Modulen <strong>Avansert hjelp</strong> tilbyr et rammeverk som gjør |
|
11 |
det mulig for modul- og theme-utviklere å integrere hjelpetekster i et |
|
12 |
Drupal-nettsted.</p> |
|
13 |
|
|
14 |
<p>Disse hjelpetekstene lagres som vanlige <code>.html</code>-filer |
|
15 |
som lever i filsystemet (ikke i databasen). Disse filene distribueres |
|
16 |
fra prosjektes repo på Drupal.org i den samme pakken som prosjektets |
|
17 |
øvrige filer, og plasseres i en en underkatalog med navnet |
|
18 |
<code>help</code> i prosjektets katalog. Det innebærer at |
|
19 |
hjelpetekstene på en enkel måte kan holdes synkronisert med det |
|
20 |
prosjektet hjelpen er knyttet til, men også at tilgangen til disse |
|
21 |
filene ikke er underlagt de tilgangsbegrensningene som Drupal |
|
22 |
administrerer.</p> |
|
23 |
|
|
24 |
<p>Hjelpetekstene kan bruke standard HTML-markeringer De vil bli vist |
|
25 |
med ditt nettsteds theme.</p> |
|
26 |
|
|
27 |
<p>Dersom prosjektets forfatter ikke bruker HTML-rammeverket for |
|
28 |
<em>Avansert hjelp</em>, men det finnes en |
|
29 |
<code>README.md</code> eller <code>README.txt</code> i pakken, |
|
30 |
så vil innholdet av den filen vises i stedet.</p> |
|
31 |
|
|
32 |
<p>Hjelpetekstene kan vises i et sprettopp-vindu eller ikke, ut fra |
|
33 |
prosjektets preferanser. Ved å fjerne tilgangen til å se |
|
34 |
sprettopp-vinduer kan nedstedet skjule sprettopp-vinduer fra |
|
35 |
brukere.</p> |
|
36 |
|
|
37 |
<p>Hjelpetekstene kan organiseres hierarkisk, noe som gjør det mulig |
|
38 |
og navigere fra toppen av og nedover for hjelp.</p> |
|
39 |
|
|
40 |
<p>Hjelpetekstene kan gjøres søkbare. Dersom søk av avansert hjelp er |
|
41 |
slått på, vil all hjelpetekst indekseres. Dette innebærer at alt |
|
42 |
innhold på sidene med avansert hjelp er søkbart med nøkkelord.</p> |
|
43 |
|
|
44 |
<h2 id="use">Bruk av modulen</h2> |
|
45 |
|
|
46 |
<p>When you enable the module, a new tab with the legend “Advanced |
|
47 |
help” will show up under “Help”: |
|
48 |
|
|
49 |
<div class="ta-center"> |
|
50 |
<img class="help-img-center" alt="ahelp_tab.png" src="&path&ahelp_tab.png" width="661" height="225" border="1" /> |
|
51 |
</div> |
|
52 |
|
|
53 |
<p>By itself, this module doesn't do much. The <strong>Avansert |
|
54 |
hjelp</strong> assists other modules and themes in showing help texts. |
|
55 |
Nothing will show up until you enable at least one other module that |
|
56 |
makes use of the advanced help framework or comes with a file |
|
57 |
named <code>README.md</code> or <code>README.txt</code>. However, it |
|
58 |
comes with a small companion demo module named |
|
59 |
<strong>Eksempel på hjelp</strong> to demonstrate how it works. |
|
60 |
For more extensive example of use of the advanced help features, see |
|
61 |
the <strong>Views</strong> project.</p> |
|
62 |
|
|
63 |
<!-- |
|
64 |
<h2 id="project-recommended">Anbefalte moduler</h2> |
|
65 |
|
|
66 |
<ul> |
|
67 |
<li><a href="https://www.drupal.org/project/markdown">Markdown filter</a>:<br> |
|
68 |
When this module is enabled, display of any <code>README.md</code> the |
|
69 |
module shows will be rendered with markdown.</li> |
|
70 |
<li><a href="https://www.drupal.org/project/attributions">Attributions</a>:<br> |
|
71 |
When this module is enabled, attributions of third party content used |
|
72 |
by the project (i.e. some text from Wikipedia) will be available in an |
|
73 |
attribution block and on an atribution page.</li> |
|
74 |
</ul> |
|
75 |
--> |
|
76 |
|
|
77 |
<h2 id="support-status">Status for oppfølging</h2> |
|
78 |
|
|
79 |
<p>Reported bugs for the Drupal 7 branch will be fixed in a timely |
|
80 |
manner. Bugs in the issue queue for the Drupal 6 branch will only be |
|
81 |
fixed if accompanied with a patch, after the patch has been reviewed |
|
82 |
and tested by the community. No Drupal 8 version is currently under |
|
83 |
development. Post a message in |
|
84 |
the <a href="https://www.drupal.org/node/1928218">issue queue</a> if |
|
85 |
you're interested in managing a port of the project to to Drupal |
|
86 |
8. Older versions are no longer supported.</p> |
|
87 |
|
|
88 |
<p>Community support in the form of patches are very welcome for both |
|
89 |
Drupal 6 and Drupal 7 versions, and will be given priority. For QA, |
|
90 |
the project needs community support in the form of reviews of patches, |
|
91 |
development versions and releases.</p> |
|
92 |
|
|
93 |
<p>The primary goal of the module is to remain <strong>light-weight |
|
94 |
and simple</strong>. This means that not all feature requests will be |
|
95 |
implemented, even if they are a good idea. Feature requests |
|
96 |
accompanied by patches are more likely to make it into a release.</p> |
|
97 |
|
|
98 |
<p>The maintainer hopes that the community is willing to help out by |
|
99 |
answering & closing support requests.</p> |
|
100 |
|
|
101 |
<!-- |
|
102 |
<h2 id="project-problems">Kjente problemer</h2> |
|
103 |
--> |
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
<h2 id="project-maintainers">Kreditering</h2> |
|
108 |
|
|
109 |
<ul> |
|
110 |
<li><a href="https://www.drupal.org/u/merlinofchaos"">merlinofchaos</a> (52 commits, opprinnelig forfatter)</li> |
|
111 |
<li><a href="https://www.drupal.org/u/redndahead">redndahead</a> (8 commits)</li> |
|
112 |
<li><a href="https://www.drupal.org/u/dmitrig01">dmitrig01</a> (3 commits)</li> |
|
113 |
<li><a href="https://www.drupal.org/u/amitgoyal">amitgoyal </a> (5 commits)</li> |
|
114 |
<li><a href="https://www.drupal.org/u/gisle">gisle</a> (nåværende administrator, D7)</li> |
|
115 |
<li><a href="https://www.drupal.org/u/gnuget">gnuget</a> (nåværende administrator, D8)</li> |
|
116 |
</ul> |
drupal7/sites/all/modules/advanced_help/translations/help/nb/translation.html | ||
---|---|---|
1 |
<p>For å oversette en hjelpe-fil indeksert av <strong>Avansert hjelp</strong> |
|
2 |
må du først opprette en katalog |
|
3 |
<code>translations/help/<em>språk</em></code> i prosjektets rotkatalog der |
|
4 |
<em>språk</em> er språkkoden som vises på siden <em>Språk</em> i det |
|
5 |
administrative grensesnittet.</p> |
|
6 |
|
|
7 |
<p>Deretter kopierer du <code>.ini</code>-fila og alle |
|
8 |
<code>.html</code> filene fra den opprinnelige hjelpe-katalogen |
|
9 |
katalogen til denne katalogen. Om du trenger å endre et bilde for å |
|
10 |
bruke det i en oversettelse, kan du også plassere det endrede bildet |
|
11 |
her.</p> |
|
12 |
|
|
13 |
<p>I emne-delen av <code>.ini</code>-fila trenger du bare å beholde |
|
14 |
emnenavnene (uendret) og titlene (oversatt). Hvis det finnes |
|
15 |
en <code>name</code> eller <code>index name</code> innstilling i |
|
16 |
'advanced help settings'-delen, bør disse beholdes. Alle innstillinger |
|
17 |
som beholdes skal oversettes. Resten av dataene i |
|
18 |
<code>.ini</code>-filen kan fjernes eller ignoreres. </p> |
|
19 |
|
|
20 |
<p>Hver enkelt <code>.html</code>-fil skal deretter oversettes uten å |
|
21 |
endre navn eller plassering.</p> |
|
22 |
|
|
23 |
<p>Når du oversetter en <code>.html</code>-fil, vil du finne at |
|
24 |
nøkkelordet <code>&path&</code> (brukes for bilder og linker) |
|
25 |
vil føre til den opprinnelige katalogen. Hvis du må oversette |
|
26 |
elementer som er lenket, for eksempel bilder som inneholder tekst, |
|
27 |
bruke <code>&trans_path&</code> i stedet. Dette nøkkelordet |
|
28 |
vil peke på den oversatte katalogen. Dette vil tillate deg å velge |
|
29 |
hvilke lenkede elementer, om noen, som vil bli oversatt.</p> |
|
30 |
|
|
31 |
<p> Hvis et emne ikke er oversatt, så vil den uoversatte versjonen |
|
32 |
vil bli vist i stedet.</p> |
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
<h2>Oversettelse av hjelpetekstene til Avansert hjelp</h2> |
|
37 |
|
|
38 |
<p>Dersom du ønsker å hjelpe til med å oversette |
|
39 |
hjelpetekstene til <strong>Avansert hjelp</strong> til et bestemt språk |
|
40 |
kan du se etter en tråd i <a href="https://www.drupal.org/project/issues/advanced_help">sporingskøen for Advanced help</a> |
|
41 |
med navnet “Translation to XXX” (der |
|
42 |
“XXX” språket du ønsker å oversette hjelpetekstene til). |
|
43 |
Dersom en slik tråd ikke eksisterer kan du opprette den. |
|
44 |
Velg <em>Category</em> “Task”, |
|
45 |
<em>Status</em> “Needs review” og |
|
46 |
<em>Component</em> “Documentation”. |
|
47 |
Last opp filer med oversatte hjelpetekster som |
|
48 |
vedlegg (endre filtype fra <code>.html</code> til <code>.txt</code> for å få lov til å laste opp).</p> |
|
49 |
|
|
50 |
<p>Oversettelser som lastes opp vil bli inkludert i neste versjon dersom de godkjennes av andre brukere (ved at de oppnår status “RTBC”). |
|
51 |
|
drupal7/sites/all/modules/advanced_help/translations/help/nb/using-advanced-help.html | ||
---|---|---|
1 |
<p>Modulen <strong>Avansert hjelp</strong> tilbyr et rammeverk som gjør |
|
2 |
det mulig for modul- og theme-utviklere å integrere hjelpetekster i et |
|
3 |
Drupal-nettsted. Selv om <strong>Avansert hjelp</strong> ikke selv |
|
4 |
inneholder generell hjelp tilbyr den et kraftig og enkelt rammeverk som |
|
5 |
prosjekter kan benytte for å tilby egen hjelp.</p> |
|
6 |
|
|
7 |
<p>Prosjekter som benytter <strong>Avansert hjelp</strong> må |
|
8 |
ha en underkatalog med navnet <code>help</code> i sin rotkatalog |
|
9 |
I denne katalogen opprettes filen |
|
10 |
<em>MODULNAVN</em>.help.ini (evt. <em>THEMENAVN</em>.help.ini). |
|
11 |
Formatet på denne fila framgår av følgende eksempel:</p> |
|
12 |
|
|
13 |
<pre> |
|
14 |
[about-php] |
|
15 |
title = About PHP |
|
16 |
file = about-php |
|
17 |
weight = -10 |
|
18 |
|
|
19 |
[history] |
|
20 |
title = History of PHP |
|
21 |
parent = about-php |
|
22 |
|
|
23 |
[usage] |
|
24 |
title = Usage of PHP |
|
25 |
weight = 1 |
|
26 |
|
|
27 |
[security] |
|
28 |
title = Security of PHP |
|
29 |
weight = 2 |
|
30 |
|
|
31 |
[syntax] |
|
32 |
title = PHP syntax |
|
33 |
parent = usage |
|
34 |
</pre> |
|
35 |
|
|
36 |
<p>Lag alltid den engelske versjonen av disse temaene først. Ønsker |
|
37 |
du å ha temaene oversatt til et annet språk følger du anvisningene i |
|
38 |
<a href="&topic:advanced_help/translation&">Oversettelse av |
|
39 |
Avansert hjelp</a>.</p> |
|
40 |
|
|
41 |
<p>Denne fila definerer fem hjelpe-emner (i firkant-parenteser), og |
|
42 |
noen innstillinger for dem. |
|
43 |
Se: <a href="&topic:advanced_help/ini-file&">Avansert hjelp .ini-filformat</a> for |
|
44 |
en liste over definerte innstillinger.</p> |
|
45 |
|
|
46 |
<p>Alle emner er beskrevet av det prosjektet som tilbyr |
|
47 |
emnet, og av emne-id. For å produsere en themet lenke til et |
|
48 |
sprettopp-vindu om et emne, bruk et format etter mønster fra følgende |
|
49 |
eksempel:</p> |
|
50 |
|
|
51 |
<!-- D6 |
|
52 |
<pre> |
|
53 |
$output = theme('advanced_help_topic', 'help_example', 'about-php'); |
|
54 |
$output .= ' ' . t('Click the help icon!'); |
|
55 |
</pre> |
|
56 |
--> |
|
57 |
|
|
58 |
<!-- D7 --> |
|
59 |
<pre> |
|
60 |
$output = theme('advanced_help_topic', array( |
|
61 |
'module' => 'help_example', |
|
62 |
'topic' => 'about-php', |
|
63 |
)); |
|
64 |
$output .= ' ' . t('Click the help icon.'); |
|
65 |
</pre> |
|
66 |
|
|
67 |
<p>Ikke oversett strengen inne i <code>t()</code>. Bruk alltid engelsk, og benytt Drupals lokaliserings-modul til å oversette.</p> |
|
68 |
|
|
69 |
<p>Forutsatt at strengene er korrekt oversatt (ved hjelp av Drupals lokaliserings-modul) genererer dette følgende markeringer:</p> |
|
70 |
|
|
71 |
<pre> |
|
72 |
<a class="advanced-help-link" title="Om PHP" |
|
73 |
onclick="var w=window.open(this.href, 'advanced_help_window', |
|
74 |
'width=500,height=500,scrollbars,resizable'); |
|
75 |
w.focus(); return false;" |
|
76 |
href="/help/help_example/about-php?popup=1"> |
|
77 |
<span>Hjelp</span> |
|
78 |
</a> |
|
79 |
Klikk på hjelpe-ikonet. |
|
80 |
</div> |
|
81 |
</pre> |
|
82 |
|
|
83 |
<p>Dette produserer et klikkbart hjelpe-ikon lik det som vises under:</p> |
|
84 |
|
|
85 |
<div class="ta-center"> |
|
86 |
<img class="help-img-center" alt="klikkbart ikon" src="&trans_path&click_icon.png" width="180" height="90" border="0" /> |
|
87 |
</div> |
|
88 |
|
|
89 |
<p>Inne i en hjelpe-fil kan du lenke til andre hjelpe-emner ved å |
|
90 |
bruke dette formatet:</p> |
|
91 |
<pre> |
|
92 |
<a href="&topic:module/topic&">topic</a> |
|
93 |
</pre> |
|
94 |
<p>Ved å bruke dette formatet i stedet for standard-lenker vil sprettopp-status være konsistent når man trykker på lenker.</p> |
|
95 |
|
|
96 |
<p>For å referere til andre elementer som befinner seg i |
|
97 |
hjelpe-katalogen, som bilder som du ønsker å bake inn i teksten, |
|
98 |
bruk:</p> |
|
99 |
<pre> |
|
100 |
<img src="&path&example.png"/> |
|
101 |
<img src="&trans_path&example.png"/> |
|
102 |
</pre> |
|
103 |
|
|
104 |
<p>Nøkkelordet <code>trans_path</code> vil peke på en oversatt versjon |
|
105 |
av bildet i oversettelse-katalogen og kan benyttes dersom du ønsker å |
|
106 |
vise et bilde med oversatt tekst i stedet for originalen.</p> |
|
107 |
|
|
108 |
<p>For å peke på en normal sti på nettstedet, bruk:</p> |
|
109 |
<pre> |
|
110 |
<a href="&base_url&admin/settings/site-configuration">anchor text</a> |
|
111 |
</pre> |
|
112 |
|
|
113 |
<p><strong>NB: </strong> I tidligere versjoner av <strong>Advanced |
|
114 |
help</strong> var det ikke nødvendig å benytte &-tegn rundt |
|
115 |
<code>topic:</code>, <code>path</code>, og <code>base_url</code>. |
|
116 |
Dette fungerer fortsatt, men kan bli fjernet i en senere versjon. |
|
117 |
Ved å bruke &-tegn for å markere disse nøkkelordene kan de |
|
118 |
brukes overalt, og ikke bare som parametere til |
|
119 |
<code>href=""</code> og <code>src=""</code>.</p> |
|
120 |
|
|
121 |
<h2 id="access-control">Adgangskontroll</h2> |
|
122 |
|
|
123 |
<p>Når denne modulen er installert vil brukere med tillatelsen |
|
124 |
<code>view advanced help index</code> |
|
125 |
se indeks-siden for <strong>Avansert hjelp</strong> ved å gå til |
|
126 |
<em>Administrasjon → Advanced Help</em> |
|
127 |
(sti: <code>admin/advanced_help</code>). Øvrige tillatelser |
|
128 |
<code>view advanced help topic</code> og |
|
129 |
<code>view advanced help popup</code> |
|
130 |
gir brukere adgang til de aktuelle hjelpe-sidene og sprettopp-vinduer.</p> |
|
131 |
|
|
132 |
<p>Hjelpeteksten er lagret som vanlige <code>.html</code>-filer og |
|
133 |
kan, med mindre de beskyttes, bli sett av alle som kjenner deres URL. |
|
134 |
Dersom du ønsker å beskytte dem kan du beskytte dem mot innsyn ved å |
|
135 |
plassere følgende fire linjer i en fil med navn |
|
136 |
<code>.htaccess</code> i katalogen <code>help</code> i prosjektkatalogen:</p> |
|
137 |
|
|
138 |
<pre> |
|
139 |
<Files *\.html> |
|
140 |
Order Allow,Deny |
|
141 |
Deny from all |
|
142 |
</Files> |
|
143 |
</pre> |
|
144 |
|
|
145 |
<p>Det er nettstedsansvarlig som har ansvaret for at denne typen |
|
146 |
beskyttelse er på plass dersom nettstedet har hjelpe-filer som må |
|
147 |
beskyttes fra direkte innsyn.</p> |
|
148 |
|
|
149 |
<p>Se også denne tråden i prosjektets sporings-kø: |
|
150 |
<a href="https://www.drupal.org/node/1980936">#1980936 Typing complete path to .html help files in module bypasses user permissions</a>.</p> |
|
151 |
|
|
152 |
<h2 id="search">Søk</h2> |
|
153 |
|
|
154 |
<p>For å skru på søk for <strong>Avansert hjelp</strong>, naviger til |
|
155 |
<em>Administrasjon → Oppsett → Søk og metadata → Søkeinnstillinger</em>. |
|
156 |
Rull ned til feltet <em>Aktive søkemoduler</em> og kryss av feltet til venstre for |
|
157 |
“Advanced help”. Søkefeltet vil deretter dukke opp på toppen av indekssidene for |
|
158 |
<strong>Avansert hjelp</strong>.</p> |
|
159 |
|
|
160 |
<p>Dersom modulen <strong>Search</strong> i core er skrudd på, vil alt |
|
161 |
innhold på hjelpesidene bli indeksert av cron. Dersom du installerer |
|
162 |
og skrur på nye prosjekter og ønsker å indeksere deres |
|
163 |
hjelpetekster umiddelbart kan du navigere til <em>Administrasjon → |
|
164 |
Rapporter → Status</em> og klikke på lenken for å “kjøre cron |
|
165 |
manuelt.”.</p> |
drupal7/sites/all/modules/advanced_help/translations/help/nb/why-advanced-help.html | ||
---|---|---|
1 |
The <strong>Advanced help</strong> framework was designed to replace the original Drupal help system, which has several flaws that make it hard to create new help, hard to maintain existing help, and particularly hard to access help. |
|
2 |
|
|
3 |
The primary goal, then, is to increase the accessibility of help, meaning the ability of both the user and the help text author to access the needed tools to use, create, maintain and translate the help. |
|
4 |
|
|
5 |
This system is completely separate from Drupal's <code>hook_help()</code>. In Drupal 6 and 7, it actually co-exists with it; in the future, it is hoped that it will completely replace it allowing <code>hook_help()</code> to be deprecated and removed. |
|
6 |
|
|
7 |
Messages added to the top of a page are not really “help”. Often these messages are an introduction to a form or a short blurb telling a user what to do with a particular page. The problem is, these messages are always there, they are easily ignored, and they come before the actual page. In general, when users are learning, they want to see the page first, then ask questions. The reverse order is much less conducive to actually teaching a user how to use something. By allowing help to be available on request, the system conforms more naturally to how most people work. |
|
8 |
|
|
9 |
<h2>Advanced help er organisert etter emner</h2> |
|
10 |
With the <code>hook_help()</code> method, help text is organized by URL path. This is fine if you have help text describing how to use a particular page or what a particular page does, but ultimately is limiting because manuals and documentation are usually grouped by topic, and those topics are determined by the material itself. |
|
11 |
|
|
12 |
<strong>Advanced help</strong> allows the documentation author to organize topics as he or she sees fit; the only restriction, really, is that each individual chunk of text needs to stand on its own as a discrete topic. |
|
13 |
|
|
14 |
What's more, modules and themes can insert their topics into another's hierarchy. This would allow the Drupal core to create a task based help navigation system which allows modules and themes to insert topics into that navigation fluidly. This allows modules and themes to continue to keep their systems separate, yet integrate into the main system. |
|
15 |
|
|
16 |
<h2>Advanced help-emner er behandlet som HTML i egne filer</h2> |
|
17 |
This separation makes it easy to find and modify. Currently, everything is lumped together in <code>hook_help()</code> in PHP strings that are run through <code>t()</code>, and there is a fair amount of PHP code necessary in this system that actually gets in the way of writing good, explanatory text. |
|
18 |
|
|
19 |
In fact, requiring a documentation author to understand PHP at all is a detriment. The idea that documentation writers need to have PHP development as a skill seriously reduces the number of available contributors. HTML, on the other hand, is a much more common skill, is relatively easy to learn, and the amount of HTML needed to write documentation is only a little bit more than the HTML used in forum posts. |
|
20 |
|
|
21 |
Another benefit to not using PHP is that the files themselves are safe. They are filtered to escape malicious script code that could take over the server or do worse things. This means that these files can be used relatively easily on Drupal.org itself. It also means that descriptions of the project pulled from the project's help pages or README.txt or README.md can be made on the project's Drupal.org without the need to download the module or theme to look at the contents of these files. This also simplifies maintenance, as the files can be corrected easily by patches, which are updated by tyhe maintainer and pushed to git. |
|
22 |
|
|
23 |
By moving all docymentation into help files, we could, if we wanted, package the Drupal.org handbooks, or a subset of them, directly into a Drupal distribution, or a Drupal add-on, so that Drupal administrators can have Drupal help without needing to visit Drupal.org. This can be valuable in locked down corporate environments and on planes. But more importantly, the handbooks can be made version aware much more easily than the current method on Drupal.org. |
|
24 |
|
|
25 |
The downside to this method is that these books can't easily be made dynamic. Though the use of alter hooks could allow a module or theme to make modifications to the help as needed, doing this could make the help files less useful when you take them out of context. |
|
26 |
|
|
27 |
<h2>Advanced help-filer oversettes som en fullstendig fil</h2> |
|
28 |
It is actually not easy to translate documents as strings, particularly when the language being used is very much unlike English. In fact, when translating a document, the organization of the sentences may change drastically. It is also a burden on the CPU to do this, as you are indexing on very long strings. |
|
29 |
|
|
30 |
Translators have a much better time translating a document as a unit, because of the presence of the entire context. |
|
31 |
|
|
32 |
<h2>Advanced help har sitt eget navigasjons-system</h2> |
|
33 |
By making use of a navigation system specified in a .ini file (which is not PHP code and therefore safe to use), the help can be structured like a book, which is typical of online manuals. This is familiar to users, can be organized (and re-organized) and allows a module or theme to include significantly richer text without burdening the PHP code with having its help loaded unnecessarily. |
|
34 |
|
|
35 |
This book can be navigated hierarchically as well, making it easy to keep related topics together. |
|
36 |
<h2>Advanced help indekseres av nettstedets søkemotor</h2> |
|
37 |
An important goal of this system was to add searchability to the help. By being able to enter keywords into the search box and find relevant topics, we come up with a system that resembles the kind of help that comes with many operating systems. This is very valuable when searching through manuals trying to find out how to do a particular thing. |
|
38 |
|
|
39 |
This search is specific to the help, meaning that the help will not be mixed in with the global node search. This can be considered both an advantage and a disadvantage. For the most part, this help system is meant to provide help to site administrators, and content searches should not find it. The disadvantage, of course, is when you want to use it for end user help, you will not be able to. |
|
40 |
|
|
41 |
<h2>Hjelp for en bestemt side kan hentes inn via sprettopp-vinduer</h2> |
|
42 |
In addition to the manual-like hierarchical navigation, <strong>Advanced help</strong> can also provide context-sensitive additional help through a popup. While popups are controversial, the argument for using them is that when getting help while on a form, <i>a popup will not throw away a user's data.</i> Browsers are not very friendly to input forms if they are not submitted, and navigating away from the form can be dangerous. There are various other solutions to this problem, but each one has a drawback. The drawbacks to popups are well known, but mostly it is the irritation of having new windows. When getting help, though, a popup is usually invited. Help should not interfere with what the operation the user is trying to complete. It differs greatly from the uninvited popup, which are usually ads or popups meant to prevent users from navigating away from a site. |
|
43 |
|
|
44 |
Popups can be added to a page with plain text links or themed icon links. |
drupal7/sites/all/modules/ds/ds.api.php | ||
---|---|---|
238 | 238 |
); |
239 | 239 |
$ds_field->properties = array( |
240 | 240 |
'code' => array( |
241 |
'value' => '<? print "this is a custom field"; ?>', |
|
241 |
'value' => '<?php print "this is a custom field"; ?>',
|
|
242 | 242 |
'format' => 'ds_code', |
243 | 243 |
), |
244 | 244 |
'use_token' => 0, |
... | ... | |
268 | 268 |
} |
269 | 269 |
|
270 | 270 |
/** |
271 |
* Alter fields defined by Display Suite |
|
271 |
* Alter fields defined by Display Suite. |
|
272 |
* |
|
273 |
* This function is called for each entity type. |
|
272 | 274 |
* |
273 | 275 |
* @param $fields |
274 | 276 |
* An array with fields which can be altered just before they get cached. |
drupal7/sites/all/modules/ds/ds.info | ||
---|---|---|
13 | 13 |
files[] = tests/ds.forms.test |
14 | 14 |
configure = admin/structure/ds |
15 | 15 |
|
16 |
; Information added by Drupal.org packaging script on 2015-04-15
|
|
17 |
version = "7.x-2.8"
|
|
16 |
; Information added by Drupal.org packaging script on 2015-05-21
|
|
17 |
version = "7.x-2.10"
|
|
18 | 18 |
core = "7.x" |
19 | 19 |
project = "ds" |
20 |
datestamp = "1429107782"
|
|
20 |
datestamp = "1432195683"
|
|
21 | 21 |
|
drupal7/sites/all/modules/ds/ds.install | ||
---|---|---|
69 | 69 |
'view_mode' => array( |
70 | 70 |
'description' => 'The name of the view_mode.', |
71 | 71 |
'type' => 'varchar', |
72 |
'length' => 32,
|
|
72 |
'length' => 64,
|
|
73 | 73 |
'not null' => TRUE, |
74 | 74 |
'default' => '', |
75 | 75 |
), |
... | ... | |
131 | 131 |
'view_mode' => array( |
132 | 132 |
'description' => 'The name of the view_mode.', |
133 | 133 |
'type' => 'varchar', |
134 |
'length' => 32,
|
|
134 |
'length' => 64,
|
|
135 | 135 |
'not null' => TRUE, |
136 | 136 |
'default' => '', |
137 | 137 |
), |
... | ... | |
179 | 179 |
'view_mode' => array( |
180 | 180 |
'description' => 'The machine name of the view mode.', |
181 | 181 |
'type' => 'varchar', |
182 |
'length' => 32,
|
|
182 |
'length' => 64,
|
|
183 | 183 |
'not null' => TRUE, |
184 | 184 |
'default' => '', |
185 | 185 |
), |
... | ... | |
291 | 291 |
'default' => '', |
292 | 292 |
)); |
293 | 293 |
} |
294 |
|
|
295 |
|
|
296 |
/** |
|
297 |
* Increase the view_mode storage length to 64 |
|
298 |
*/ |
|
299 |
function ds_update_7203() { |
|
300 |
db_change_field('ds_field_settings', 'view_mode', 'view_mode', |
|
301 |
array( |
|
302 |
'description' => 'The name of the view_mode.', |
|
303 |
'type' => 'varchar', |
|
304 |
'length' => 64, |
|
305 |
'not null' => TRUE, |
|
306 |
'default' => '', |
|
307 |
) |
|
308 |
); |
|
309 |
db_change_field('ds_layout_settings', 'view_mode', 'view_mode', |
|
310 |
array( |
|
311 |
'description' => 'The name of the view_mode.', |
|
312 |
'type' => 'varchar', |
|
313 |
'length' => 64, |
|
314 |
'not null' => TRUE, |
|
315 |
'default' => '', |
|
316 |
) |
|
317 |
); |
|
318 |
db_change_field('ds_view_modes', 'view_mode', 'view_mode', |
|
319 |
array( |
|
320 |
'description' => 'The machine name of the view mode.', |
|
321 |
'type' => 'varchar', |
|
322 |
'length' => 64, |
|
323 |
'not null' => TRUE, |
|
324 |
'default' => '', |
|
325 |
) |
|
326 |
); |
|
327 |
} |
drupal7/sites/all/modules/ds/ds.module | ||
---|---|---|
302 | 302 |
|
303 | 303 |
static $static_fields, $fields_cached = array(); |
304 | 304 |
static $loaded = FALSE; |
305 |
// Load the ds file that handles ds call of hook_ds_fields_info, otherwise it |
|
306 |
// doesn't get loaded |
|
307 |
module_load_include('inc', 'ds', 'ds.ds_fields_info'); |
|
305 | 308 |
|
306 | 309 |
// Get fields from cache. |
307 | 310 |
if (!$loaded) { |
... | ... | |
571 | 574 |
} |
572 | 575 |
} |
573 | 576 |
|
577 |
$disable_css = FALSE; |
|
578 |
if (!empty($layout['settings']['layout_disable_css'])) { |
|
579 |
$disable_css = TRUE; |
|
580 |
} |
|
581 |
|
|
574 | 582 |
// Add path to css file for this layout and disable block regions if necessary. |
575 |
if (isset($layout['css']) && !isset($loaded_css[$layout['path'] . '/' . $layout['layout'] . '.css'])) { |
|
583 |
if (!$disable_css && isset($layout['css']) && !isset($loaded_css[$layout['path'] . '/' . $layout['layout'] . '.css'])) {
|
|
576 | 584 |
// Register css file. |
577 | 585 |
$loaded_css[$layout['path'] . '/' . $layout['layout'] . '.css'] = TRUE; |
578 | 586 |
// Add css file. |
... | ... | |
649 | 657 |
$layout['layout'] = $layout['panels']['theme']; |
650 | 658 |
} |
651 | 659 |
|
660 |
$bundle = strtr($vars['elements']['#bundle'], '-', '_'); |
|
652 | 661 |
$vars['theme_hook_suggestions'][] = $layout['layout']; |
653 | 662 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type']; |
654 | 663 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type'] . '_' . $vars['elements']['#view_mode']; |
655 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type'] . '_' . $vars['elements']['#bundle'];
|
|
656 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type'] . '_' . $vars['elements']['#bundle'] . '_' . $vars['elements']['#view_mode'];
|
|
664 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type'] . '_' . $bundle;
|
|
665 |
$vars['theme_hook_suggestions'][] = $layout['layout'] . '__' . $vars['elements']['#entity_type'] . '_' . $bundle . '_' . $vars['elements']['#view_mode'];
|
|
657 | 666 |
} |
658 | 667 |
|
659 | 668 |
// If the layout has wrapper class lets add it. |
... | ... | |
686 | 695 |
$vars[$region_name . '_classes'] = !empty($layout['settings']['classes'][$region_name]) ? ' ' . implode(' ', $layout['settings']['classes'][$region_name]) : ''; |
687 | 696 |
|
688 | 697 |
// Token support for region classes. |
689 |
if (module_exists('token')) { |
|
698 |
if (module_exists('token') && isset($var[$object])) {
|
|
690 | 699 |
$vars[$region_name . '_classes'] = token_replace($vars[$region_name . '_classes'], array($object => $vars[$object]), array('clear' => TRUE, 'sanitize' => TRUE)); |
691 | 700 |
} |
692 | 701 |
} |
... | ... | |
705 | 714 |
// Add layout attributes if any. |
706 | 715 |
$vars['layout_attributes'] = ''; |
707 | 716 |
if (!empty($layout['settings']['layout_attributes'])) { |
708 |
$vars['layout_attributes'] .= ' ' . $layout['settings']['layout_attributes']; |
|
717 |
if (isset($vars[$object])) { |
|
718 |
$vars['layout_attributes'] .= ' ' . token_replace($layout['settings']['layout_attributes'], array($object => $vars[$object]), array('clear' => TRUE, 'sanitize' => TRUE)); |
|
719 |
} |
|
720 |
else { |
|
721 |
$vars['layout_attributes'] .= ' ' . $layout['settings']['layout_attributes']; |
|
722 |
} |
|
709 | 723 |
} |
710 | 724 |
// Merge in other attributes which were passed to the template. |
711 | 725 |
if (!empty($layout['settings']['layout_attributes_merge'])) { |
... | ... | |
718 | 732 |
} |
719 | 733 |
|
720 | 734 |
// Token support for layout classes. |
721 |
if (module_exists('token')) { |
|
735 |
if (module_exists('token') && isset($var[$object])) {
|
|
722 | 736 |
foreach ($vars['classes_array'] as &$class) { |
723 | 737 |
$class = token_replace($class, array($object => $vars[$object]), array('clear' => TRUE, 'sanitize' => TRUE)); |
724 | 738 |
} |
... | ... | |
789 | 803 |
*/ |
790 | 804 |
function ds_render_code_field($field) { |
791 | 805 |
if (isset($field['properties']['code'])) { |
806 |
$value = $field['properties']['code']['value']; |
|
807 |
// Token support - check on token property so we don't run every single field through token. |
|
808 |
if (isset($field['properties']['use_token']) && $field['properties']['use_token']) { |
|
809 |
$value = token_replace($value, array($field['entity_type'] => $field['entity']), array('clear' => TRUE)); |
|
810 |
} |
|
792 | 811 |
$format = (isset($field['properties']['code']['format'])) ? $field['properties']['code']['format'] : 'plain_text'; |
793 | 812 |
if ($format == 'ds_code' && module_exists('ds_format')) { |
794 |
$value = ds_format_php_eval($field['properties']['code']['value'], $field['entity'], isset($field['build']) ? $field['build'] : array());
|
|
813 |
$value = ds_format_php_eval($value, $field['entity'], isset($field['build']) ? $field['build'] : array());
|
|
795 | 814 |
} |
796 | 815 |
else { |
797 |
$value = check_markup($field['properties']['code']['value'], $format); |
|
798 |
} |
|
799 |
// Token support - check on token property so we don't run every single field through token. |
|
800 |
if (isset($field['properties']['use_token']) && $field['properties']['use_token'] == TRUE) { |
|
801 |
$value = token_replace($value, array($field['entity_type'] => $field['entity']), array('clear' => TRUE)); |
|
816 |
$value = check_markup($value, $format); |
|
802 | 817 |
} |
803 | 818 |
return $value; |
804 | 819 |
} |
... | ... | |
819 | 834 |
// 3) embed a view with the 2 taxonomies as fields. |
820 | 835 |
if (isset($field['formatter_settings']['load_terms']) && $field['formatter_settings']['load_terms']) { |
821 | 836 |
static $terms_loaded = array(); |
822 |
$language = $field['entity']->language; |
|
837 |
if (isset($field['entity']->language)) { |
|
838 |
$language = $field['entity']->language; |
|
839 |
} |
|
840 |
else { |
|
841 |
$language = LANGUAGE_NONE; |
|
842 |
} |
|
823 | 843 |
$instances = field_info_instances($field['entity_type'], $field['bundle']); |
824 | 844 |
foreach ($instances as $key => $instance) { |
825 | 845 |
$info = field_info_field($key); |
... | ... | |
838 | 858 |
// This term is missing in the database. |
839 | 859 |
continue; |
840 | 860 |
} |
841 |
$terms_loaded[$item['tid']]; |
|
861 |
$terms_loaded[$item['tid']] = $term;
|
|
842 | 862 |
} |
843 | 863 |
$field['entity']->{$key}[$language][$tkey]['taxonomy_term'] = $terms_loaded[$item['tid']]; |
844 | 864 |
} |
... | ... | |
870 | 890 |
$content = ''; |
871 | 891 |
if ($show_title) { |
872 | 892 |
if (empty($title_wrapper)) $title_wrapper = 'div'; |
873 |
$content .= '<' . check_plain($title_wrapper) . '>' . $data->title . '</' . check_plain($title_wrapper) . '>'; |
|
893 |
$content .= '<' . check_plain($title_wrapper) . ' class="title">' . $data->title . '</' . check_plain($title_wrapper) . '>';
|
|
874 | 894 |
} |
875 | 895 |
if (is_array($data->content)) { |
876 | 896 |
$content .= drupal_render($data->content); |
... | ... | |
1227 | 1247 |
} |
1228 | 1248 |
else { |
1229 | 1249 |
$term = taxonomy_term_load($item['tid']); |
1250 |
if (module_exists('i18n_taxonomy')) { |
|
1251 |
$term = i18n_taxonomy_localize_terms($term); |
|
1252 |
} |
|
1230 | 1253 |
if (!is_object($term)) { |
1231 | 1254 |
// This term is missing in the database. |
1232 | 1255 |
continue; |
... | ... | |
1259 | 1282 |
} |
1260 | 1283 |
else { |
1261 | 1284 |
$term = taxonomy_term_load($item['tid']); |
1285 |
if (module_exists('i18n_taxonomy')) { |
|
1286 |
$term = i18n_taxonomy_localize_terms($term); |
|
1287 |
} |
|
1262 | 1288 |
if (!is_object($term)) { |
1263 | 1289 |
// This term is missing in the database. |
1264 | 1290 |
continue; |
... | ... | |
1269 | 1295 |
$item_display = check_plain($term->name); |
1270 | 1296 |
if ($linked) { |
1271 | 1297 |
$uri = entity_uri('taxonomy_term', $term); |
1272 |
$item_display = l($term->name, $uri['path']); |
|
1298 |
$item_display = l($term->name, $uri['path'], $uri['options']);
|
|
1273 | 1299 |
} |
1274 | 1300 |
} |
1275 | 1301 |
$terms[] = $item_display; |
drupal7/sites/all/modules/ds/includes/ds.displays.inc | ||
---|---|---|
144 | 144 |
$region_blocks = variable_get('ds_extras_region_blocks', array()); |
145 | 145 |
$remove = $form_state['values']['remove_block_region']; |
146 | 146 |
foreach ($remove as $key => $value) { |
147 |
if ($key === $value) {
|
|
147 |
if ($value != 0 && $key == $value) {
|
|
148 | 148 |
$variable_set = TRUE; |
149 | 149 |
if (module_exists('block')) { |
150 | 150 |
db_delete('block') |
drupal7/sites/all/modules/ds/includes/ds.field_ui.inc | ||
---|---|---|
770 | 770 |
$record->settings['layout_link_attribute'] = $form_state['values']['additional_settings']['region_wrapper']['layout_link_attribute']; |
771 | 771 |
$record->settings['layout_link_custom'] = $form_state['values']['additional_settings']['region_wrapper']['layout_link_custom']; |
772 | 772 |
|
773 |
// Additional settings |
|
774 |
if (isset($form_state['values']['additional_settings']['preview']['info']['settings']['disable_css'])) { |
|
775 |
$record->settings['layout_disable_css'] = $form_state['values']['additional_settings']['preview']['info']['settings']['disable_css']; |
|
776 |
} |
|
777 |
|
|
773 | 778 |
$record->settings = $record->settings; |
774 | 779 |
|
775 | 780 |
// Let other modules alter the layout settings. |
... | ... | |
1895 | 1900 |
} |
1896 | 1901 |
|
1897 | 1902 |
ksort($suggestions_array); |
1898 |
$suggestions = '<ul><li>' . implode('.tpl.php</li><li>', $suggestions_array) . '.tpl.php</li></ul>'; |
|
1903 |
$suggestions .= '<ul><li>' . implode('.tpl.php</li><li>', $suggestions_array) . '.tpl.php</li></ul>';
|
|
1899 | 1904 |
} |
1900 | 1905 |
else { |
1901 | 1906 |
$suggestions = ''; |
... | ... | |
1916 | 1921 |
$form['additional_settings']['ds_layouts']['preview'] ['image'] = array( |
1917 | 1922 |
'#markup' => '<div class="ds-layout-preview-image"><img src="' . base_path() . $image . '"/></div>', |
1918 | 1923 |
); |
1919 |
$form['additional_settings']['ds_layouts']['preview'] ['suggestions'] = array( |
|
1920 |
'#markup' => '<div class="ds-layout-preview-suggestion"><p>' . $selected . '</p><p>' . t('!suggestions', array('!suggestions' => strtr($suggestions, '_', '-'))) . '</p></div>', |
|
1924 |
$form['additional_settings']['ds_layouts']['preview']['info'] = array( |
|
1925 |
'#type' => 'container', |
|
1926 |
'#attributes' => array( |
|
1927 |
'class' => array('ds-layout-preview-suggestion'), |
|
1928 |
), |
|
1929 |
); |
|
1930 |
$form['additional_settings']['ds_layouts']['preview']['info']['suggestions'] = array( |
|
1931 |
'#markup' => '<p>' . $selected . '</p><p>' . t('!suggestions', array('!suggestions' => strtr($suggestions, '_', '-'))) . '</p>', |
|
1921 | 1932 |
); |
1933 |
|
|
1934 |
if (!empty($chosen_layout['css'])) { |
|
1935 |
$disable_css = FALSE; |
|
1936 |
if (isset($layout->settings['layout_disable_css'])) { |
|
1937 |
$disable_css = $layout->settings['layout_disable_css']; |
|
1938 |
} |
|
1939 |
if (isset($form_state['values']) && $disable_css !== $form_state['values']['additional_settings']['ds_layouts']['preview']['info']['settings']['disable_css']) { |
|
1940 |
$disable_css = $form_state['values']['additional_settings']['ds_layouts']['preview']['info']['settings']['disable_css']; |
|
1941 |
} |
|
1942 |
|
|
1943 |
$form['additional_settings']['ds_layouts']['preview']['info']['settings']['disable_css'] = array( |
|
1944 |
'#type' => 'checkbox', |
|
1945 |
'#title' => t('Disable layout CSS styles'), |
|
1946 |
'#default_value' => $disable_css, |
|
1947 |
); |
|
1948 |
} |
|
1922 | 1949 |
} |
1923 | 1950 |
|
1924 | 1951 |
if (isset($form_state['values']['additional_settings']['layout']) && (!isset($layout->layout) || $form_state['values']['additional_settings']['layout'] != $layout->layout)) { |
... | ... | |
1976 | 2003 |
* Form submission handler for _ds_field_ui_table_layouts_preview(). |
1977 | 2004 |
*/ |
1978 | 2005 |
function ds_field_ui_change_layout_submit($form, &$form_state) { |
2006 |
$values = $form_state['values']; |
|
2007 |
if (isset($values['additional_settings']['preview']['info']['settings']['disable_css'])) { |
|
2008 |
$disable_css = $values['additional_settings']['preview']['info']['settings']['disable_css']; |
|
2009 |
} |
|
2010 |
else { |
|
2011 |
$disable_css = FALSE; |
|
2012 |
} |
|
2013 |
|
|
2014 |
$record = db_select('ds_layout_settings') |
|
2015 |
->fields('ds_layout_settings') |
|
2016 |
->condition('entity_type', $values['ds_entity_type']) |
|
2017 |
->condition('bundle', $values['ds_bundle']) |
|
2018 |
->condition('view_mode', $values['ds_view_mode']) |
|
2019 |
->execute() |
|
2020 |
->fetchObject(); |
|
2021 |
|
|
2022 |
$record->settings = unserialize($record->settings); |
|
2023 |
$record->settings['layout_disable_css'] = $disable_css; |
|
2024 |
|
|
2025 |
drupal_write_record('ds_layout_settings', $record, array('id')); |
|
2026 |
|
|
1979 | 2027 |
unset($_GET['destination']); |
1980 | 2028 |
global $base_url; |
1981 |
$url = $base_url . '/' . $form_state['values']['layout_changed_url'];
|
|
2029 |
$url = $base_url . '/' . $values['layout_changed_url'];
|
|
1982 | 2030 |
$form_state['redirect'] = $url; |
1983 | 2031 |
} |
1984 | 2032 |
|
drupal7/sites/all/modules/ds/modules/ds_devel/ds_devel.info | ||
---|---|---|
5 | 5 |
dependencies[] = ds |
6 | 6 |
dependencies[] = devel |
7 | 7 |
|
8 |
; Information added by Drupal.org packaging script on 2015-04-15
|
|
9 |
version = "7.x-2.8"
|
|
8 |
; Information added by Drupal.org packaging script on 2015-05-21
|
|
9 |
version = "7.x-2.10"
|
|
10 | 10 |
core = "7.x" |
11 | 11 |
project = "ds" |
12 |
datestamp = "1429107782"
|
|
12 |
datestamp = "1432195683"
|
|
13 | 13 |
|
Also available in: Unified diff
Weekly update of contrib modules