고급 등급 페이지 | ||||||||||||||||||||||||||||||||||||
관련 토픽
The feature must first be enabled through this same administration panel. Along with the feature, a few options are available. Among them, the score recalculation period must be defined. These are the available options:
The value ranges for each object type can also be specified through the administration panels.
The common sort_mode parameter to lists can be used to activate sorting using advanced ratings. To do so, the sort mode must be set to adv_rating_X_asc or adv_rating_X_desc where X is the ID of the rating configuration. The default sort can also be set to advanced ratings in the administration panel where applicable. |
Calculation configuration | |
|
Advanced Rating | |
Introduced in Tiki5, the advanced rating feature allows for more control over the aggregation of scores. Rating methods are defined globally and will be used for all supported objects. They are defined through the Advanced Rating administration panel (tiki-admin.php?page=rating). Multiple methods can be created. If a method contains type-specific calculations, it will be ignored when performing the calculation. Features currently supporting sorting through advanced rating:
|
Sorting items according to advanced rating | |
Feature request: Can we make this take the name of the config instead of the ratingConfigId as well? |
Set-up | |
The calculation is defined as a small piece of code, similar to functional languages, which is very close to mathematical representations. Creating custom formulas is expected to require some mathematical skills. However, this documentation should provide examples for most frequent cases. The editor in the administration panel performs extensive validation and will make it impossible to save the formula unless it can be evaluated. Checks are performed for:
Copy to clipboard
Copy to clipboard
mul is a mathematical function. (mul 3600 24 30) is equivalent to 3600*24*30. The functions can be combined in various ways. For example, we could calculate a score that considers the votes from the past month, but gives extra emphasis on the recent ones. Copy to clipboard
All available options are documented in the following section. |
General Reference | |
comment | |
Any comment block is stripped from the formula at parse-time Copy to clipboard
|
mul (Multiply) | |
Performs a simple multiplication accepting multiple input values. Copy to clipboard
|
div (Divide) | |
Performs a simple division accepting multiple input values. Copy to clipboard
|
add (Sum) | |
Performs a simple sum accepting multiple input Copy to clipboard
|
sub (Substract) | |
Performs a simple substraction accepting multiple input Copy to clipboard
|
round | |
Rounds to a specific number of digits (new in Tiki12) Copy to clipboard
|
coalesce | |
Returns the first non-empty value from the list. Copy to clipboard
|
str | |
Generates a static string when needed and the processor attempts to process the string as a variable. Any arguments will be concatenated using spaces. Note: The quoted string syntax was included in Tiki13. Copy to clipboard
|
concat | |
Concatenates a string of text. (new in Tiki12) Note: The quoted string syntax was included in Tiki13. Copy to clipboard
|
map | |
Generates a map (or dictionary). Copy to clipboard
|
equals | |
Compares multiple values. Copy to clipboard
|
if | |
Conditionally evaluates a branch. Copy to clipboard
|
and | |
Ensures all elements evaluate to true. Copy to clipboard
|
or | |
Ensures that at least one element evaluates to true. Elements are evauated sequentially until a false element is found. Others are left unevaluated. Copy to clipboard
|
hash | |
Generates a hash based on multiple values. Used primarily to generate aggregate hashes in the PluginActivityStream. Note that because it is a hash, the exact value coming out does not matter. Only that given the same parameter, it will produce the same value. Copy to clipboard
|
avg | |
Calculates the average of multiple values. All entries in the list will be flattened if arrays are present. Copy to clipboard
|
split-list | |
Produces a multi-dimensional array out of a text string. Each line is expected to be an independent value, each line will be split by a separator into the specified keys. Copy to clipboard
|
for-each | |
For a list of value pairs, such as the output of split-list, evaluates a formula for each set of values, returns the list of results. Within the formula, variables coming from the list will be used first. Fallback will be on the other variables available in the execution context. Copy to clipboard
|
고급 등급-특정 참조 | |
rating-average (등급-평균) 및 rating-sum (등급 합계) | |
등급 함수는 등급 기록 테이블에서 점수를 계산합니다. 사이트에 수행된 각 등급은 데이터베이스 내에 보관되며 사용자 지정 등급을 계산하기 위해서 사용될 수 있습니다. 다양한 선택사항이 문서의 품질 향상을 지원하거나 피드 수집기로 들어오는 데이터의 순위를 매기기 위하는 등의 사이트 상의 중요성을 반영하기 위하여 점수를 계산하도록 적용됩니다.
|
article-info | |
계산에 포함될 수 있도록 기사에서 정보를 추출. 첫 번째 인자는 언제나 항상 'article' (기사)가 되어야함 . 그 외 다른 값이 되는 경우, 연산은 평가된 개체에 대하여 건너뛰어지게 되어, 이를 공식 유형-특화시켜 버립니다. 사용가능한 속성들:
Copy to clipboard
|
속성 | |
보통의 개체 속성에서 정보를 추출함. Copy to clipboard
|
tracker-field | |
트래커 항목에서 정보를 추출함. 필드 값은 숫자로 자동으로 변환됨. 값이 발견되지 않거나 적용 불가능 한 경우 0 이 제공됨. Copy to clipboard
|
category-present | |
개체상에 존재하는 모든 나열된 범주의 점수에 1 을 부여함. Copy to clipboard
|
부록 | |
통합 검색 (unified search) 이 사용될 때, 재계산은 재색인 동안 이루어지도록 구성될 수 있습니다, 고로 이 스크립트가 필요 없어집니다. Copy to clipboard
|
단순 위키 등급 | |
|
관련 | |
별칭
|