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

Adding an extra tab to the publish page.

Development and Programming

Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey all,

Is there anyway to add an extra tab to the publish page?

I basically want to create some kind of meta module that users can associate keywords and descriptions to any weblog post without adding custom fields all the time.

I see the Pages module has extended the publish page.

Is this possible to do with a normal module extension?

Is there any documentation on how this could work?

Cheers

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Tag 2.0 does add a tab so this is possible, for sure. I’m not sure if you have the beta to be able to examine how it’s done, though.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Id love to test out the beta if possible!

I was a beta tester for Solspaces Membership Module so I have some experience.

Otherwise if you could post some snippets of how it is done it would be a start and greatly appreciated.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Oh, I have no idea. I’m just a beta tester for it. You might post in the solspace.com forums if you are curious about it. I’m not a programmer though so I can’t really help there, just knew of that as a third party module with that ability. =)

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ah is Tags 2.0 a Solspace module?

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
17 years ago
Ingmar Greil's avatar Ingmar Greil

Yes, it is. The beta testing is in progress, and, I believe, no new testers are needed at this point. Tag 2.0 should be released, hm, August-ish, if that is a word. Take with a grain of salt.

       
silenz's avatar
silenz
1,648 posts
17 years ago
silenz's avatar silenz

In cp.publish.php there’s the ‘publish_form_new_tabs_block’. That lets you add code for a new tab. And you have to use the ‘publish_form_new_tabs’-hook for the javascript show/hide funtionality.

       
wiL.Laxa's avatar
wiL.Laxa
69 posts
17 years ago
wiL.Laxa's avatar wiL.Laxa

I have created two extensions that add tabs on the Publish page.

Extensions are: “Easy_shop” creates the “Product” tab and the “Easy_gallery” creates the “Gallery” tab.

If I activate both of them only one tab shows. If I disable one, the other appears and vice versa. I use the same code for them. I’m trying to check if the ‘publish_form_new_tabs’ only loads one Tab. :(

For Gallery and something very similar for Easy_shop.

$DB->query($DB->insert_string('exp_extensions',
                                      array(
'extension_id' => '',
'class'        => "Easy_gallery",
'method'       => "publish_form_new_tabs",
'hook'         => "publish_form_new_tabs",
'settings'     => "",
'priority'     => 9,
'version'      => $this->version,
'enabled'      => "y"
                                     )
                  );
function publish_form_new_tabs($publish_tabs, $weblog_id, $entry_id, $hidden) {

        $publish_tabs['gallery'] = 'Gallery';

        return $publish_tabs;
    }
       

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.