Search and replacing issue - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Development (https://community.mybb.com/forum-68.html) +---- Thread: Search and replacing issue (/thread-187332.html) |
Search and replacing issue - ShadowMage - 2015-12-22 Making a plugin for a site and when I try to do the search and replace for activate/deactivate it completely screws over and doesn't work as it should. The code is:
Outcome: http://i.imgur.com/mFJoaeo.png and on de-activate: http://i.imgur.com/TdIzX4X.png RE: Search and replacing issue - .m. - 2015-12-22 can you try making the replacement content short .. you can start with {$lang->ucp_nav_view_profile} and can you put your content in a variable and use it for the replacing
see once again Modifying Templates to Add a Variable see also preg_replace , plugins & hooks , advanced plugin development RE: Search and replacing issue - ShadowMage - 2015-12-22 Thanks! I've gotten it to add the text correctly, but removing it is the issue now. It'll process and uninstall but won't remove the $gradient stuff.
The templates are different because I figured the purpose of the plugin would be better suited for under the options area. |