Page 1 of 2
Parameters not showing in module help page
Posted: Wed Sep 16, 2009 11:37 am
by mungra
Hi,
I can't get the parameters to show in my module help page. for example:
(optional) firstparameter="1"
(optional) secondparameter="1"
i noticed in other modules that the parameters are NOT defined in de language files like es_US.php.
Can someone help?
Regards
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 11:42 am
by Jos
Parameters have to be defined in the file "modulename.module.php"
with for example the following line for a template parameter:
Code: Select all
$this->CreateParameter('template', 'summary', $this->Lang('help_template'));
$this->SetParameterType('template',CLEAN_STRING);
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 11:42 am
by RonnyK
mungra,
help page is coming from the translation file... In de default it takes all from the en_US lang-file... When the lang-file is updated to the non-English text, then that will show, no matter if it is up-to-date or not... Newer version of CMSMS will have a link, to show the module-help in English as well, to make sure that regardless of translation, the up-to-date English version is visible...
Better ask the moderators of the TC for your language to update, or better, join the TC team for your language
Ronny
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 11:48 am
by mungra
Jos wrote:
Parameters have to be defined in the file "modulename.module.php"
with for example the following line for a template parameter:
Code: Select all
$this->CreateParameter('template', 'summary', $this->Lang('help_template'));
$this->SetParameterType('template',CLEAN_STRING);
Hi,
thanx for de fast reply!
Yes i defined my parameters like your example but there still not showing

Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 11:49 am
by RonnyK
Then you should create the label in the lang-file of en_US.php as well, to tell what it should be labelled...
Ronny
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 12:57 pm
by mungra
Still doesn't work, i tried everything

!!
Any other ideas?
Thanx!
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 1:00 pm
by RonnyK
Those (optional) text is NOT coming from the module-call.... It is the direct text put in the en_US.php lang-file....
Ronny
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 1:06 pm
by Jos
step by step:
step1
search for
function SetParameters() in Yourmodule.module.php
step2
In this function you add:
Code: Select all
$this->CreateParameter('template', 'summary', $this->Lang('help_template'));
$this->SetParameterType('template',CLEAN_STRING);
Please put in the
exact same code, you can adjust later
step3
Add the helptext somewhere in langfile en_US.php:
Code: Select all
$lang['help_template'] = 'specify the template you want to use.';
That should give you a parameter template in the module-help section
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 1:35 pm
by mungra
Thanx for all your help you guys! i really appreciate it!
I did acsactly what you said in your example but still no luck :(
Can there be an error or something in my module that is preventing it from showing?
I have error reporting on and see no errors displaying.
Regards
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 1:37 pm
by Jos
did you set debug to true in the config.php?
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 1:57 pm
by mungra
Yes i did and there are no errors
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 2:12 pm
by Jos
does your module work correctly?
Is the language set to en_US in your personel account settings?
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 2:29 pm
by mungra
Yes my module is working correctly
everything is set to es_US in my settings.
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 2:31 pm
by RonnyK
The default file that is taken is en_US not es_US....
Ronny
Re: Parameters not showing in module help page
Posted: Wed Sep 16, 2009 2:55 pm
by mungra
Sorry my mistake!
i did mean en_US.
Everything is set correctly and double checked everything