Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Check your plugins against svn

#1 2006-07-23 05:38:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Check your plugins against svn

If you’ve written a plugin that hooks into the admin interface via the DOM, it’d be a very good idea for you to check your plugins against svn now, or be prepared to check against the next release when it arrives.

There have been some changes to the admin’s DOM layout, which will actually make things easier, but can break plugins which had to use long workarounds to achieve the same thing.

(My own plugins are affected, and updates will be released when the next Txp version is released.)

Offline

#2 2006-07-23 06:23:17

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Check your plugins against svn

Also, there’s a new PHP dom_attach() function in txplib_html.php that makes it easier for plugins to insert HTML into the admin-side DOM. Minimal example:

register_callback('abc_myfunc', 'article', '');
function abc_myfunc($event, $step) {
	echo dom_attach('article-col-1', 'Hello world');
}

Alex

Offline

#3 2006-08-04 23:59:59

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Check your plugins against svn

Plugin devs: view the source of zem_article_info 0.2 for an example of how to update an admin DOM plugin so that it works with 4.0.4 while still retaining compatibility with previous Textpattern versions.


Alex

Offline

#4 2006-08-08 13:22:12

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Check your plugins against svn

We are getting closer to a 4.0.4 release, therefore I would once again encourage users and plugin auhtors to give us a hand in making sure that updates will be smooth.

You’ll find more information and a download in the floowing topic:

Help.Textpattern 4.0-20060808.zip, backwards- and plugin-compatibility

Offline

#5 2006-08-18 20:41:11

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Check your plugins against svn

And plugin authors, remember that you can test against the Textpattern version stored in the db. For instance,

Not officially condoned or supported.

switch ($prefs['version'])
{
	case '4.0.2':
		// do stuff
		break;
	case '4.0.3':
		// do stuff
		break;
	case '4.0.4':
		// do stuff
		break;
	default:
		// do stuff
		break;
}

.

Last edited by Andrew (2006-08-19 15:06:30)

Offline

#6 2006-08-18 21:03:54

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Check your plugins against svn

That is used internally for the diagnostics and to know when to run the update scripts.

Offline

#7 2006-08-18 21:31:29

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Check your plugins against svn

So is that a “yes, you can do that” or a “no, don’t do that” ? ;-)

Offline

#8 2006-08-18 22:37:14

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Check your plugins against svn

Sometimes that which is not said, matters. (note that I am evading your question the second time around).

I don’t know of any plugins that would need to branch code to work with different maintenance releases of textpattern. And I don’t think pugin-authors should go out of their way to try to make their plugins work with old versions, given that there is incentives for everybody involved to use the latest maintenance release of textpattern (be it security, bugs, support etc.). People sticking with out of date (i.e., buggy and vulnerable) versions of software is what has given many other applications a bad name in the past. I think encouraging that behaviour can do more harm than good in the long term. When running software on publicly available servers, maintenance of that software is just part of being a good netizen. [And now you know, why I evaded answering the first time ;) ]

Having said that, I don’t think above mentioned variable is going away anytime soon, so if people feel they need to use that variable for whatever purpose, they can probably do so relatively safely.

Last edited by Sencer (2006-08-18 22:37:44)

Offline

#9 2006-08-19 00:13:57

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Check your plugins against svn

Let them eat cake upgrade. :D

Offline

#10 2006-08-19 15:00:18

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: Check your plugins against svn

Sounds reasonable!

Offline

  1. Index
  2. » Archives
  3. » Check your plugins against svn

Board footer

Powered by FluxBB