Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2010-06-10 05:35:05

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_post_versions: Revision control for articles, forms and pages

I will look what can be done about the diff feature. I’ve already started doing it, just still needs the code that compares the changes. Hopefully I have the time to do it during next week (or this, or today who knows).

JanDW wrote:

Swell… thanks again. I guess I needed setid instead of id though. In case anybody else wants to use this:

Oh, yes. Sorry about that :-)

Last edited by Gocom (2010-06-10 05:40:29)

Offline

#32 2010-06-10 21:54:25

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: rah_post_versions: Revision control for articles, forms and pages

No problem – keeps me on my toes. :-)

I’ve noticed that each revision has an ID that increments based on the total number of revisions.
Since I’m using this txp as a wiki I’m having a lot of revisions. In just a few days I think I’m up to 150. I’m a little worried this number might get to be unwieldly soon or even max out?

Is that a reasonable fear? If so, couldn’t the revision id’s be per setid?

Last edited by JanDW (2010-06-10 21:54:49)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#33 2010-06-10 23:56:35

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_post_versions: Revision control for articles, forms and pages

JanDW wrote:

Is that a reasonable fear?

I don’t know, is it? :-) I can say that the maximum value of INT is 4294967295. If you fear that it’s going run out, you can change the field type to BIGINT which can store values up to 18446744073709551615. If you end up changing the type, remember to chage the zerofill (padding) value to greater (or remove it) from the current 12.

Anyways, let’s say that every revision takes 2 KB of space. With 4294967295 revisions, you would have 8 terabytes of data stored. That’s a lot :-)

Last edited by Gocom (2010-06-11 00:07:27)

Offline

#34 2010-06-11 00:34:15

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: rah_post_versions: Revision control for articles, forms and pages

Jukka,

Seriously mate – this is killer. Thank you!

:)


Tom

Offline

#35 2010-06-11 01:01:59

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_post_versions: Revision control for articles, forms and pages

Version 0.4 is out. It’s wild, and it likes to look revisions funny. I gave it markers. Results are colorful.


Red blocks for removed, greens for flower gardens.

Changelog:

  • Added diff tool. The feature is found from the list view’s multiedit: check two revisions and select “Diff” from the drop-down. The diff feature uses Paul Butler’s Simple Diff Algorithm.
  • Added Are you sure? checks to the multiedit.

More info and downloads

renobird wrote:

Seriously mate – this is killer. Thank you!

Thanks Tom :-)

Offline

#36 2010-06-11 06:26:40

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: rah_post_versions: Revision control for articles, forms and pages

In Diff tool when the first version of field didn’t contain anything it looks like i 2px line. Maybe it worth to add min-height to this blocks?

Last edited by the_ghost (2010-06-11 06:26:55)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#37 2010-06-11 15:43:16

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: rah_post_versions: Revision control for articles, forms and pages

Gocom wrote:

With 4294967295 revisions, you would have 8 terabytes of data stored.

I’ll get back to you then :)

Added diff tool.

Très cool!


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#38 2010-06-13 04:13:03

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_post_versions: Revision control for articles, forms and pages

the_ghost wrote:

In Diff tool when the first version of field didn’t contain anything it looks like i 2px line. Maybe it worth to add min-height to this blocks?

Good idea, but it’s not possible to make it as high as the line. Every browser handles line height differently and block elements do not scale according dpi/zoom setting set for fonts.

From my point of view, basically it now looks as good as it would look with min-height. The height would never be same as the line-height. It’s as usable and it reserves important space.

Only viable method is to add unbreakable space inside the blocks, or remove the blocks altogether if the older is empty.

Offline

#39 2010-06-13 17:59:06

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,190
Website

Re: rah_post_versions: Revision control for articles, forms and pages

OK, now this plugin officially spanks my butt and calls me Judy.

The only thing I could think of to make it better would be an accordion for contained revisions…

  • Item 1 (+)
  • Item 2 (-)
    • Revision 1
    • Revision 2
    • Revision 3
  • Item 3 (+)

+5 Finland. THANKS

Offline

#40 2010-06-15 16:17:17

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_post_versions: Revision control for articles, forms and pages

Minor version 0.5 released. Makes no difference to anything, just clean code a bit. Changelog:

  • Removed twice presented conditional.

More info and downloads

Offline

Board footer

Powered by FluxBB