View Single Post
  #5  
Old 22nd May 2016, 12:38
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Default
Hello smoky28 & others, i need your help editing globalfunctions.php , thread http://www.bvlist.com/showthread.php?t=6888
i donīt know how to modify the php exactly- can you please help me out with that?
you wrote:
PHP Code:
add include/globalfuntcions.php

require_once INC_PATH '/ctracker0.php';
    require_once 
INC_PATH '/inject_security.php';
    require_once 
INC_PATH '/ctracker.php';
    require_once 
INC_PATH '/feedcreator.class.php';
    require_once 
INC_PATH '/class.inputfilter_clean.php'
then you wrote:
max 4 characters in all parts of the page
add 354 line
PHP Code:
function prevent_long_strings($post$limit 4) {
    
$word_array explode(" "$post);
    
$opti_string "";
    foreach (
$word_array as $val) {
        if (
preg_match("/(.)\\1{".$limit.",}/"$val)) {
            
$char_array preg_split("//"$val);
            
$check 0;
            for (
$i 0$i count($char_array); $i++) {
                if (
$char_array[$i] == $char_array[$i-1]) {
                    if (
$check $limit 1) {
                        
$new_word[] = $char_array[$i];
                    }
                    
$check++;
                } else {
                    
$new_word[] = $char_array[$i];
                    
$check 0;
                }
            }
            
$opti_string .= implode(""$new_word)." ";
            unset(
$new_word);
        } else {
            
$opti_string .= $val." ";
        }
    }
    return 
$opti_string;
  } 
and after that
this is the place to do it after you globalfuntcions.php 395
PHP Code:
$s prevent_long_strings($s,4); 
i donīt understand that, sorry, i need your assist.



editing global.php all is clear.

greetz eckeO5

Last edited by eckeO5; 22nd May 2016 at 14:25.
Reply With Quote