Hello Community,
I've just noticed, that the help texts for language strings are not available anymore since CMSimple_XH 1.6. I'm not sure, whether that is a good thing (consider a config option and a language string with the same name), or whether it has to be regarded as a regression bug.
Basically, I don't see the need for help texts for localizations (except for something like Filebrowser: properly escape JS config options, but in this case there are better alternatives). There are, however, plugins that use language strings that are actually configuration options, and it might be reasonable to allow respective help texts.
What do you think? If it's a bug, we should fix it as soon as possible, i.e. for XH 1.6.3.
Christoph
Help texts for language strings are gone since XH 1.6
Help texts for language strings are gone since XH 1.6
Christoph M. Becker – Plugins for CMSimple_XH
Re: Help texts for language strings are gone since XH 1.6
Hmm, to be honest, I've never really noticed that there's the possibility to have tooltips... ...
If it's not a big problem, it should be fixed IMO. For some plugins it seems to be useful (RSS-Settings in AdvancedNews / RealBlog for example). But it's not a "must be".cmb wrote:What do you think?
Re: Help texts for language strings are gone since XH 1.6
I'm not sure, if this possibility was intended, when the tooltips have been introduced.Holger wrote:Hmm, to be honest, I've never really noticed that there's the possibility to have tooltips... ...
No, it's not a big problem. Actually, the following patch should suffice:Holger wrote:If it's not a big problem, it should be fixed IMO.
Code: Select all
Index: FileEdit.php
===================================================================
--- FileEdit.php (revision 1314)
+++ FileEdit.php (working copy)
@@ -953,7 +953,9 @@
if ($cat == 'meta' && $name =='codepage') {
continue;
}
- $co = array('val' => $val, 'type' => 'text');
+ $hint = isset($tx['help']["${cat}_$name"])
+ ? $tx['help']["${cat}_$name"] : null;
+ $co = array('val' => $val, 'type' => 'text', 'hint' => $hint);
if ($cat == 'subsite' && $name == 'template') {
if ($sl === $cf['language']['default']) {
$co['type'] = 'hidden';
@@ -1131,7 +1133,9 @@
$this->cfg = array();
foreach ($plugin_tx[$plugin] as $key => $val) {
list($cat, $name) = $this->splitKey($key);
- $co = array('val' => $val, 'type' => 'text');
+ $hint = isset($plugin_tx[$plugin]["cf_$key"])
+ ? $plugin_tx[$plugin]["cf_$key"] : null;
+ $co = array('val' => $val, 'type' => 'text', 'hint' => $hint);
$this->cfg[$cat][$name] = $co;
}
}
Christoph M. Becker – Plugins for CMSimple_XH