In design templates Futuristic, Impulses and Infinitly applications are displayed in the section «Services», «Applications» or in the main menu and are various additional mini-services: weather forecast, exchange rate, search, news, payment, speed test and so on.

Application types:
- Web application in an external window — any URL that opens in the device's browser. The peculiarity of this type of application is that not all devices after opening it can be returned to the parent application.
- Web application in the internal window — this type of application is used for custom operator widgets designed to order.
- Link to the video library section — when creating this type of widget in the application, another link will appear to open the video library (in the main menu or in the list of services, depending on the widget setting).
- Link to TV section — when creating this type of widget in the application, another link will appear to open the TV menu (in the main menu or in the list of services, depending on the widget setting).
- Reproduction of stream by reference — playback of any stream via the link specified in the "URL / Application Name / ID" field.
- Android settings screen — a widget that opens Android system settings when running
- Android app menu — a widget that opens the system menu of Android apps when launched
- Launching the Android application on AppId — a widget that opens a given system or installed Android application.
- Launching the system application by ID — analogue widget "Run Android app on AppId", but designed for other devices with the ability to run external applications. At the moment, this feature is available on Tvip consoles (application identifiers can be found in the official Tvip documentation) https://wiki.tvip.ru/stb/system_uri ), Samsung Smart TVs 2015-2019 release and Imaqliq consoles (identifiers youtube and youtube_kids).
- Widget — an internal widget designed specifically for the template will be added to the app (below is a description of the available widgets).
In templates Futuristic, Impulses, Sevstar and Sevstar X supports customization of the appearance of the application button through CSS-styles transmitted to the style property of the element. However, the styles apply only to the root container of the application – you can not use pseudoselectors or refer to child elements.
It is recommended to use only CSS properties from version 2, as experimental or newer properties may not work on TV set-top boxes and Smart TV devices.
Special attention should be paid to dimensional parameters: it is not recommended to change the height and width of the buttons, as this can lead to a violation of the overall layout of the interface.

Futuristic
Displaying widgets on the main screen
In order for widgets to appear on the main screen of the Futuristic template, it is necessary in the main parameters of the widget to set a tick opposite the item «Show the application in the main menu». Otherwise, the widget will be available under «Services» or not at all.

List of widgets that will be available in the section «Services» if the option «Show the application in the main menu » disabled:
- Speed test
- News
- Payment by QR
- Search
Widget « Speed Test »

The speed measurement is based on image download data from a remote server, so the configuration algorithm for this widget includes the following steps:
- On all servers to which you need to measure the speed, you need to put this data picture.
- In the Smarty administration panel in the section « Application Directory» create a new application with fields:
Title: any, it will be displayed in the interface
System name:SpeedTestWidget
TypeWidget
URL / Application name / ID:/templates/futuristic/default/apps/speedtest-widget/speedtest.widget.js - For each server in the block «Additional attributes» you need to specify the following parameters:
server____________: server name for display in templateserver__0__url: адрес до картинки на этом сервере, например: http://example.com/microimpuls.png (мы подобрали оптимальный размер изображения для измерения скорости)server__0____ize: the size of the picture in bytes, for the picture we provide is 16115141.
Note: within this widget you can specify several different servers. To do this, you need to consistently specify the parameters of each server, as in the screenshot below:

To display the widget in the mobile application, you need to add an option show meaningfully true on the page «Settings STB and applications » in the section «Configuration of the portal and applications ».
Widget «Telechannel »

This widget provides an opportunity to display on the main screen a link to any channel specified in the widget parameters. As an image of the button, a preview of the current transmission of this channel will be displayed. Below is the algorithm for creating a widget:
- In the Smarty administration panel in the section « Application Directory» create a new application with fields:
Titleany
System name:TV ChannelWidget
TypeWidget
URL / Application name / ID:/templates/futuristic/default/apps/tvchannel-widget/tvchannel.widget.js - For each widget in the block «Additional attributes» you need to specify the following parameters:
number: channel number in order in Smartyid: channel id in Smartyimage_url: Image URL to be displayed instead of channel preview (optional parameter)
Note: the parameters of the widget have the following priorities:
if the channel id is specified, the channel corresponding to this id will be displayed, even if the number parameter is specified;
if the number is given, the channel corresponding to the channel number will be displayed.
Widget «Weather forecast »

This widget provides access to the weather forecast. If the widget options will indicate several cities, then, thanks to the menu «City Choice» (opens by clicking on the widget) you can change the city for which the weather will be displayed in the widget window.

