{"id":2402,"date":"2022-04-27T15:04:39","date_gmt":"2022-04-27T12:04:39","guid":{"rendered":"https:\/\/www.microimpuls.com\/docs\/smarty\/configuring-and-management\/%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-%d0%bc%d0%be%d0%b4%d1%83%d0%bb%d1%8f-%d0%b3%d0%b5%d0%be%d0%bb%d0%be%d0%ba%d0%b0%d1%86%d0%b8%d0%b8"},"modified":"2026-02-06T09:16:19","modified_gmt":"2026-02-06T06:16:19","slug":"geo","status":"publish","type":"docs","link":"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/geo","title":{"rendered":"Setup of the geolocation module"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Ip2location locator<\/h2>\n\n\n\n<p>In order to use the geolocation module, you need to download the database or update an existing one. To do this, a command is used:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>smarty_manage update_ip2location --settings=settings.<\/code><\/pre>\n\n\n\n<p>It downloads a binary location database and a CSV database to create a directory of cities and countries.<\/p>\n\n\n\n<p>With the help of a downloaded database, you can automatically create countries and cities in Smarty. If cities and\/or countries have already been established, they must be removed. The team for creating countries and cities:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>smarty_manage sync_geo_ip2location --settings=settings.<\/code><\/pre>\n\n\n\n<p id=\"block-4eef0459-8c69-4142-b877-fe1f6e8cbf44\">You can select the locator in Smarty on the screen \u00ab General settings\u00bb \u2014 \u00ab General settings Client\u00bb \u2014 \u00ab Engine for the mechanism GeoIP\u00bb.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.microimpuls.com\/wp-content\/uploads\/2022\/05\/Smarty-\u0434\u0432\u0438\u0436\u043e\u043a-\u0433\u0435\u043e-4.png\" alt=\"\" class=\"wp-image-2704\" width=\"638\" height=\"374\"\/><figcaption>Choosing a geolocator in Smarty<\/figcaption><\/figure><\/div>\n\n\n\n<p>After performing all the actions, the geolocator is ready for use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scope of geolocator<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Restriction of access to the tariff plan<\/h3>\n\n\n\n<p>The geolocation module can be used on the tariff plan setting screen to restrict access to this tariff to users from another region. <\/p>\n\n\n\n<p>If the user is located outside the country and \/ or city specified in the tariff plan, this tariff plan will not be available to him. If the tariff plan is already connected to the user, access to the channels will be limited (in the portal, the channels from this tariff plan will be absent from the list). The restriction is set in the area \u00abAvailability options\u00bb on the screen editing the tariff plan:<br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"773\" src=\"https:\/\/www.microimpuls.com\/wp-content\/uploads\/2022\/05\/\u0422\u0430\u0440\u0438\u0444-\u0433\u0435\u043e-\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430-2.png\" alt=\"\" class=\"wp-image-2718\"\/><figcaption>Part of the area \u00abAvailability options\u00bb where the geo-reference of the tariff plan is set<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Weather widget:<\/h3>\n\n\n\n<p>The geolocation module can be used in the weather widget settings.<br>In order that the city for the weather widget is determined automatically (attribute) <em><code>auto_deect_current_city=1<\/code><\/em>), the geolocation module must be configured. Also, the geolocation module simplifies the creation of cities for the parameter <code>city__NUM_id<\/code>. These parameters for the weather widget can be set on the widget editing screen in the area \u00abAdditional attributes\u00bb<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"695\" src=\"https:\/\/www.microimpuls.com\/wp-content\/uploads\/2022\/05\/\u0413\u0435\u043e-\u043f\u043e\u0433\u043e\u0434\u0430-1.png\" alt=\"\" class=\"wp-image-2719\"\/><figcaption>Area \u00abAdditional attributes\u00bb with predefined cityod values and option for automatic city determination<\/figcaption><\/figure><\/div>\n\n\n\n<p><\/p>","protected":false},"featured_media":0,"parent":1454,"menu_order":9,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_links_to":"","_links_to_target":""},"doc_tag":[],"class_list":["post-2402","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/geo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438\" \/>\n<meta property=\"og:description\" content=\"\u041b\u043e\u043a\u0430\u0442\u043e\u0440 ip2location \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: \u041e\u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 CSV-\u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438 \u0441\u0442\u0440\u0430\u043d. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u044b \u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 Smarty. \u0415\u0441\u043b\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0438\/\u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u044b \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/geo\/\" \/>\n<meta property=\"og:site_name\" content=\"Microimpuls\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-06T06:16:19+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo\",\"url\":\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo\",\"name\":\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438\",\"isPartOf\":{\"@id\":\"https:\/\/micro.im\/#website\"},\"datePublished\":\"2022-04-27T12:04:39+00:00\",\"dateModified\":\"2026-02-06T06:16:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/micro.im\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Smarty\",\"item\":\"https:\/\/microimpuls.com\/docs\/smarty\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 Smarty\",\"item\":\"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/micro.im\/#website\",\"url\":\"https:\/\/micro.im\/\",\"name\":\"Microimpuls\",\"description\":\"\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f OTT \u0438 IPTV\",\"publisher\":{\"@id\":\"https:\/\/micro.im\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/micro.im\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/micro.im\/#organization\",\"name\":\"Microimpuls\",\"url\":\"https:\/\/micro.im\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/micro.im\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png\",\"contentUrl\":\"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png\",\"width\":208,\"height\":219,\"caption\":\"Microimpuls\"},\"image\":{\"@id\":\"https:\/\/micro.im\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setup of the geolocation module","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/geo\/","og_locale":"en_US","og_type":"article","og_title":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438","og_description":"\u041b\u043e\u043a\u0430\u0442\u043e\u0440 ip2location \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430: \u041e\u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 CSV-\u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0438 \u0441\u0442\u0440\u0430\u043d. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u044b \u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 Smarty. \u0415\u0441\u043b\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0438\/\u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u044b \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 [&hellip;]","og_url":"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/geo\/","og_site_name":"Microimpuls","article_modified_time":"2026-02-06T06:16:19+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo","url":"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo","name":"Setup of the geolocation module","isPartOf":{"@id":"https:\/\/micro.im\/#website"},"datePublished":"2022-04-27T12:04:39+00:00","dateModified":"2026-02-06T06:16:19+00:00","breadcrumb":{"@id":"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management\/geo#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/micro.im\/"},{"@type":"ListItem","position":2,"name":"Smarty","item":"https:\/\/microimpuls.com\/docs\/smarty"},{"@type":"ListItem","position":3,"name":"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 Smarty","item":"https:\/\/microimpuls.com\/docs\/smarty\/configuring-and-management"},{"@type":"ListItem","position":4,"name":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438"}]},{"@type":"WebSite","@id":"https:\/\/micro.im\/#website","url":"https:\/\/micro.im\/","name":"Microimpulses","description":"Comprehensive solutions for OTT and IPTV","publisher":{"@id":"https:\/\/micro.im\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/micro.im\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/micro.im\/#organization","name":"Microimpulses","url":"https:\/\/micro.im\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/micro.im\/#\/schema\/logo\/image\/","url":"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png","contentUrl":"https:\/\/microimpuls.com\/wp-content\/uploads\/2024\/12\/mi-logo-square-en-black.png","width":208,"height":219,"caption":"Microimpuls"},"image":{"@id":"https:\/\/micro.im\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/2402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/comments?post=2402"}],"version-history":[{"count":19,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/2402\/revisions"}],"predecessor-version":[{"id":2804,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/2402\/revisions\/2804"}],"up":[{"embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/1454"}],"next":[{"title":"Advertising settings","link":"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/ads","href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/1643"}],"prev":[{"title":"Setting up monitoring and alarms","link":"https:\/\/microimpuls.com\/en\/docs\/smarty\/configuring-and-management\/monitoring-and-alarming","href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/docs\/1466"}],"wp:attachment":[{"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/media?parent=2402"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/microimpuls.com\/en\/wp-json\/wp\/v2\/doc_tag?post=2402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}