Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-09-01 09:22:03

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Comparing 'versions' of plugins

This should really be called “saving me from my own stupidity”…

Over time, I have made some slight modifications to a few plugins – nothing heavy duty, but mainly to add in class and id elements into the HTML output so that I can access it with CSS and JS.

Of course, when a new version of the plugin is released I have no idea what I have changed so that I can incorporate my changes in the new version.

What I would like is some idea of the best practice for comparing ‘versions’ of plugins.

And finally, what is the best practice when you do feel the need to change a plugin? Yes, documenting the changes within the code is easy, but what else should I do? eg. change the plugin name?

Thanks.

Offline

#2 2011-09-01 10:04:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: Comparing 'versions' of plugins

Maybe rvm_plugin_diff can help you.

Otherwise putting clear comments into a plugin helps in tracking them down and why. I often mark mods by inserting // MOD (person) and // MOD END and if relevant, I will copy the original line and comment it out for reference, or describe what is different.

If you make more complex changes a diff tool is useful.

I’d also be interested to hear what other people do.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2011-09-01 11:50:01

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: Comparing 'versions' of plugins

Thanks for that.

rvm_plugin_diff is amazing and quickly shows me what I have done (not sure about the formatting of the ‘unified diff format’ but at least the information is there).

Your suggestions for commenting are good too.

Offline

#4 2011-09-01 12:48:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Comparing 'versions' of plugins

The unified diff is useful if you are a plugin developer and have access to the original PHP file used to create the plugin or if you want to submit a patch to the plugin developer. I wrote it mostly for the same purpose you’re using it for now, to find what I changed in the plugins I installed.

Offline

Board footer

Powered by FluxBB