In-Portal Developers Guide

This is a wiki-based Developers Guide for In-Portal Open Source CMS. The purpose of this guide is to provide advanced users, web developers and programmers with documentation on how to expand, customize and improve the functionality and the code the In-Portal software. Please consider contributing to our documentation writing effort.

K4:Configuration

From In-Portal Developers Guide

(Difference between revisions)
Jump to: navigation, search
Line 154: Line 154:
=== Proj-Base ===
=== Proj-Base ===
{| class="prettytable"  
{| class="prettytable"  
-
! название || описание || по умолчанию
+
! name || description || default setting
|-
|-
-
| {{ConfigProperty|UseSmallHeader|int}} || Позволяет убрать заголовок на grid.
+
| {{ConfigProperty|UseSmallHeader|int}} || Let's one remove grid headings
   {| class="prettytable vertical-table"
   {| class="prettytable vertical-table"
-
   ! до || после
+
   ! before || after
   |-
   |-
   | [[Image:Normal grid header.gif|thumb]] || [[Image:Small grid header.gif|thumb]]
   | [[Image:Normal grid header.gif|thumb]] || [[Image:Small grid header.gif|thumb]]
   |}
   |}
-
Будет работать только при использовании блока '''<code>combined_header</code>'''. Доступна с [[K4:Core v 4.2.0|Core v 4.2.0]].
+
Will only work if '''<code>combined_header</code>''' block is used. Available since [[K4:Core v 4.2.0|Core v 4.2.0]].
| 0
| 0
|-
|-
-
| {{ConfigProperty|UsePopups|int}} || Начинать создание/редактирование записей из grid в новом окне (popup).
+
| {{ConfigProperty|UsePopups|int}} || Adding/editing items in a grid will be done in a pop-up
| 1
| 1
|-
|-
-
| {{ConfigProperty|TrimRequiredFields|int}} || Указывает на то, что перед проверкой на наличие данных в обязательных полях к ним применяется функция <code>trim()</code>. Доступна с версии [[K4:Core v 4.2.2|Core v 4.2.2]].
+
| {{ConfigProperty|TrimRequiredFields|int}} || Indicates that before required form fields are checked (to see if they were entered), that the <code>trim()</code> function will be applied first. Available since version [[K4:Core v 4.2.2|Core v 4.2.2]].
| 0
| 0
|-
|-
-
| {{ConfigProperty|MenuFrameWidth|int}} || Позволяет задать ширину фрэйма c деревом (в пикселях), по умолчанию 200. Доступна только в Platform с версии [[K4:Core v 4.2.2|Core v 4.2.2]].
+
| {{ConfigProperty|MenuFrameWidth|int}} || Sets the width of the frame with the navigation tree (in pixels), 200px by default. Available only in Platform, since version [[K4:Core v 4.2.2|Core v 4.2.2]].
| 200
| 200
|-
|-
-
| {{ConfigProperty|DefaultSettingsUserId|int}} || Пользователь, который используется когда новый администратор (у которого еще нет данных [[K4:PersistantSessionData|PersistentSession]]) первый раз заходит на любой список. Такому администратору проставляются значения [[K4:PersistantSessionData|PersistentSession]] от пользователя с указанным в этой переменной ID, а именно данные:
+
| {{ConfigProperty|DefaultSettingsUserId|int}} || The user that's used when a new administrator (that doesn't have [[K4:PersistantSessionData|PersistentSession]] data yet) goes into any grid for the first time. An administrator in this situation receives the [[K4:PersistantSessionData|PersistentSession]] value from the user indicated in this ID variable, specifically the following data:
-
* ColumnPicker;
+
* ColumnPicker;
* PerPage;
* PerPage;
* Filters.
* Filters.
-
Таким образом если красиво настроить все списки (включая ширины колонок, т.к. они теперь тоже хранятся в [[K4:PersistantSessionData|PersistentSession]]) для root'а или другого пользователя (указав его Id), то эти настройки будут работать для новых пользователей по умолчанию. Также в раздел "<code>Users Management -> Admins</code>" добавлена кнопка <code>Reset</code> (только в Platform), которая стирает персональные настройки выбранным пользователям (только те, что берутся от пользователя по умолчанию) и таким образом пользователю можно принудительно выставить настройки списков (правда сразу всех) по умолчанию. Переменная по умолчанию имеет значение <code>-1</code>, т.е. "root". Доступна с версии [[K4:Core v 4.2.2|Core v 4.2.2]].
+
What this allows is, if all grid preferences have been set in a particular way (including column widths, since they're also stored in [[K4:PersistantSessionData|PersistentSession]]) for the root user or for a different user (indicating that user's ID), then these settings will work for the new user by default. Also, in the "<code>Users Management -> Admins</code>" section, a <code>Reset</code> button was added (only in Platform), that removes such personal user settings (only those that are taken from the user by default) and thus the user can reset all default grid settings (all at once). The variable by default has the value <code>-1</code>, i.e. "root". Available since version [[K4:Core v 4.2.2|Core v 4.2.2]].
-
{{TipBox|Если не ввести значение, то всё равно будет интерпретировано, как "<code>-1</code>" :(. Чтобы выключить данную функциональность нужно написать любое <code>ID</code> несуществующего пользователя, напр. <code>999999999999</code>.}}
+
{{TipBox|If no value is entered, then it'll be interpreted as "<code>-1</code>" anyway :(. To turn off the above described functionality, it's necessary to enter any <code>ID</code> of a non-existent user, for example <code>999999999999</code>}}
| -1
| -1
|-
|-

Revision as of 23:00, 19 March 2009

Настройка системы Настройка системы
Статьи в этой категории

Described here are all available configuration variables in K4. Each variable is a record in 2 tables:

Contents

Configuration Variables

Core

name description default setting
UseCronForRegularEvent (int) Indicates how regular events are to be carried out. If turned on, then all scheduled events will be carried out only through cron. 0
UseChangeLog (int) Indicates that database changes must be written to the log file. Available since version Core v 4.3.0. 0
KeepSessionOnBrowserClose (int) Indicates that the session must NOT expire when the browser is closed. Turned off by default, i.e. when the browser is closed the session EXPIRES. Available since version Core v 4.2.2.
Image:Tipbox Icon.gif Previously, the user's session was always available when reopening the browser.
0
AutoRefreshIntervals (string) The available intervals of automatically refreshing grids. Comma separated values in minutes. Available in "View Menu" for grids. Available since version Core v 4.3.0. 1,5,15,30,60,120,240
RememberLastAdminTemplate (int) Indicates that after authentication the user should not be redirected to the last template they were on. Only for the administrative console. Available since version Core v 4.3.1.
Image:Tipbox Icon.gif Previously, the user was always redirected to the last template they were on, after authenticating.
0
SSL_URL (string) Indicates the URL, where the site is accessible when using SSL. The address must always start with "https://" and must not end with "/". Available since version Core v 1.1.2.
AdminSSL_URL (string) Indicates the URL, where the site's administrative console is accessible through SSL (it's not necessary to include ("/admin"). The URL must always start with "https://" and must not end with "/". If the field for this configuration variable is left blank, the the value for the SSL_URL variable will be used. Available since version Core v 4.3.1.
Require_AdminSSL (int) Indicates that access to the administrative console is only through SSL. Available since version Core v 4.1.0. 0
Require_SSL (int) This configuration variable indicates that on templates with the tag m_CheckSSL with parameter condition="Require_SSL", the site must automatically switch into SSL-mode (obviously if the site is not already in SSL-mode).
<inp2:m_CheckSSL mode="required" condition="Require_SSL"/>
0
Force_HTTP_When_SSL_Not_Required (int) If this configuration variable is turned on, then when the site user, while in SSL-mode, enters a template that doesn't require SSL, he will be automatically redirected to an equivalent http:// template (for example the address "https://www.test.com/no_ssl.html" will become "http://www.test.com/no_ssl.html"). 1
UseModRewriteWithSSL (int) If this configuration variable is turned on and SSL is turned on for the front-end, then URLs in SSL-mode will also be built using mod_rewrite technology (just like when not in SSL-mode).
Image:Infobox Icon.gif Before turning on this configuration variable, it's important to make sure that the site specified in the configuration variable SSL_URL includes support for mod_rewrite (in your server settings).
0
AllowSelectGroupOnFront (int) This configuration variable allows the site user, on the Front-End, to choose for him or herself, the permissions group that he or she wants (virtual field UserGroup). It will only be possible to choose from those groups that allow this (see field FrontRegistration). Available since version Core v 4.3.1. 0
ForceImageMagickResize (int) This configuration variable says that image scaling must be done using the ImageMagicк program, even if the GD library is available in в PHP. Available since Core v 4.3.1. 0
Email_As_Login (int) This configuration variable indicates the field that's used for authentication on the front-end. 1 - Email. 0 - Login. Available since Core v 1.1.0. 0
RegistrationCaptcha (int) This configuration variable determines whether it's required for new users on the front end to enter an alphanumeric code, as proof that they are an actual person and not a robot. Values: 1 - required. 0 - not required. Available since Core v 4.0.1. 0
User_Allow_New (int) This configuration variable determines whether it's possible to register new users on the front-end. Values:
  • 1 - registration is enabled, status of new users - active
  • 2 - registration is disabled
  • 3 - registration is enabled, status of new users - pending approval by the administrator

Available since version Core v 1.0.0.

3
User_NewGroup (int) This configuration variable determines the user group, to which a new user is assigned if one was not specifically set.
$this->Application->GetVar('user_group')

For security reasons, the variable user_group works only in the administrative console - so that users registering on the front end can't choose a group for themselves. Available since version Core v 1.0.0.

13 (Member)
User_MembershipExpirationReminder (int) In K4, users can be in user groups (Member, Subscribers, etc). Membership in a group can be constant or temporary. In the case where membership is temporary, this variable determines how many days before the end of the membership to send the e-mail notice (event USER.MEMBERSHIP.EXPIRATION.NOTICE) to those whose membership is ending soon and the administrator. Available since version Core v 1.0.0. 10
User_Password_Auto (int) This variable determines whether the system should automatically generate a password for a user when the new user is created. Values: 1 - yes, 0 - no. If this option is turned on, then on the registration form on the front-end, there's no need to show the user the password field. Available since version Core v 1.0.0. 0
FirstDayOfWeek (int) This configuration variable determines the day of the week on which the week should start and affects how the calendar looks. Typical values: 1 - Monday, 0 - Sunday. Available since version Core v 1.1.2. 1
NoPermissionTemplate (string) This configuration variable indicates the template, to which the site user is redirected if they do not have the permissions to view the page they are trying to access on the front-end. Available since version Core v 1.2.0. no_permission
SessionCookieName (string) This configuration variable sets the name of the cookie that stores the session ID of the user. Available since Core v 1.1.4. sid
SessionReferrerCheck (int) This configuration variable determines whether the $_SERVER['HTTP_REFERER'] variable is checked when the session ID of the user can be passed bypassing cookies. This test provides an additional guarantee that the system won't process false POST-requests, generated outside the system. Available since version Core v 1.1.4. 1
SessionTimeout (int) This configuration variable determines how long a user's session will remain active in the case where the user is idle. The time is entered in seconds. The maximum amount of time before the session times out is limited for security reasons. Available since version Core v 1.0.0. 3600
Site_Name (string) This configuration variable indicates the site name that's used as the site title and in e-mail notifications sent by the site. Available since version Core v 1.0.0. KernelX
Site_Path (string) This configuration variable indicates the path to the site relative to the root directory, corresponding to the domain, used to get to the site ($_SERVER['DOCUMENT_ROOT']). For example, if the site is located in the subdirectory code>dev</code>, the value of this variable should be /dev/. Available since version Core v 1.0.0. /
Smtp_AdminMailFrom (string) This configuration variable determines the return e-mail address that's used by default for e-mail notifications sent by the site. Available since version Доступна с версии Core v 1.0.0. portal@domain, where domain - the domain, setup during installation of site
Smtp_Authenticate (int) This configuration variable determines whether authorization is required when connecting to the mail server. Values: 1 - required, 0 - not required. Available since version Core v 1.0.0. 0
Smtp_User (int) This configuration variable indicates the username for access to the mail server, if authentication is required. Available since version Core v 1.0.0.
Smtp_Pass (int) This configuration variable indicates the password for the mail server if authentication is required. Available since version Core v 1.0.0.
Smtp_Server (int) This configuration variable let's one set the domain or IP of the mail server, if the default mail server set in the PHP configuration isn't going to be used. Available since version Core v 1.0.0.
UseModRewrite (int) This configuration variable determines the addressing of pages on the front-end part of the site. Values: 0 - mod_rewrite turned off, 1 - mod_rewrite turned on. If mod_rewrite is turned off, then when accessing the page, its location in the directory structure of the site is determined in the env variable.

http://www.somedomain.com/index.php?env=-in-commerce/product/details:m304-1-1-3-s-:p-41----

If mod_rewrite is turned on, then the location of the page in the directory structure of the site is shown in the directory-subdirectory style, corresponding to the names of the site's directories and the name of the current object shown on the page,

http://www.somedomain.com/products/bikes/incredi_bike.html

which is good for search engine indexing. Available since version Core v 1.1.4.

0
UseToolbarLabels (int) This is a configuration variable that determines whether text names will be shown below buttons in the toolbars in the administrative console. Values: 1 - yes, 0 - no. This value is used in JavaScript-functions, that generate the buttons. Available since version Core v 4.2.0. 1
YahooApplicationId (string) This configuration variable let's the administrator enter a Yahoo Application ID, that in the future will be used for integrating functionality provided by the Yahoo service. Currently, it's used for the spelling dictionary search suggestion functionality that's for the search field. Available since version Core v 4.3.2.
FilenameSpecialCharReplacement (string) This configuration variable indicates the symbol, that will be the symbol used in naming elements, used when building links with mod_rewrite. Before this configuration variable was developed, only the "_" was used, but now it can be replaced with "-". Available since version Core v 4.3.2. _

In-Portal

name description default setting
RecycleBinFolder (int) If set, then all deleted records from the catalog will be moved to the category with the ID indicated here. Available since version Core v 4.2.2.
UsePageHitCounter (int) Indicates to count the total number of visits to the site (i.e. total of visits to each front-end page). Avaiable since Core v 4.3.0. 0
PageHitCounter (int) Stores the total number of site visits. Used with UsePageHitCounter. Available since Core v 4.3.0. 0
RootPass (string) This configuration variable stores the hash of the password for the root site administrator and is used to check the password when the root administrator is logging in to the administrative console. Available since version Core v 1.0.0. Set by the administrator when installing the system
Root_Name (string) This configuration variable contains the phrase, that can be translated as the root category of the system (category with number 0). Used for displaying navigation elements. Available since version Core v 1.0.0. lu_rootcategory_name

Proj-Base

name description default setting
UseSmallHeader (int) Let's one remove grid headings
before after

Will only work if combined_header block is used. Available since Core v 4.2.0.

0
UsePopups (int) Adding/editing items in a grid will be done in a pop-up 1
TrimRequiredFields (int) Indicates that before required form fields are checked (to see if they were entered), that the trim() function will be applied first. Available since version Core v 4.2.2. 0
MenuFrameWidth (int) Sets the width of the frame with the navigation tree (in pixels), 200px by default. Available only in Platform, since version Core v 4.2.2. 200
DefaultSettingsUserId (int) The user that's used when a new administrator (that doesn't have PersistentSession data yet) goes into any grid for the first time. An administrator in this situation receives the PersistentSession value from the user indicated in this ID variable, specifically the following data:
  • ColumnPicker;
  • PerPage;
  • Filters.

What this allows is, if all grid preferences have been set in a particular way (including column widths, since they're also stored in PersistentSession) for the root user or for a different user (indicating that user's ID), then these settings will work for the new user by default. Also, in the "Users Management -> Admins" section, a Reset button was added (only in Platform), that removes such personal user settings (only those that are taken from the user by default) and thus the user can reset all default grid settings (all at once). The variable by default has the value -1, i.e. "root". Available since version Core v 4.2.2.

Image:Tipbox Icon.gif If no value is entered, then it'll be interpreted as "-1" anyway :(. To turn off the above described functionality, it's necessary to enter any ID of a non-existent user, for example 999999999999
-1
AdvancedUserManagement (int) Включает дополнительные возможности управления правами пользователей (администраторов) через группы. По умолчанию выключена. После включения необходимо очистить Sections Cache и перезагрузить фрейм с деревом. Параметр включает секцию Groups, в которой можно создавать группы по смыслу, а также просматривать и добавлять/удалять пользователей в этих группах. В редактировании администраторов добавляется закладка со списком групп в которых состоит пользователь. Для управления правами пользователей используется следующая схема: стандартной группе admin запрещается все, кроме права ADMIN.LOGIN, далее создаются группы по смыслу, которым разрешается доступ в нужные секции. Все администраторы автоматически добавляются в основную группу admin (при создании через соответствующую секцию). Далее их надо добавлять в нужные смысловые группы, НЕ УБИРАЯ из группы admin и НЕ МЕНЯЯ основную (primary) группу, т.к. в секции Administrators показываются пользователи, у которых основная группа - admin. Доступна только в Platform с версии Core v 4.2.2. 0
UseDoubleSorting (int) Эта переменная конфигурации определяет как меняется сортировка в списках. Сортировка меняется при выполнении события OnSetSorting - например, когда мышкой нажимают на заголовок столбца с данными. При UseDoubleSorting = 0 (значение по умолчанию) в итоге получается фильтр только по одному столбцу, на заголовок которого нажали. Если же UseDoubleSorting = 1, и мышкой поочерёдно нажимали на заголовки разных столбцов, то фильтр будет по двум столбцам - вначале по столбцу, нажатому последним, а затем - по столбцу, нажатому предпоследним. 0

Proj-CMS

название описание по умолчанию
ProjCMSAllowManualFilenames (int) Эта переменная конфигурации разрешает пользователю редактировать название файла для mod-rewrite (галочка "Auto-filename" и само название файла). Доступна с версии Core v 4.0.1. 0

In-Commerce

Переменные вида Comm_Shipping*** задают адрес с которого происходит доставка заказов и могут использоваться для расчёта стоимости доставки заказа.

название описание по умолчанию
Comm_RequireLoginBeforeCheckout (int) Эта переменная конфигурации определяет должен ли покупатель авторизоваться на пользовательской части сайта для окончательного оформления заказа. 1 - должен авторизоваться. 0 - не должен. Доступна с версии In-Commerce v 1.0.0. 0
Comm_Shipping_AddressLine1 (string) Эта переменная конфигурации задаёт первую строку адреса с которого происходит доставка заказов. Доступна с версии In-Commerce v 1.0.0.
Comm_Shipping_AddressLine2 (string) Эта переменная конфигурации задаёт вторую строку адреса с которого происходит доставка заказов. Доступна с версии In-Commerce v 1.0.0.
Comm_Shipping_City (string) Эта переменная конфигурации задаёт город из которого происходит доставка заказов. Доступна с версии In-Commerce v 1.0.0.
Comm_Shipping_Country (string) Эта переменная конфигурации задаёт страну из которой происходит доставка заказов. Выбирается одно из значений DestAbbr таблицы StdDestinations. Доступна с версии In-Commerce v 1.0.0.
Comm_Shipping_State (string) Эта переменная конфигурации задаёт штат или провинцию откуда происходит доставка заказов. Доступна с версии In-Commerce v 1.0.0.
Comm_Shipping_ZIP (string) Эта переменная конфигурации задаёт почтовый индекс с которого происходит доставка заказов. Доступна с версии In-Commerce v 1.0.0.

См. также