I plan to translate gecco’s post in English
@gecco could you add rpm part soon? it would be awesome.
Good Job Bro!
Keep “Moduling” LoL
another problem…
for add a new and fantastic feature on my module i try to make this
$command = “db accounts show domadmins”;
$admin = shell_exec($command);
echo “|” . $admin . “|”;
but don’t work
why?
if i put a php file in /tmp and then lauch it work
[root@server tmp]# cat prova.php
<?php $command = "db accounts show domadmins"; $admin = shell_exec($command); echo "|" . $admin . "|"; ?>[root@server tmp]# php prova.php
|domadmins=group
Description=Domain Admins
Gid=503
Members=admin,minucci
Removable=no
|[root@server tmp]#
why?
db is a privileged command: to execute it from the server-manager, run “sudo”!
ok
there is another command, or trick, to found all user into the group domadmins?
The Unix way:
getent group domadmins
The Nethgui way:
$module->getPlatform()->getDatabase('accounts')->getProp('domadmins', 'Members');
thanks, i change my code. now is:
$command = “getent group domadmins | cut -d ":" -f4”;
/* thanks to @davidep */
Absolutely great! Your little module becomes a project itself… I love it!
It’s great, @davidep how can @gecco improve it permitting string translations by transifex?
I’d like to see it in English and make it worldwide!
it’s in english and in italian, i make two different file:
[root@server Language]# pwd
/usr/share/nethesis/NethServer/Language
[root@server Language]# find ./ -iname SambaStatus
./it/NethServer_Module_SambaStatus.php
./en/NethServer_Module_SambaStatus.php
[root@server Language]#
i think it is sufficient… or not?
Well, English was enough …because other languages are translated on Transifex.
To prepare your code for localization, a GitHub repository would help me on uploading the source strings to Transifex. Could you share your code on GitHub?
For more details:
http://docs.nethserver.org/projects/nethserver-devel/en/v7b/i18n.html
i don’t know nothing about nethgui way, where i can found some documentation?
Have a look at
http://docs.nethserver.org/projects/nethserver-devel/en/v7b/create_interface_module.html
do you call it documentations?
Feel free to try and follw those directions and extend the documentation with the information you come across. I am sure @davidep will help you with any step you have trouble with…
first step:
There is some deprecated documentation in github’s nethgui, maybe some points are still valid (@davidep?)
Also different components in use, like Mustache, jquery, datatables…
Just say it because I wasted some time looking at symfony and twig just to find out mustache was used for templates.