MyBB Community Forums

Full Version: Patches 1.5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Yes, however the next version of Google SEO will do that by itself as well. Wink

The edit functionality is provided by PluginLibrary, the Patches plugin is only a user friendly front-end.

Added a patch preview feature. It also highlights the matched search patterns, so it should help you understand how the patterns work.
This is pretty snazzy! Great job; looks like with some small improvements it will allow more robust plugins.
Very useful tools. Thank you very much, Frostschutz Smile
(2011-01-31, 09:04 AM)frostschutz Wrote: [ -> ]They're stored in the DB (it's not using the GNU diff/patch approach). A preview and export/import feature is on the todo list for the next version, so sharing patches will be possible before long. Until then you can already share them by posting them as code tags...
Looking forward to import/Export tool, will save me time trying to explain edits to clients.lol

I had a possible feature request

would it be possible to have an option to generate a plugin file using selected edits

example

tick boxes next to edits/patches which could be selected

then exported as a standalone plugin file? (not requiring patches/pluginlibrary to be installed on the importing/client site, but rather only the exporting/master site requiring patches/pluginlibrary?) or would that not be pratical?

The import/export tool will come with the next version.

Generating files from scratch is not practical with this plugin, since all it really does is find (preferably) unique patterns in existing files, and an empty file does not offer any of those.

Also it is not possible to have a patch insert some code, and then have another patch modify the code inserted by the previous patch. This is because the plugin first searches for all the patterns in the unmodified file, then applies all the edits in one go. Thus the edits can not conflict or overlap with each other (at least not easily / obviously so, naturally there can always be conflicts depending on what the code looks like).
ah thank you for the explaination.

(2011-02-10, 09:44 AM)frostschutz Wrote: [ -> ]The import/export tool will come with the next version.

And here it is: Patches 1.2 with rudimentary import/export support.

Also needs an updated PluginLibrary (version 3).
Thanks for the update, Frostschutz Smile
Can you add support for the option to allow multiple matches? The fix to bug 1537 requires the same edit in two locations with the same search pattern. In this case when trying to create a patch, I get "multiple matches not allowed for this edit" error message and the patch will not apply.

To get around it i would need to have a huge bit of code in the search box to get unique matches, and that is not realistic.
I guess I'll just have to do that for the next version. I was trying to avoid it to keep things simple, but there are several places in MyBB where huge chunks of code were simply copied, instead of reused as a function or similar.

As long as you have to apply the same edit, multiple matches would solve the issue - problems start when you need to do different edits. That's where the simple approach of Patches/PluginLibrary fails and where you need a full blown GNU diff/patch solution. Unless you can find a good anchor for the pattern.

For now, the attached file should work.
Pages: 1 2 3 4 5 6 7 8