Disable Block Edit Mode?


What I'd like to do is this: When the admin puts a page in edit
mode, and clicks on a block, and then clicks edit, to edit that
block, I would like to do my own thing entirely. How do I disable
the block edit mode dialog from popping up and yet initiate
doing my own thing, popping up my own edit interface, in response
to this event?

Alternately, I would like to be able to configure the buttons
in the edit block popup as I choose. For example, I'd at least
like to remove the update button before the popup is rendered,
because I'd like to do something else entirely with that popup,
like simply presenting a list of things to edit which that block

So I'd like to know how to do both of these things, and choose which direction to take according to my own lights. Can anyone
throw light on this?


View Replies:
jordanlev replied on at Permalink Reply
What exactly is it you want to do? Couldn't you just create your own block for it?
I'm not sure how you could change the behaviour of all types of blocks because each one has an entirely different editing interface.
jb1 replied on at Permalink Reply
Hi Mark, the easiest thing would be to edit the UI form for each block as they are all self contained. This is usually the Add.php and edit.php files. Here's a page that explains the file structure for blocks:
horan replied on at Permalink Reply

Yes, that is the easiest thing to do, just edit edit.php, but that still leaves me with a popup that has both cancel and update buttons.
There are occasions where the first edit interface I want the
user to see is just a list of things to edit. I can manage all
that, but I've spent many hours trying to find out how to get
complete control of that edit popup and its contents, including
the buttons. I've figured out how to remove it as soon as it
appears and popup my own dialog box, but that's ugly. I've hacked
on the core ccm.ui.js file so that when the user clicks to edit
my block, my own href=javascript:function is invoked instead of
the default behavior, which is to present the edit popup, but that's
ugly and dangerous, because I've hacked on the core system. So I was
wondering if there's a way to get complete control of that edit
popup, from within my block directory, both invocation and presentation. My favorite solution would be to get control of the edit link in the little popup that presents the block options to edit, delete, etc., but have that control within my block's directory, which I've done with a core hack. My second favorite solution would be to be able to cleanly swap out, rename, assign new functionality to the buttons in the existing edit popup, and be able to control these behaviors and presentations from within the block's directory.

Thanks for your response.

I've written a wrapper around the concrete5 dialog box that has
semantics I feel more comfortable with and enjoy using more. If I could get control of that moment when the user clicks 'edit this block' in that little popup, I can figure out how to handle everything I want to do from there. but I don't want hack on the core system.