PHP Classes

File: upload/plugins/bulletinboard_bbcode_random/prepare_data.php

Recommend this page to a friend!
  Classes of James Brows   PHP Bulletin Board   upload/plugins/bulletinboard_bbcode_random/prepare_data.php   Download  
File: upload/plugins/bulletinboard_bbcode_random/prepare_data.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: 495 bytes
 

Contents

Class file image Download
<?php

function bb_bbcode_random_prepare_content($content)
{

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

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

       
$splitLines=[];

        for (
$i=0; $i < $total; $i++) {
           
$splitLines=explode('::break::',$parseData[$i]['value']);

           
shuffle($splitLines);

           
$content=str_replace($parseData[$i]['source'],$splitLines[0],$content);
        }
       
    }


    return
$content;
}