Knowledgebase



 Categories





 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

Content functions



  • recursive($dynamic_cat_id,$module,$rate)

This function is important and should be added at the end of every process whether adding, editing or deleting content as it updates the sections counters with the number of contents after each process.

Parameters:

      -  
$dynamic_cat_id (mandatory): the section ID.
      -  $module (mandatory): the name of the table which has this content.
      -  $rate (mandatory): the add/subtract rate from the section counter.

Example:

PHP :
{* php buffer start *} recursive($dimofinf->GPC['album_id'],'albumsm','-1');
recursive($dimofinf->GPC['album_id'],'albumsm','+1'); 
{* php buffer end *}

  • pingbacks($args, $debug = false, $getresponse = false)

This function can be added at the end of each adding or editing process for any content to execute the ping process for it.

Parameters:

      -  
$args (mandatory): a matrix which carries the following values in order:

              - The content text within which it will search for URLs to start the ping pack.

              - The module name without the letter 's' or the constant 'THIS_PRODUCT' which
                 was explained further in the 'Creating a module' explanation.

              - The content ID in the database.

      -  $debug (optional): the value 'boolean true/false' is used to activate following mistakes.
      -  $getresponse (optional): the value 'boolean true/false' is used to activate returning the message
             from the other website after the ping pack process is done.

Example:

PHP :
{* php buffer start *} ingbacks(array
(
$dimofinf->GPC['description'],
THIS_PRODUCT,
$dimofinf->GPC['id']
)); 
{* php buffer end *}

  • tags($in_title = false, $module, $module_id, $fetch_to_assign = false)

This function can be added to every adding, editing or deleting content process to execute the ping process in a way that extracts and stores the tags for the content.

Parameters:

      -  
$in_title (optional): the content title to extract the tags from automatically
             in addition to the manually added tags by the user. 
      -  $module (optional): the module name without the letter 's' or the constant 'THIS_PRODUCT'
             which was explained further in the 'Creating a module' explanation.  
      -  $module_id (optional): the content ID in the database.  
      -  $fetch_to_assign (optional): the value 'boolean true/false' is set to 'true' only in case the
             content is deleted so that the content tags would be deleted.

Example:

Adding/editing content

PHP :
{* php buffer start *} tags($dimofinf->GPC['caption'], THIS_PRODUCT, $dimofinf->GPC['id']); 
{* php buffer end *}

Deleting content

PHP :
{* php buffer start *} tags(falseTHIS_PRODUCT$dimofinf->GPC['id'], true); 
{* php buffer end *}

  • editingstatus($module, $module_id)

This function can be added at the end of each page of editing and process execution of content editing so that it would execute the process of who is editing the content now as it stores the name of the user editing the content in a record in the database and deletes the user name after the editing process is done. This is done to inform users editing the same content at the same time that someone else is editing the content and shows their user names.

Parameters:

      -  
$module (optional): the module name without the letter 's' or the constant 'THIS_PRODUCT'
             which was explained further in the 'Creating a module' explanation.
      -  $module_id (optional): the content ID in the database.

Example:

PHP :
{* php buffer start *} editingstatus(THIS_PRODUCT$dimofinf->GPC['id']); 
{* php buffer end *}

  • update_views_counter()

This function can be used at the end of every page, whether of contents or comments, to update the number of views for the content.

Example:

PHP :
{* php buffer start *} update_views_counter(); 
{* php buffer end *}


Was this answer helpful?

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

Also Read

Email functions (Views: 516)

[php]DIM_mail($remail, $rname, $message, $subject, $semail ="", $sname ="", $priority = 3, $mass...


General functions (Views: 575)

Dimofinf appreciates your time and so, we offer you a selection of ready functions and constants...


Files functions (Views: 584)

file_extension($filename)This function is used to return the file extension.Parameters: ...


Editor functions (Views: 510)

Dim_editor($area, $text ="", $rows = 26, $showresize = false, $dimcp = false, $editor_id = 0,...


Numbers and dates functions (Views: 489)

DIM_date($format, $timestamp = TIMENOW, $doyestoday = false, $datemethod ="", $adjust = true,...



Online