Movable Type: Weekly event calendar - movabletype

I am on Movable type 5.2
How would I create a weekly event calendar (7day) using MT tags? I am aware of the MTCalendar tag but this tag does not support weekly dates.
I would like to create "What's going on this week" type of display.

I don't see a way to do it using the standard template language, but you can probably make a very simple plugin to help you here.
Your options:
A block tag that loads the entries for this week.
A conditional tag that is true is this calendar week is the same as the entry week. (so you can use it inside the calendar tag)
A tag that set variables for the start and end timestamps, so you can compare them with entries's time.
Good luck.

Related

Can i move items from a custom list to another list after a specific retention?

I wanted to move items from a custom list in SharePoint 2013 with content type "item" to another list after a specific period (retention expiration). But the transfer to another location involving drop off library supports document libraries only. Please suggest any alternatives to implement this. Thanks
I would either recommend a workflow which is kicked off when the item is added to the list and as Max said have a delayed action, or some sort of wait until the retention date before processing the move. Things to be careful of is the retention date needs to be set in the future otherwise the move will process almost immediately, how you deal with the retention date changing.
Alternatively you could write a custom timer job which would go through all the items and check the retention date and if it is in the past move the file programmatically. The problem with this version is there is going to be a delay depending on how often you run the timer job.
Cheers
Truez
Drop off library is the default destination, in order to change this go to
Site Settings > Content Organizer Rules
Then create a new Rule specifying your Content type and finally Target Location choose your new custom destination that can support your specific content type

Sort articles by template variable

I have built a website (with MODX) where some products are managed and displayed via the articles addon. The products should have a custom ordering but I don't know how to use a template variable for that.
If I enter the name of the TV in the "Sort Field" field nothing is shown at all.
So is it somehow possible to use a TV there?
Or is there another way to achive a custom ordering (note that I need the summary and date fields, so I cant't abuse them for that)?
You can do this by using getResource package. Look at sorbyTV, sortdirTV, sortbyTVType parameters in manual:
http://rtfm.modx.com/extras/revo/getresources#getResources-SelectionProperties

Workflow to Wait until Date Field

How can a workflow be told to wait until a specific date, or date field?
It works with timeout equals date, but I would much rather use wait until process time is on or after date.
When I try this the workflow is postponed until our distant ancestors have died of old age; it is the same if I put in a date field instead of a specific date (which is the end goal):
You want to consider what is considered a "timeout" for the desired behavior. The following links provide some more context.
Also, unless you have a really specific use case for using a specific date (like year end deadlines or processing) -- you'll probably want to use a datetime field on an entity as the basis for the right side of the comparison. You can always use the dialog on the right to choose a fixed date/time before or after any of the entity datetime fields.
http://social.technet.microsoft.com/wiki/contents/articles/11291.microsoft-dynamics-crm-2011-workflows-wait-and-timeout.aspx
http://www.powerobjects.com/blog/2012/11/06/multiple-waiting-workflows-wait-conditions-and-timeouts/
http://www.dynamicscrmtrickbag.com/2009/07/12/waits-timeouts/
Yes, it will use the current value of the field each time the workflow is checked.
Related: CRM2011 Workflow: What happens if the field which is used in the condition of the workflow is updated after the workflow has started?

Recurring Event or Automatically push Entry date forward in ExpressionEngine

I've got an events channel set up on a client site where everything is working just fine. However they now have a single event that runs every Sunday. Due to using the start_on parameter to only show events from the current month onwards this recurring event is now displaying a blank page.
Is there a simple way to have the entries publish date automatically updated to the current month or somehow display recurring events correctly. Client is unwilling to spend money on a new module such as Solspace Calendar.
You could set up a cron job on the server to run a PHP script which would modify the entry date on your recurring entry.
Yeah I see your dilemma, Sean - separating the event from its month and year (year in particular) to have one even display multiple times... What about using MX Clone to simply allow them to create multiple instances of the same entry (granted, they'd have to adjust the date for each one too, but that can be done en masse from the mass edit screen if you're using one of the native date fields and not a custom date field)?
Could you make the entry sticky? Not sure whether that would override the start_on parameter or not.

Creating Lotus Notes documents with specific created/modified/last accessed dates for testing

I'm currently writing an application that moves Notes documents between databases based on the amount of days that have elapsed from the creation/modified/last accessed dates. I would just like to get ideas on a simple and convenient way to create documents with specific dates, without having to change the time on the Domino server, so that I could test out my application.
The best way I found so far was to create a local replica and change the system clock to the date I want. Unfortunately there are problems associated with this method. It does not work on the modified date - I'm not sure how it is getting the modified date information when the location is set to Island (Disconnected) - and it also changes the modified and last accessed dates when the documents are replicated to the server replica.
Someone suggested trying to create a DXL of the document, modify the date time in the DXL file, then import it back into the database as a Notes document; but that does not work. It just takes on the date-time that it was created.
Can anyone offer any other suggestions?
You can set the created date for a document by setting the UNID (which is fundamentally a struct of timestamps, although the actual implementation has changed in recent versions). Accessed and modified times, though, would be unsettable from within the Notes/Domino environment, since the changes you make would be overwritten by the process of saving the changes. If you have a flair for adventure and a need to run with scissors, you could make the changes in the database file itself either programmatically from an external application, or manually with a hex editor. (Editing the binary will work -- folks have been using hex editors to clear the "hide design" flag safely for years. Keep in mind that signed docs will blow up badly, and that you need to ensure that local encryption is off for the database file.)
There's actually a very simple way to spoof the creation date/time: just add a field called $Created with whatever date/time you want. This is alluded to in the Notes C API header file nsfdata.h:
Time/dates associated with notes:
OID.Note Can be Timedate when the note was created
(but not guaranteed to be - look for $CREATED
item first for note creation time)
Obtained by NSFNoteGetInfo(_NOTE_OID) or
OID in SEARCH_MATCH.
Unfortunately, there's no analogous technique for spoofing the mod or access dates. At least none that's ever been documented, as far as I know.
I imagine given how dependent Lotus Notes is on timestamps (for replication, mainly), there isn't an API call that allows you to change the modified, created, or last access dates of a note. (More on the internals of Lotus Notes can be found here.)
I dug around the Notes C API documentation, and found only one mention on how to get/set information in the note's header, including the modified date. However, the documentation states that when you try to update that note (i.e. write it to disk), the last modified date will be overwritten with the date/time it is written to disk.
As an alternative, I would suggest creating your own set of date items within the documents that only you control, for example MyCreated, MyModified, and MyAccessed, and reference those in your code that moves documents based on dates. You would then be able to change these dates as easily as changing any other document item (via agents, forms, etc.)
For MyCreated, create a hidden calculated form field with the formula of #CREATED or #NOW. Set the type to computed when composed.
For MyModified, create a hidden calculated form field with the formula #NOW, and set the type to computed.
MyAccessed gets a bit tricky. If you can do without it, I suggest you live work with just the MyCreated and MyModified. If you need it, you should be able to manage it by setting a field value within the QueryOpen or PostOpen events. Problems occur if your users have only read access to a document - the code to update the MyAccessed field won't be able to store that value.
Hope this helps!

Resources