Documentation

ResetKeywords

array
CAdvBanner::ResetKeywords(
 varchar(255) TYPE_SID="",
 varchar(255) LOGIC="",
 char(1) EXACT_MATCH=""
);

The method deletes keywords assigned to a page. Depending on parameters passed, the method can delete all keywords or those only defined by parameters. Non-static method.

Parameters

ParameterDescription
TYPE_SID Symbolic identifier of the advertisement type. If specified, the method deletes keywords assigned to this type only. Optional parameter.
LOGIC Specifies which keywords of the banner to delete. Possible values:
  • DESIRED - delete desired keywords;
  • REQUIRED - delete required keywords.
  • If the type of advertisement is specified as well as this parameter, the method will delete the keywords array, specified for corresponding ad type and operating by the "ATTENDANCE DESIRED" or "ATTENDANCE REQUIRED". Optional parameter.

EXACT_MATCH Specifies the type of keywords to delete with respect to their match exactness settings.

If set to "Y", the method deletes only those keywords which are required to fully match the sample.

If set to "N", the method deletes keywords which are required to be at least a part of the sample.
Search type ID (Exact or fuzzy word match). Possible values: "Y" or "N". If type of advertisement, search logic ID and this parameter are specified, then the array of this parameter, this search logic and advertisement type are deleted. Optional parameter.

Example

Consider the following keywords array:

Array
(
    [LEFT] => Array
    (
        [REQUIRED] => Array
        (
            [Y] => Array
            (
                [0] => GeForce
                [1] => Radeon
            )
            [N] => Array
            (
                [0] => video
                [1] => directx
            )
        )

        [DESIRED] => Array
        (
            [N] => Array
            (
                [0] => game
                [1] => 3D
            )
        )
    )

    [] => Array
    (
        [DESIRED] => Array
        (
            [N] => Array
            (
                [0] => GeForce
                [1] => Radeon
                [2] => Sony
            )
        )
    )

    [TOP] => Array
    (
        [DESIRED] => Array
        (
            [N] => Array
            (
                [0] => BMW
                [1] => top soft
                [2] => XP
            )
        )
    )
)

The below is the modified array after a call to CAdvBanner::ResetKeywords("LEFT","REQUIRED","N"), the keyword array will look as follows:

:

Array ( [LEFT] => Array ( [REQUIRED] => Array ( [Y] => Array ( [0] => GeForce [1] => Radion ) ) [DESIRED] => Array ( [N] => Array ( [0] => game [1] => 3D ) ) ) [] => Array ( [DESIRED] => Array ( [N] => Array ( [0] => GeForce [1] => Radion [2] => Sony ) ) ) [TOP] => Array ( [DESIRED] => Array ( [N] => Array ( [0] => BMW [1] => top soft [2] => Print ) ) ) )
© «Bitrix24», 2001-2024
Up