Thangvip9x
02-07-2014, 02:15 AM
Please help me
I have a example
If i post character "a, b, c, d" will auto replace to character "e, f, g, h"
I use hook postbit_display_complete use str_replace and $this->post['message'] but it only replace message, i want auto replace pagetext from database
This is my plugin
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['message'] = str_replace($post1, $post2, $this->post['message']);
I used hook postdata_presave with $this->post['pagetext'] use good, but empty first post when move threads
This is my plugin
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
I use hook postbit_display_complete and use $post['pagetext'] use good but error MySQL when read private message
Please help me write plugin auto replace pagetext from database when post
Thank you very much
This is my plugin i write with hook postbit_display_complete with $this->post['pagetext'] and $this->post['message'] use good but error when read private message
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['message'] = str_replace($post1, $post2, $this->post['message']);
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
$db->query_write("
UPDATE ".TABLE_PREFIX."post
SET pagetext = '".$db->escape_string($this->post['pagetext'])."'
WHERE postid = ".$post['postid']."
");
If i remove this content in my plugin
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
$db->query_write("
UPDATE ".TABLE_PREFIX."post
SET pagetext = '".$db->escape_string($this->post['pagetext'])."'
WHERE postid = ".$post['postid']."
");
Use good but don't replace character from database, i want auto replace pagetext from database
Thank you very much
--------------- Added 1391756672 at 1391756672 ---------------
Please help me
I have a example
If i post character "a, b, c, d" will auto replace to character "e, f, g, h"
I use hook postbit_display_complete use str_replace and $this->post['message'] but it only replace message, i want auto replace pagetext from database
This is my plugin
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['message'] = str_replace($post1, $post2, $this->post['message']);
I used hook postdata_presave with $this->post['pagetext'] use good, but empty first post when move threads
This is my plugin
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
I use hook postbit_display_complete and use $post['pagetext'] use good but error MySQL when read private message
Please help me write plugin auto replace pagetext from database when post
Thank you very much
This is my plugin i write with hook postbit_display_complete with $this->post['pagetext'] and $this->post['message'] use good but error when read private message
$post1=array(
'a','b','c' ,'d'
);
$post2=array(
'e','f','g' ,'h'
);
$this->post['message'] = str_replace($post1, $post2, $this->post['message']);
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
$db->query_write("
UPDATE ".TABLE_PREFIX."post
SET pagetext = '".$db->escape_string($this->post['pagetext'])."'
WHERE postid = ".$post['postid']."
");
If i remove this content in my plugin
$this->post['pagetext'] = str_replace($post1, $post2, $this->post['pagetext']);
$db->query_write("
UPDATE ".TABLE_PREFIX."post
SET pagetext = '".$db->escape_string($this->post['pagetext'])."'
WHERE postid = ".$post['postid']."
");
Use good but don't replace character from database, i want auto replace pagetext from database
Thank you very much
--------------- Added 1391756672 at 1391756672 ---------------
Please help me