• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[SIGPIC] Removal?

Alfa1

Well-known member
#4
The above query works well for [SIGPIC][/SIGPIC]
However, I would also like to replace / remove all sigpic code with anything inbetween. i.e.
[SIGPIC]whatever[/SIGPIC]
How do I do this? Can I simply throw a * in the query? i.e.:
Code:
UPDATE xf_user_profile
SET signature = REPLACE(signature, '[SIGPIC]*[/SIGPIC]', '');
 

Mike

XenForo developer
Staff member
#5
I don't believe MySQL supports regex replacement out of the box, so you'd likely need a supporting PHP script.
 

Nirjonadda

Active member
#6
Run this query on your XenForo database to remove the sigpic code:

Code:
UPDATE xf_user_profile
SET signature = REPLACE(signature, '[SIGPIC][/SIGPIC]', '');
For codes inside of posts (not signatures) you can use Kier's addon to make appropriate replacements (requires regex ability):

http://xenforo.com/community/threads/post-content-find-replace.6548/
Code:
 11 rows affected. (Query took 0.0632 seconds.)
UPDATE xf_user_profile SET signature = REPLACE(signature, '[SIGPIC][/SIGPIC]', '')
Still are showing [SIGPIC][/SIGPIC] , Please let me know this fix?