Commit a772cdc5 authored by merlinofchaos's avatar merlinofchaos
Browse files

#298862 by redndahead: Allow the .ini file to specify popup height and width.

parent 64a38f5a
......@@ -441,7 +441,7 @@ function theme_advanced_help_topic($module, $topic, $type = 'icon') {
return l($text, "help/$module/$topic", array(
'attributes' => array(
'class' => $class,
'onclick' => ", 'advanced_help_window', 'width=500,height=500,scrollbars,resizable'); return false;",
'onclick' => ", 'advanced_help_window', 'width=". $info['popup width'] .",height=". $info['popup height'] .",scrollbars,resizable'); return false;",
'title' => $info['title']
'query' => array('popup' => TRUE),
......@@ -641,6 +641,8 @@ function _advanced_help_parse_ini() {
'title' => !empty($translation[$name]['title']) ? $translation[$name]['title'] : $topic['title'],
'weight' => isset($topic['weight']) ? $topic['weight'] : 0,
'parent' => isset($topic['parent']) ? $topic['parent'] : 0,
'popup width' => isset($topic['popup width']) ? $topic['popup width'] : 500,
'popup height' => isset($topic['popup height']) ? $topic['popup height'] : 500,
'file' => $file . '.html', // require extension
'path' => $path, // not in .ini file
'line break' => isset($topic['line break']) ? $topic['line break'] : (isset($settings[$module]['line break']) ? $settings[$module]['line break'] : FALSE),
......@@ -31,6 +31,10 @@ Each section after that will correspond to a single help file, and each one may
<dd>If set to true, linebreaks will be converted into br and p tags automatically. If unspecified, will default to off. Set to 0 to disable the filter if this has been turned on in the global settings.</dd>
<dd>Specify a css file that will be used for this file. This .css file must reside in the help directory along with the .html files. This will override any .css file added by the global system.</dd>
<dt><strong>popup width</strong></dt>
<dd>The width in pixels of the popup window. Defaults to 500 if unspecified.</dd>
<dt><strong>popup height</strong></dt>
<dd>The height in pixels of the popup window. Defaults to 500 if unspecified.</dd>
For example, here is a version of the <strong></strong> file:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment