Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Free feature! Patch attached.
Right now there's nothing to tell ctools about the scheduler form element - meaning that (for example) if you have a custom node edit page layout using Page Manager, the scheduler form element doesn't appear as an available content type, forcing you to choose between your custom layout and Scheduler.
Not any more! This adds a pretty standard ctools plugin following the same method as for the other node form elements such as menu settings, etc.
As a free bonus it also fixes a missing apostrophe on one of the admin pages.
Comment | File | Size | Author |
---|---|---|---|
#15 | scheduler dates in pane form 1.jpg | 103.89 KB | jonathan1055 |
#15 | scheduler dates in pane form 2.jpg | 202.79 KB | jonathan1055 |
#14 | 1334780-14-scheduler-ctools_content_type.patch | 2.6 KB | pfrenssen |
#12 | 1334780-12-scheduler-ctools_content_type.patch | 2.52 KB | pfrenssen |
#9 | 1334780-9-scheduler-ctools_content_type.patch | 2.52 KB | pfrenssen |
Comments
Comment #1
jonathan1055 CreditAttribution: jonathan1055 commentedSounds interesting. Not tried any custom node edit pages. If anyone else has used this, please tell us here.
Comment #2
Jon Betts CreditAttribution: Jon Betts commented@alanomaly Thanks for this!! It works great! Was here looking for this exact funtionality. This solves a pretty major UI issue for me. Thanks again!
Comment #3
alanom CreditAttribution: alanom commentedAny chance of this patch getting tested, committed etc? I'd like to be able to update without then needing to reapply / re-hack this back in.
Comment #4
Eric-Alexander Schaefer CreditAttribution: Eric-Alexander Schaefer commentedSound interesting although I have no idea that ctools and page manager are. Could you shed some light on this?
Comment #5
alanom CreditAttribution: alanom commentedDo you mean you don't know what ctools and page manager are? If so... I'm tempted to say google them...
That said Page Manager (part of the ctools module by the way) has really awful documentation... about the only decent resources for it that I know of are in this series of screencasts at nodeone.se. Also, here's that guy's overview on what page manager does and why it is important.
Comment #6
tripper54 CreditAttribution: tripper54 commentedHi,
I couldn't get the attached patch to run on the latest version, so I manually added the changes and re-rolled.
I made a couple of small changes:
* removed the fix for the grammar error in scheduler.module - I figure this should be in a separate patch.
* remove the hard-coded reference to the ctools module path, replaced with a drupal_get_path
Otherwise, all good - it seems to work as expected. Thanks so much for your work on this, alanomaly!
I always use page manager to customise node add/edit forms now - it's a fantastic way to quickly put together multiple versions of forms for different node types, user roles etc. Clients love it!
Comment #7
stred CreditAttribution: stred commentedWorked for me, thanks for the job. Page manager is a must ;)
Comment #8
webflo CreditAttribution: webflo commentedNice patch! I found a little bug and removed the trailing whitespace.
Duplicate array key.
Comment #9
pfrenssenRerolled the patch to latest 7.x-1.x. Cleaned up coding standards and simplified documentation (mainly removed boilerplate documentation from the CTools example plugin).
Comment #10
tripper54 CreditAttribution: tripper54 commented#9 Looks great and works a treat. I would love to see this committed!
Comment #11
jonathan1055 CreditAttribution: jonathan1055 commentedMinor question - is it correct to have underscores in a string passed to t( ) ?
or maybe that string is not meant to be translated?
Comment #12
pfrenssenNo, that does not look right indeed. Fixed it in this patch.
I wondered how this got in there and discovered that several plugins in CTools have the same problem:
node_form_title.inc
,node_form_publishing.inc
etc.Comment #13
pfrenssenI reported the problem in the CTools issue queue: #1978350: Do not translate $block->module assignments.
Comment #14
pfrenssenRerolled patch so it does not conflict with #1069668: Default time with user override. This does not change the code, it only moves a function to a different spot. I need to be able to apply both patches for a distribution I'm working on, and this saves me from having to fork Scheduler.
Also setting back to needs review, since the patch from #12 fixes the problem reported in #11 but this had not yet been reviewed.
Comment #15
jonathan1055 CreditAttribution: jonathan1055 commentedThis is fantastic! Tested and works. Patch applies cleanly to 7.x-1.1+10 of 27th July. Coder Review is clean.
Attached are a couple of screen shots, showing the new form item which can be added to a pane, and an example of editting a node using a custom pane.
Thank you to alanom, tripper54, webflo and pfrenssen for all contributing.
For reference, if anyone else want to learn about how to use this functionality, the screencasts at nodeone are very good. 1 to 4 are enough to find out how to create node edit panes and use the Scheduler form.
Jonathan
Comment #16
rickmanelius CreditAttribution: rickmanelius commentedThanks everyone for the hard work on this one.
Committed http://drupalcode.org/project/scheduler.git/commitdiff/937411e