HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Catalog expiration feature

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#83908 (In Topic #17392)
Avatar

Community saint

Questions on usage

Chris (or someone with experience using the catalog expiration feature) -

I assume the clock starts ticking when the record is entered into a catalog? Is there anything that resets that clock (i.e. editing the entry)? Can I also assume an entry can move through multiple catalogs automatically (i.e. new entry -> current -> archive), or is it a one-movement deal? Also, if an entry auto-moved from catalog "A" to catalog "B", and was manually returned to catalog "A", would that start the clock ticking again?

Testing this feature on V8 produced no movement, so I'm wondering if I've done something wrong or it doesn't work the way I was expecting. Permissions and proper check/tick boxes have been set in each catalog to allow expiry-times. I am testing with the expiry times set to 1 day.

How accurate it the expiry time? I have an entry that was set to move after 24 hours. That entry is now 18 hours past the expected move time.

Do I need to set up a cron job to make this happen, if so, how?

Searching for answers for how the expiry times work in the catalog system yielded only this:

ocPortal Tutorial: Custom structured content (via catalogues) said

In fact, there is special support for this as you can program a catalogue to move entries to an archival category after a specified period of time passes. There is also a permission ('Have a longer expiry-time for catalogue entries') that allows you to grant usergroups a longer period of advert display.
Is there some documentation somewhere else that I have missed?

This is a great feature and would work perfectly for what I am wanting to do - if I can get it to work.

Steve
Back to the top
 
Posted
Item has a rating of 5 (Liked by sholzy)  
Rating:
#83926
Avatar

Good questions. I had to check the code.

Adding this to the docs…

This feature works by logging the date/time for each entry added. This is stored in the ce_last_moved field in the database, under each entry. Any entry in a category that has a move target assigned will be scanned to see if the ce_last_moved date/time is more than the configured number of move days. If it is, the entry is moved. When an entry is moved, the ce_last_moved date/time is reset to the current time. Therefore you could, if you wished, set up chains of movements. There is no way in the ocPortal UI to change ce_last_moved manually (it is not affected by manual moves, validation, or editing), although you could manually make changes to it in the database or you could manually move it back after it has moved and therefore the timer reset. As the movement happens in the scheduler, the scheduler must be enabled for it to work.

The unofficial classified ads addon overrides the functionality of ce_last_moved and uses it to track listing times. Unlike the default functionality, this de-validates entries rather than moving them (to allow listing extensions).



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#83942
Avatar

Community saint

 :thumbs:  Thanks, Chris!
(and book marked for future reference)

Steve
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: