2011-12-21, 04:53 PM
Hi,
I've added this code to function_post.php:
It replaces [payment=$pay] [/pay] with $text in post message.
It works perfectly! But when I edit the post via quickedit, after edit it doesn't replace [payment=$pay] [/pay] with $text!
For example if the post code is : [payment=xxx] KKK [/payment] , it will be displayed as it code and I have to Refresh The Page to see it as $text!
How can I solve this problem?
I've added this code to function_post.php:
$tag = "payment";
$text_1=$post['message'];
$text_2=explode('['.$tag.'=',$text_1);
$text_3=explode("$pay]",$text_2[1]);
$text_4=explode('[/',$text_3[1]);
$text=$text_4[0];
$post =preg_replace('#\[('.$tag.')(=)((?:[a-zA-Z0-9_.\/]*))\](.*?)\[/'.$tag.'\]#s',$text, $post);
It replaces [payment=$pay] [/pay] with $text in post message.
It works perfectly! But when I edit the post via quickedit, after edit it doesn't replace [payment=$pay] [/pay] with $text!
For example if the post code is : [payment=xxx] KKK [/payment] , it will be displayed as it code and I have to Refresh The Page to see it as $text!
How can I solve this problem?