Widgets (SKINS)(LANG)

Version 1.56

Feature
Finished

Widgets are tabs that can be added/removed/re-ordered which let the User customize their main screen for the current access Level. To enable widgets in your skin, you must first create a skin.conf, and add: widgets=1 then setup the default widget lists in the skin.conf, and defaults if unset, eg: admin_widgets=WGT_ADMIN_STATS:WGT_ALL_USERS:WGT_SHOW_SERVICES admin_widgets_default=WGT_ADMIN_STATS:WGT_ALL_USERS reseller_widgets=WGT_RESELLER_STATS:WGT_LIST_USERS:WGT_SKINS reseller_widgets_default=WGT_RESELLER_STATS:WGT_LIST_USERS user_widgets=WGT_USER_STATS:WGT_ADDITIONAL_DOMAINS user_widgets_default=WGT_USER_STATS:WGT_ADDITIONAL_DOMAINS Just as an example. The WGT_ values are your own creation, and can be named whatever you want. (A-Z and _) If unset, the lists will be saved into the admin.conf, reseller.conf and user.conf. The order of the list in the conf file determines the order the widget is displayed. To specify what each widget will show, you must create a 'widgets" folder in your skin directory, and each widget must have the files: tab.html content.html lang.txt DA will set a token called: WGT_ID which starts at 1 and counts up for each widget used. All global tokens are available. But specific table data, use ajax or API type calls for detailed info for your widget. ------------- LANGUAGE/TRANSLATION: the lang.txt is just the base translation file. It might have TITLE and DESCRIPTION, but can also have other tokens you want int the widget content. The widgets can also be included in the actual language packs, if you wish, eg: lang/en/widgets/WGT_ALL_USERS.txt where "en" would be for english, and WGT_ALL_USERS.txt is a duplciate of the lang.txt file, but for this given language. The "InternalText" class was adapted for this, so the search priority is: 1) Current skin, current language widget .txt file 2) Default skin (usually enhanced), then current language widget .txt file. 3) Widget's lang.txt Note, we're going to standardize the language packs, so both the enhanced and evolve skins can use the same packs interchangeably.

Interested to try DirectAdmin? Get a 30-day Free Trial!