Brief: there are some tags for the blocks system that are saved in htm. Blocks files in order to be processed and replaced with their right values. These tags have the same context of HTML ones, so that you need to be careful while you are editing the blocks files in order not to remove any tag of the blocks system which may lead to displaying errors. 

 

- Variants, constants, and general variants: 

They are defined in a template as explained below: 

CODE :

The value can be set by using “Assign” in the variants “PHP” file, using the general variants defined before, or the constants. 

-[code]{$dimphrase.dim_message} {lang_left} {script_url}[/codeالمبدلات (Modifiers) :

There are some functions added after the variant in the block, in order to edit the variant value before being displayed. As the modifiers functions exist in the (include/modifiers) folder or PHP functions. 

Example: 

CODE :

Recalling the function (strtolower) is transferring the letters of the variant value (mname) into small letters. Noting that you may recall the variants more than once for the same variant at the same time. 

-Repetition Block (Loop): 

This block is defined as a part of another block as explained below: 

CODE :

The block name is what the repetition block is called and it is set using PHP. noting that part of HTML code is not designated except by defining the block using PHP through (new block) function. 

-Inserting block tag: 

Inserting a block file into another block is done as explained below: 

CODE :

“Block name” is the block file title wanted to be inserted. Noting that the name of the block wanted to be called has to be inserted without the extension “htm”. 

Note: 

Recalling a block included in the style blocks main folder, you need to enter the block name directly. Otherwise , if you want to recall a block file using another path, you need to enter the block path. For example, on recalling a block that is included in any folder of the plugin: 

CODE :

Note 2: 

On inserting any block, the blocks system is searching if the block exists in the matrix or not. 

CODE :

In which the replaced blocks are stored instead of the main ones. As once any block is recalled: 

CODE :

The block system searches for a stored value in the matrix instead of the block name. 

CODE :

The existing value is the plugin name stored in the alternative block included in “tpl” folder of the plugin, in order to be recalled instead of the currently recalled one. 

 

- The tag of inserting PHP files in a block: 

Recalling PHP file in a block is executing as shown below: 

CODE :

"Iblockname” is the PHP file name that is wanted to be inserted, noting that the name of the recalled file is entered without the extension “php. 

Note: 

On recalling a file from the Dimofinf main folder, you only need to enter the file name directly. Otherwise, when you need to recall a block file exists in another path, enter the file path. For example, on recalling a file that exists in “include” folder: 

CODE :

- the tag of IF/ELSEIF/ELSE condition: 

The condition clauses are entered as shown below: 

CODE :

Example: 

CODE :

- PHP code tag: to execute a PHP code in a block, follow the below:  

CODE :

Example

[code] <[START PHP CODE]> global $relatedsearches_block; foreach($relatedsearches_block AS $key => $value){ echo '

'. $value .'

'; } <[END PHP CODE]> [/code]

 

- the tag of recalling a function: 

To execute any function of the previously defined ones, follow the below:  

CODE :

Whereas: 

Function_name: is the name of the previously defined function in the system, as the files of the block functions that are previously defined are put in the “include/functions” folder.  

Args are the parameters sent to the function. 

Example: 

- the temperate zone tag: 

This tag is inserted in the locations that you want to use in your programming, to recall a PHP file in order to show a certain stuff, the template zone allows you to use any location of the block to show other stuff using the plugin system. 

Example: 

CODE :

- the tag of ignoring a code: 

It is used to discard any part of the block in order to be excluded from the block's system processing. Here, discarding doesn’t mean to omit the code, but not to process the blocks system tags. 

CODE :

Commenting the block: 

You can enter your programming comments in blocks as shown below: 

CODE :

The processing system hides these comments and doesn’t display them; however, these comments are only displayed in the source file of a block. 

 

Was this answer helpful? 17 Users Found This Useful (17 Votes)