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
PHP Code:
$this->post['message']
but it only replace message,
i want auto replace pagetext from database
This is my plugin
PHP Code:
$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
PHP Code:
$this->post['pagetext']
use good, but
empty first post when move threads
This is my plugin
PHP Code:
$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
PHP Code:
$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
PHP Code:
$this->post['pagetext']
and
PHP Code:
$this->post['message']
use good but
error when read private message
PHP Code:
$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
PHP Code:
$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 [DATE]1391756672[/DATE] at [TIME]1391756672[/TIME] ---------------
Please help me