PHP Classes

File: upload/plugins/bulletinboard_bbcode_random/prepare_data_number.php

Recommend this page to a friend!
  Classes of James Brows   PHP Bulletin Board   upload/plugins/bulletinboard_bbcode_random/prepare_data_number.php   Download  
File: upload/plugins/bulletinboard_bbcode_random/prepare_data_number.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Bulletin Board
Manage and post messages in multi-user forums
Author: By
Last change:
Date: 2 years ago
Size: 713 bytes
 

Contents

Class file image Download
<?php

function bb_bbcode_random_number_prepare_content($content)
{

   
$parseData=parse_shortcode_data('random_number',$content);

    if(
count($parseData) > 0)
    {
       
$total=count($parseData);

       

        for (
$i=0; $i < $total; $i++) {

            if(
strlen($parseData[$i]['value']) > 0 && is_numeric($parseData[$i]['value']))
            {
               
$parseData[$i]['value']=(int)$parseData[$i]['value'];
            }
            else
            {
               
$parseData[$i]['value']=1;
            }
           
           
$content=str_replace($parseData[$i]['source'],randNumber($parseData[$i]['value']),$content);
           
        }
       
    }


    return
$content;
}