Algorithm for creating a widget:
- Configure the Smarty Config file:
In order for the widget «Weather forecast» to work, you must specify the source of weather information using the parameterWEATHER_DEFAULT_BACKKEND. More information about this parameter (as well as other widget parameters « Weather forecast») can be found in the documentation section «Configuration and maintenance of Smarty» — « System settings» — block « Setup of widgets and external applications». - Restart uwsgi so that the settings take effect;
- In the Smarty administration panel in the section « Application Directory» create a new application with fields:
Titleany
System nameWeatherWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/weather-widget/weather.widget.js - Prescribe parameters in the block «Additional attributes »
city__NUM__namecity namecity__NUM_id: city ID in Smartycity__NUM____________: city identifier in the weather source (can be specified instead of city__NUM__id)show_current_city_name1 — show city name, 0 — do not show city nameauto_deect_current_city1 — the device will automatically determine the city (by geolocation), 0 — the weather forecast will be displayed for the city by default
Attention! The value of the NUM should start with «0».

Widget « Currency rate »

Widget « Currency rate » adds to the main screen information about the current exchange rate against the other two currencies. In order to configure this widget, you need to perform the following algorithm of actions:
- Configure the Smarty Config file:
Before proceeding to the widget configuration, it is necessary to determine which currencies will be used to display the rate in the widget. To do this, the following parameters are used in the Smarty config file:TVMIDDLEWARE_EXCHANGE_WIDGET_COUNTRY_CODE— country code, depending on which the source of data for the exchange rate will be selected;TVMIDDLEWARE_EXCHANGE_WIDGET_FIRST_CURRENCY— the first currency in the course of currencies;TVMIDDLEWARE_EXCHANGE_WIDGET_SECOND_CURRENCY— second currency in exchange rate.
Attention! More information about the widget parameters « Currency rate» can be found in the documentation section « Configuration and maintenance of Smarty» — « System settings» — block « Setup of widgets and external applications». - Restart uwsgi so that the Smarty configuration settings take effect;
- In the Smarty administration panel in the section « Application Directory» create a new application with fields:
Titleany
System name:ExchangeWidget
TypeWidget
URL / Application name / ID:/templates/futuristic/default/apps/exchange-widget/exchange.widget.js
Widget «News»

Widget «News» adds to the home screen news RSS feed from the source specified in the widget settings. Clicking on the widget opens a list of news currently available in the feed:

By clicking on any headline, you can read the full text of the news. If you wish, you can switch to the next or previous news without leaving this screen (buttons «Previous news» and «Next news»):

The widget configuration algorithm:
- Configure the Smarty Config file (optional):
TVMIDDLEWARE_RSS_WIDGET_CACHE_TIMEOUT— time in seconds for which you need to cache the result of the RSS feed request;TVMIDDLEWARE_RSS_WIDGET_REQUEST_TIMEOUT8212; time in seconds during which a response from an external news service is expected;
Attention! More information about the widget parameters «News» can be found in the documentation section «Configuration and maintenance of Smarty» — «System settings» — block «Configuration of widgets and external applications». - If the Smarty & #8212 configuration has changed; reboot uwsgi to take effect;
- In the Smarty administration panel in the section « Application Directory» create a new application with fields:
Titleany
System name:Newswidget
TypeWidget
URL / Application name / ID:/templates/futuristic/default/apps/news-widget/news.widget.js - Subscribe in the block «Additional attributes» the following parameter:
rss_url— address of RSS tape
Widget « Payment by QR code »

Widget «Pay by QR» adds a payment button to the main screen of the portal. By pressing the button, a menu opens where you can choose the payment method:

- Pay from the TV screen — the standard payment option, also available in the menu «My profile» — «Pay». When you click on it, the form of the payment system specified in Smarty opens;
- Pay by QR code from the smartphone — the screen opens « Payment by QR code » where the QR code will be formed:

After entering the desired amount of payment in the input bar, on this screen you need to click on the button «Show QR code». After this action, a QR code will appear on the right side of the screen, the scanning of which will transfer the mobile device to the form of the payment system.
The widget parameters:
Titleany
System name: PaymentWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/payment-widget/payment.widget.js
Widget «Search»

Widget «Search» adds a search button to the main template screen. This widget simplifies access to the search button — if you have this button, you can search the channel / TV / film without opening the screen «Television » or screen «Video Library ».
The widget parameters:
Titleany
System name: SearchWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/search-widget/search.widget.js
Widget «Banner»

Widget «Banner» adds a button with an image, the link to which is indicated in the block «Additional attributes» By pressing the button, a banner appears on the screen, a link to which is also indicated in the widget settings.

