Dimofinf Mobile

Subscribe now to Dimofinf Mobile and enjoy a wide range of premium services. You will receive our SMS text messages wherever you are for a very low cost! More

 Currency Converter

  • Currency
  • US$ Amount

Block system tags within the block files & Variables, constants and general variables

Block system tags within the block files:

The blocks system has several tags that are placed in the blocks files '.htm' so that they can be processed by the blocks system and replaced with their values. These tags are similar to HTML tags that's why you need to be extra careful when you're altering the blocks files in order not to delete a block system tag by mistake which can result in faulty display.

Variables, constants and general variables:

Variables, constants and general variables which are predefined in the template in the following form:


Where the value can be set using 'Assign' from the PHP file variables or using the general predefined variables or using constants.

{$dimphrase.dim_message} {lang_left} {script_url}

    - Modifiers:

These are functions which are added after the variable inside the block to modify the variable value before displaying it. Modifiers functions are found in the 'include/modifiers' folder or some PHP functions.


{mname|strtolower} {mname|strtolower|strtolower}

Calling the 'strtolower' transfers the 'mname' variable value letters to small letters, noting that modifiers can be called more than once at a time for the variable.  

    - Loop tag:

The loop block is identified for part of the block within the block in the following form:

{* php buffer start *} [START BLOCK blockname]> <[END BLOCK blockname
{* php buffer end *}

Where 'blockname' is the loop block name assigned in the PHP, noting that part of the HTML code for this block doesn't appear without identifying the block through the PHP using the function 'newBlock()'.


    - Insert block tag:

Inserting another block file within the block is done as follows:

[INCLUDE BLOCK : blockname]

Where 'blockname' is the name of the block file to be inserted noting that the block name of the block you wish to call is inserted without adding the extension '.htm'.

Please note:

When you are calling a block from the block folder of the main style, just add the block name directly but when you want to call a block file from another path other than the block folder of the main style, just add the block path. For example, when calling a block from one of the folders in a plugin:

[INCLUDE BLOCK : include/plugins/pluginfolder/tpl/blockname]

Note 2:

On inserting a block, the block system launches a search first for the block within the matrix.



Through which replaced blocks are stored instead of the main blocks to one of the other blocks from one of the plugins and when you want to call a block:

[INCLUDE BLOCK : blockname]

A search is launched within the matrix for the stored value with the called block marker/significance 'blockname':


If found, the stored value is the name of the plugin where the replacing block is found within the 'tpl' folder in the plugin in order to call it instead of the current called block.

    - Insert PHP files tag within the block:

Calling a PHP file within the block is done as follows:


Where 'iblockname' is the PHP file name you wish to insert noting that the file name of the file you wish to call is entered without adding the extension '.php'.

Please note:

When calling a file from the main Dimofinf folder, just add the file name directly. If you want to call a block file within another path different from Dimofinf main path, just add the file path. For example, when calling a file from the 'include' folder:

[ INCLUDESCRIPT BLOCK : include/iblockname]

    - Conditional IF/ELSEIF/ELSE tag:

To write conditional sentences within the block, write them as follows:

<IF "condition">>
      // code>
<ELSEIF "condition">>
      // code>
      // code>


<IF "is_value('{relatedsearches}')">>
<br /

    - PHP code tag:

To execute a PHP code within the block, use the following form:

        // code>


      global $relatedsearches_block;>
      foreach($relatedsearches_block AS $key => $value){>
      echo '>
<li><a href="'. $key .'" rel="follow">'. $value .'</a></li>
            <[END PHP CODE]>>

    - Function calling tag:

To use one of the predefined functions in the blocks system, use:

{function:function_name args}


  • 'function_name' is the name of the predefined function in the system, as the predefined block functions files are placed in the 'include/functions' folder.
  • 'args' is the parameters which are sent to the function.


{function:getpermalink file="contents" args="action=l&id={cat_id}" caption="{cat_name}"}

    - Template zone tag:

This tag is added to the parts you would like to use in your programming to call them from the PHP file to show one or more certain things you wish to display. The template zone gives you and other programmers the chance to use a certain part in the block to display other parts whether by you or by other programmers using the plugin system.


[INCLUDEZONE BLOCK : MenucontentItemsAfter]

    - Ignore code tag:

To ignore part of the block from processing using the blocks system, and the point here isn't hiding the code but what is meant here is not processing the blocks system tags inside it.


    - Commenting within the block:

You can write your programming comments within the block using:


As the processing system hides these comments when the processing is done and they don't appear but they only appear in the block source file.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Blocks system (Views: 514)

Dimofinf offers you an exclusive state of the art blocks system through which you can separate...

Modifiers functions (Views: 530)

As it has been explained before in the variables tag, modifiers are functions that modify the...

$tpl object functions within the PHP file (Views: 410)

    - mk_template($var) This function is called to create a $tpl object as special $tpl...

Helping functions which can be used in the blocks (Views: 563)

      {function:alternate name="blockname" values="alt1,alt2"} This function is used to...

Helping function used for blocks (Views: 513)

This is a set of helping functions which can be used in your programming for some ready parts...