From: Jamie C. <jca...@we...> - 2003-11-08 02:01:17
|
I see what you mean .. unfortunately, there is no currently any API function that will directly return webmin/usermin, but you can make use of the $gconfig{'userconfig'} variable, which is only set in Usermin. So the code could be like : if ($gconfig{'userconfig'}) { # usermin specific stuff } else { # webmin specific stuff } In the future I will add a 'get_product_name' API function that will return either 'webmin' or 'usermin' . - Jamie Eldy wrote: > You suggest to use the following code to differentiate webmin/usermin > running theme: > > %tinfo = &get_theme_info($current_theme); > if ($tinfo{'usermin'}) { > # whatever .. > } > > But this means I need to provide two different them package with a > different theme.info file. > One wbt file without the line usermin=1 inside the theme.info for webmin > and another > wbt file with the line inside theme.info (if I correctly understood). > This means I must > manage two packages just for one different file. This is a "lost of > time" for me as my theme > works with all same files with webmin and usermin. > Can't you add an API, for example "getMinName()" that will return > 'webmin' or 'usermin'. > With a such API, the same theme with same package can be installed on > both webmin and usermin > and i am still able to have a theme that report different things if it > is on webmin or usermin ? > > Or may be you plan to have incompatibilities between webmin and usermin > theme architecture and > you prefer to force having always 2 different themes package ? > > If not, the suggested API will be a good thing. > > Laurent Destailleur as Eldy. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel > |