HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Callback Issues in plugin. Your expertise Needed.
peregrine
MVP
preg_replace_callback($search, "Myfunction", $text); I can make a callback if my Myfunction resides outside of the class TestPlugin extends Gdn_Plugin { ...} function Myfunction($variable) { I can't find a solution. Anybody know one.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
0
Answers
preg_replace_callback($search, array($this, 'Myfunction'), $text);
Vanilla Forums COO [GitHub, Twitter, About.me]
More info here: http://php.net/manual/en/language.types.callable.php
Vanilla Forums COO [GitHub, Twitter, About.me]
thx much Tim. I'll give it a try.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@Tim - your suggestion worked perfectly.
Now you can add the autolink plugin to the vanilla forum site itself .
Don't know how it would affect performance if there are alot of tags or if if it would be too cluttered. But it would save time adding links to wiki and bonk, etc and provide clickable tags throughout the comments.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.