The widget parameters:
Titleany
System name: PromoImageWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/promo-image-widget/promo.image.widget.js
Additional attributes of the widget:
image_url: a link to the widget image (this image will be displayed on the widget button in the main menu). The image should correspond to the size of the widget button (by default 258x168);big_image_url: a banner that will appear when you press the widget button. The image should correspond to the size of the portal screen (by default 1280x720).
Attention! This widget supports work only with the absolute type of links.
Widget «Banner link »
Widget «Banner-link» on the principle of operation similar to the widget «Banner». The only difference is that instead of the banner that appears on the screen by clicking on the widget button, you will click on the link that will be specified in the block « Additional attributes » widget.
The widget parameters:
Titleany
System name: LinkImageWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/link-image-widget/link.image.widget.js
Additional attributes of the widget:
image_url: a link to the widget image (this image will be displayed on the widget button in the main menu). The image should correspond to the size of the widget button (by default 258x168);link_url: the address of the link that will open by clicking on the widget button.
Attention! This widget supports work only with the absolute type of links.
Widget «TV premiere »

This widget provides access to the list of TV premieres. By clicking on the widget, a list of current TV premieres opens.

Attention! In order for the list to be not empty, TV premieres should be available in Smarty.
The widget parameters:
Title: any (will be displayed as the widget name in the portal)
System name: PremieresWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/premieres-widget/premieres.widget.js
Widget «Promo channel »

Widget «Promo channel » adds to the main screen button, pressing which will play the channel trailer. This widget can be used as an announcement of a new channel available by subscription.
The widget parameters:
Titleany
System name: PromoStreamWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/promo-stream-widget/promo.stream.widget.js
Additional attributes of the widget:
items_____preview_url: a link to the widget image (this image will be displayed on the widget button in the main menu). The image should correspond to the size of the widget button (by default 258x168);items______trailer_url: a link to the thread that will start when you press the widget button.
Attention! This widget supports work only with the absolute type of links.
Widget «Promo film »

The promo widget of the film adds a button with a preview image of the film to the main screen. When you click on this widget, the movie trailer is played. If you click the button «OK» (or Enter) again at the time of watching the trailer, then the transition to the description of the film is made.

The widget parameters:
Titleany
System name: PromoVodWidget
TypeWidget
URL / Application name / ID: /templates/futuristic/default/apps/promo-vod-widget/promo.vod.widget.js
Additional attributes of the widget:
items__NUM__id: film ID in Smarty;items__NUM__trailer_url: a link to the stream that will start when you press the widget button;items__NUM__preview_url: a link to the preview image that will appear on the widget button. The image should correspond to the size of the widget button (by default 258x168);NUM— the object number that will be displayed in the portal (numbered in order, starting with 0). Example: 0.1,2,3….15.- timer & #8212; number of seconds for movie rotation
Within this widget, you can add several objects (trailers). In this case, their rotation will occur once an hour (i.e., during the first hour the first trailer will be displayed, the next hour the second trailer, and so on).
Attention! In order to open a window with a description of the film when viewing the trailer by pressing the button « OK» it is necessary that the subscriber has access to this content (either using the tariff « Access to content» or using the tariff « Display content without the possibility of launching»). Otherwise, the customer will get an error.
Sibseti
Widget "Speed Test"

The speed measurement is based on image download data from a remote server, so the configuration algorithm for this widget includes the following steps:
- On all servers to which you need to measure the speed, you need to put this data picture.
- In the Smarty administration panel in the “App Directory” section, create a new application with fields:
Title: any, it will be displayed in the interface
System name:SpeedTestWidget
TypeWidget
URL / Application name / ID:you can skip filling this field because Sibseti ignores it - For each server in the "Additional Attributes" block, you need to specify the following parameters:
server____________: server name for display in the template;server__0__url: адрес до картинки на этом сервере, например: http://example.com/microimpuls.png (мы подобрали оптимальный размер изображения для измерения скорости);server__0____ize: the size of the picture in bytes, for the picture we provide is 16115141.
Note: within this widget you can specify several different servers. To do this, you need to consistently specify the parameters of each server, as in the screenshot below:

To display the widget in the mobile application, you need to add an option show meaningfully true on the “STB and Application Settings” page in the “Portal and Application Configuration” section.
Widget "Web-application in the external window"

This widget is located in the section «Our services» screen «My profile». It opens the specified URL in the browser of the device.

When setting up, the following additional parameters can be specified:
app_bg: allows you to change the background image of the widget. Accepts a link with a picture with a resolution of 307×512;qr_code: accepts a link to an image with a QR code, which will be displayed when focusing on it;description: description of the widget (will be displayed under the title).

Note: not all devices support a return to the parent app (from which the transition was made).
