Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Embargo/expiry module

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 2847 Views
  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Embargo/expiry module Link to this post

    I have created a module that allows your pages to embargo and expire when you choose.

    Available at http://www.silverstripe.com/modules.

  • mbellino
    Avatar
    Community Member
    32 Posts

    Re: Embargo/expiry module Link to this post

    Hi Simon

    I was anxious to check it out, cool module! My compliment!

    Would be very cool if the embargo/expire feature is also available for the other modules like blog entry, e-commerce, gallery, etc.

    Have a nice day

    Mario

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Embargo/expiry module Link to this post

    The only way I can think of to do this would be to subclass each of the page types.

    Will get on to it.

  • mbellino
    Avatar
    Community Member
    32 Posts

    Re: Embargo/expiry module Link to this post

    Hi Simon

    Thanks for feedback.
    What do you think to realize it as widget for the other modules?

    Cheerio

    Mario

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Embargo/expiry module Link to this post

    As far as I'm aware, that wont be possible, as I use the can() method to hide the links, and I don't think there's a way to override that on a page without subclassing the page type.

  • buddyq
    Avatar
    2 Posts

    Re: Embargo/expiry module Link to this post

    Here some cool additions for recurring times:

    Can you add the ability so you can specify a page to only show on certain days of the week?
    For example: If I wanted a page to show only on Mon, Wed, and Friday and if I dont specify a time its from midnight-midnight be default or something.

    Also can you have it so that I can show a page at a recurring time like: everyday or (x)day at 5pm - 7am? or whatever times I choose?

    This way someone could show a special every Friday starting at noon if they wanted to. Sort of a "happy hour" if-you-will.

    Thanks!

    Buddy

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Embargo/expiry module Link to this post

    Once my patch gets confirmed, I'll release a version that gives every page (that doesn't override can(), without calling parent::can() as well) the ability to Embargo/expiry

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Embargo/expiry module Link to this post

    Now that Matt's added this to SVN (here), you can see my progress.

    There is currently two separate ways for embargo/expiry to be applied. One requires a core patch, and then adds it to every page. The other doesn't require a patch, but is only one page type.

    Buddyq, I'll get onto your ideas now (:

    2847 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.