summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsun2009-06-08 19:25:20 (GMT)
committer sun2009-06-08 19:25:20 (GMT)
commit588801f30ed0b39abb0789efc713e4f86051dfc9 (patch)
treea783b202f2c924b1c2c0c743c57965c7ad12b3b9
parentb9b2c592b724c5ad3869d042748f13c4e883770f (diff)
#485264 by sun: Changed installation instructions to be more concise.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--wysiwyg.admin.inc37
2 files changed, 29 insertions, 9 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 23e0457..37c3c14 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 5.x-2.x, xxxx-xx-xx
---------------------------
+#485264 by sun: Changed installation instructions to be more concise.
#479514 by sun: Fixed native plugin loading for TinyMCE (follow-up).
#434590 by sun: Fixed path admin/settings/wysiwyg not found.
#479514 by TwoD, sun: Added native plugin support for FCKeditor.
diff --git a/wysiwyg.admin.inc b/wysiwyg.admin.inc
index b53c744..29c080a 100644
--- a/wysiwyg.admin.inc
+++ b/wysiwyg.admin.inc
@@ -364,25 +364,44 @@ function wysiwyg_profile_overview() {
$count = count($editors);
$status = array();
$options = array('' => t('No editor'));
- foreach ($editors as $editor => $properties) {
- $status[$editor] = array(
- 'severity' => (isset($properties['error']) ? REQUIREMENT_ERROR : ($properties['installed'] ? REQUIREMENT_OK : REQUIREMENT_INFO)),
- 'title' => t('<a href="!vendor-url">@editor</a> (<a href="!download-url">Download</a>)', array('!vendor-url' => $properties['vendor url'], '@editor' => $properties['title'], '!download-url' => $properties['download url'])),
- 'value' => (isset($properties['installed version']) ? $properties['installed version'] : t('Not installed.')),
- 'description' => (isset($properties['error']) ? $properties['error'] : ($properties['installed'] ? '' : t('Extract the archive and copy its contents into a new folder in the following location:<br /><code>@editor-path</code>', array('@editor-path' => $properties['editor path'])))),
+
+ foreach ($editors as $name => $editor) {
+ $status[$name] = array(
+ 'severity' => (isset($editor['error']) ? REQUIREMENT_ERROR : ($editor['installed'] ? REQUIREMENT_OK : REQUIREMENT_INFO)),
+ 'title' => t('<a href="!vendor-url">@editor</a> (<a href="!download-url">Download</a>)', array('!vendor-url' => $editor['vendor url'], '@editor' => $editor['title'], '!download-url' => $editor['download url'])),
+ 'value' => (isset($editor['installed version']) ? $editor['installed version'] : t('Not installed.')),
+ 'description' => (isset($editor['error']) ? $editor['error'] : ''),
);
- if ($properties['installed']) {
- $options[$editor] = $properties['title'] . (isset($properties['installed version']) ? ' ' . $properties['installed version'] : '');
+ if ($editor['installed']) {
+ $options[$name] = $editor['title'] . (isset($editor['installed version']) ? ' ' . $editor['installed version'] : '');
}
else {
+ // Build on-site installation instructions.
+ // @todo Setup $library in wysiwyg_load_editor() already.
+ $library = (isset($editor['library']) ? $editor['library'] : key($editor['libraries']));
+ $targs = array(
+ '@editor-path' => $editor['editor path'],
+ '@library-filepath' => $editor['library path'] . '/' . $editor['libraries'][$library]['files'][0],
+ );
+ $instructions = '<p>' . t('Extract the archive and copy its contents into a new folder in the following location:<br /><code>@editor-path</code>', $targs) . '</p>';
+ $instructions .= '<p>' . t('So the actual library can be found at:<br /><code>@library-filepath</code>', $targs) . '</p>';
+
+ $status[$name]['description'] .= $instructions;
$count--;
}
+ // In case there is an error, always show installation instructions.
+ if (isset($editor['error'])) {
+ $show_instructions = TRUE;
+ }
+ }
+ if (!$count) {
+ $show_instructions = TRUE;
}
$form['status'] = array(
'#type' => 'fieldset',
'#title' => t('Installation instructions'),
'#collapsible' => TRUE,
- '#collapsed' => $count,
+ '#collapsed' => !isset($show_instructions),
'#description' => (!$count ? t('There are no editor libraries installed currently. The following list contains a list of currently supported editors:') : ''),
'#weight' => 10,
);