2 require_once(INCLUDE_DIR.'base36.inc');
4 if (!function_exists('str_split')){
5 function str_split($string, $split_length=1){
7 if ($split_length < 1){
11 for ($pos=0, $chunks = array(); $pos < strlen($string); $pos+=$split_length){
12 $chunks[] = substr($string, $pos, $split_length);
18 function processContent_hack($node_content) {
20 include_once(INCLUDE_DIR.'htmlparse.inc');
22 if ($node['template_id']==$node['node_id'] && $_POST['event']=='configure_content') {
26 elseif ($_POST['no_html']) {
27 $node_content=htmlspecialchars($node_content);
30 elseif ($_POST['wiki']) {
31 // load the class file
32 require_once 'Text/Wiki.php';
34 // instantiate a Text_Wiki object with the default rule set
35 $wiki = new Text_Wiki();
37 $node_content = $wiki->transform($node_content, 'Xhtml');
40 elseif ($_POST['code']) {}
43 global $db,$htmlparse,$error;
45 if (!htmlparser::htmlparse($node_content)) {
50 $node_content = eregi_Replace("((( )|(\n)|(^))+)(http://|ftp://|https://)([[:alnum:]][^,[:space:]]*)","\\2<a target='_blank' href=\"\\6\\7\">\\6\\7</a>",$node_content);
51 //$node_content = mysql_real_escape_string($node_content); once is enough
58 require_once(BACKEND_DIR.'/'.DB_TYPE.'/backend.inc');