We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Control Panel Extension Hook help

Development and Programming

Andrew Gunstone's avatar
Andrew Gunstone
102 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi all,

I am building a simple little extension that currently uses the “entry_submission_redirect” hook. This works beautifully… except I would like to add in a “$.ee_notice” once the re-direct has happened.

My “entry_submission_redirect” function currently looks like this… nice and simple…

function entry_submission_redirect($entry_id, $meta, $data, $cp_call)
    {

        $this->EE->javascript->output('
            $.ee_notice("Test notice", {"type" : "success"});
        ');
        
        return BASE."&D=cp&C=content_publish&M=entry_form&channel;_id=".$meta['channel_id']."&entry;_id=".$entry_id;

    
    }

I am figuring that I have gotten the placement of the $.ee_notice wrong… but where do i put it? Is there another hook that I need to call?

Any help is appreciated.

Cheer.

[Mod Edit: Moved to the Extensions: Discussion and Questions forum]

       
Greg Salt's avatar
Greg Salt
3,988 posts
16 years ago
Greg Salt's avatar Greg Salt

Hi agun,

Let me move this into the Extensions development forum for you.

Cheers

Greg

       
Andrew Gunstone's avatar
Andrew Gunstone
102 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Thanks Greg. As it turns out, I fixed it last night anyway. I needed to use…

$this->EE->session->set_flashdata('message_success', "Test notice");

Cheers.

😊

       
Greg Salt's avatar
Greg Salt
3,988 posts
16 years ago
Greg Salt's avatar Greg Salt

Hi agun,

Cool. Glad that you got it sorted.

Cheers

Greg

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.