Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2016-11-15 10:18:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,838
Website

Re: tom_image_grid : Grid UI for images tab

jakob wrote #302876:

I don’t think the prefs need to be on the image overview pane.

True. I could make a new panel to manage the thumb profiles. The major reason the prefs part of the profile manager isn’t on the core Prefs panel is because it uses AJAX/Javascript interaction between prefs and doesn’t require a Save step.

Would like to know why it worked in 4.5 and not in 4.6 though.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#22 2016-11-15 10:38:28

etc
Developer
Registered: 2010-11-11
Posts: 3,421
Website

Re: tom_image_grid : Grid UI for images tab

Bloke wrote #302879:

Would like to know why it worked in 4.5 and not in 4.6 though.

Me too. In 4.5 the last plugin using pluggable_ui trashed the others output. In 4.6 plugins should cohabit peacefully.

Offline

#23 2016-11-15 11:06:55

etc
Developer
Registered: 2010-11-11
Posts: 3,421
Website

Re: tom_image_grid : Grid UI for images tab

This should fix it, though the mystery of 4.5 persists: (edit: load order)

# Name: tom_image_grid v0.4 
# Type: Admin plugin
# An optionnal grid display for images tab
# Author: Thomas Jund
# URL: http://sacripant.fr
# Recommended load order: 7

# .....................................................................
# This is a plugin for Textpattern CMS - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# .....................................................................

YToxMTp7czo0OiJuYW1lIjtzOjE0OiJ0b21faW1hZ2VfZ3JpZCI7czo2OiJhdXRob3IiO3M6
MTE6IlRob21hcyBKdW5kIjtzOjEwOiJhdXRob3JfdXJpIjtzOjE5OiJodHRwOi8vc2Fjcmlw
YW50LmZyIjtzOjc6InZlcnNpb24iO3M6MzoiMC40IjtzOjExOiJkZXNjcmlwdGlvbiI7czo0
MDoiQW4gb3B0aW9ubmFsIGdyaWQgZGlzcGxheSBmb3IgaW1hZ2VzIHRhYiI7czo0OiJjb2Rl
IjtzOjY5NjA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nNE9VZ3pMamd4TVhv
Z1RUQXVPRFEwTERndU5UVTFkakl1T0RnMmFESXVPVFkzVmpndU5UVTFTREF1T0RRMGVpQk5N
VGt1TVRVMUxERXhMalEwTVZZNExqVTFOVWcyTGpFMk9YWXlMamc0TmtneE9TNHhOVFY2Q2dr
SklFMHhPUzR4TlRVc01UWXVPVGsyZGkweUxqZzRPVWcyTGpFMk9YWXlMamc0T1VneE9TNHhO
VFY2SUUwd0xqZzBOQ3d6ZGpJdU9EZzVhREl1T1RZM1ZqTklNQzQ0TkRSNklFMHhPUzR4TlRV
c05TNDRPRGxXTTBnMkxqRTJPWFl5TGpnNE9VZ3hPUzR4TlRWNklpOCtDand2Wno0S1BDOXpk
bWMrQ2c9PSIgLz48YnIgLz4KaW4gdGhlIEltYWdlIFRhYiBvZiB5b3VyIGJhY2stb2ZmaWNl
IGFsbG93aW5nIHlvdSB0byBzd2l0Y2ggZnJvbSB0aGUgc3RhbmRhcmQgZGlzcGxheSB0byBh
IG1vcmUgY29tcGFjdCBncmlkIGRpc3BsYXkuPC9wPiI7czozOiJtZDUiO3M6MzI6ImIyZGRm
NDBmYzliZDc3OGM3NzZiZDU2MDhhNGM5NzQ1Ijt9

Last edited by etc (2016-11-15 11:21:13)

Offline

#24 2016-11-15 12:08:15

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 745
Website

Re: tom_image_grid : Grid UI for images tab

That’s really quick Oleg > screenshot … thanks … :)

PS
This might be nitpicking but the UI of smd_thumbnail in Txp 4.6.x could have some beautifying. Sorry Stef, I can’t help it … ;-)

Offline

#25 2016-11-15 12:12:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,838
Website

Re: tom_image_grid : Grid UI for images tab

RedFox wrote #302887:

the UI of smd_thumbnail in Txp 4.6.x could have some beautifying.

Drop me an issue and explain (or better still, provide a mockup for) a better system and I’ll see what I can do.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2016-11-15 14:33:33

etc
Developer
Registered: 2010-11-11
Posts: 3,421
Website

Re: tom_image_grid : Grid UI for images tab

etc wrote #302881:

In 4.5 the last plugin using pluggable_ui trashed the others output.

No, I was wrong: in 4.5 plugins sharing the same pluggable_ui and wishing to extend the default ui caused multiple default ui output. But this was not a problem when the default is empty (like here). Should we restore this behavior?

Offline

#27 2016-11-15 14:47:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,838
Website

Re: tom_image_grid : Grid UI for images tab

etc wrote #302893:

in 4.5 plugins sharing the same pluggable_ui and wishing to extend the default ui caused multiple default ui output. But this was not a problem when the default is empty (like here). Should we restore this behavior?

Is it possible to have the best of both worlds? Plugins automatically co-exist without duplication of previous UI output (plugin load order can determine which appears ‘first’ if two share the same pluggable_ui() hook) and also work even if the default is empty. Not sure what’s involved here.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#28 2016-11-15 15:14:45

etc
Developer
Registered: 2010-11-11
Posts: 3,421
Website

Re: tom_image_grid : Grid UI for images tab

Say, you have two plugins appending something to Custom fields pane on Write tab:

register_callback( 'abc_append', 'article_ui', 'custom_fields');
function abc_append($event, $step, $default)
{
    return $default . 'Append me!';
}

and

register_callback( 'def_append', 'article_ui', 'custom_fields');
function def_append($event, $step, $default)
{
    return $default . 'Append me!';
}

Separately, each one will output

...custom fields pane...
Append me!

But if they are both enabled, in 4.5 you’ll get (whatever order) the wrong

...custom fields pane...
Append me!
...custom fields pane...
Append me!

In 4.6 they correctly produce

...custom fields pane...
Append me!
Append me!

This happens because 4.5 chains plugins output, while 4.6 resets $default to the previous plugin output when passing it to the next one and outputs the last plugin result. The problem is that if both ignore $default, echoing just “Append me!”, in 4.5 this gives

Append me!
Append me!

but in 4.6 only the last

Append me!

Since pluggable_ui() does not know what plugins do with $default, it can not choose the best solution in general. But if $default is empty, we can reasonably presume that 4.5 output is more natural.

Last edited by etc (2016-11-15 15:46:14)

Offline

#29 2016-11-15 15:37:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,838
Website

Re: tom_image_grid : Grid UI for images tab

@etc: sounds reasonable to me.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#30 2017-09-08 12:39:18

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 745
Website

Re: tom_image_grid : Grid UI for images tab

smd_thumbnail 0.4.0 doesn’t play nice at all with tom_image_grid (0.4) on Txp 4.6.2 … or visa versa … :(

Offline

Board footer

Powered by FluxBB