Time Stamp On Pages

Permalink
Hey everyone,

Quick question: If I have a page within an events calendar and I create an event for a particular date. Is there a way to get the event to automatically remove itself from the list when the date expires?

Thanks in advance

Craig

 
pvernaglia replied on at Permalink Best Answer Reply
pvernaglia
Take a look athttp://www.concrete5.org/documentation/how-tos/automatically-expire...

That will probably get you headed in the right direction
PropellerCraig replied on at Permalink Reply
Cheers fella, much appreciated.

I'll take a look and see what I can do, this looks to be a fairly comprehensive run down of what is required so I'll give it a go and post back my response.

Thanks once again

Craig
dancer replied on at Permalink Reply
dancer
Hi there,
This is exactly what I am trying to do but hitting an error when I run the script?

I am no PHP expert but a long shot but I was wondering if anyone could help as to why this is not working?

<?php 
   defined('C5_EXECUTE') or die("Access Denied.");
   $textHelper = Loader::helper("text");
   $date = Loader::helper("date");
   // now that we're in the specialized content file for this block type, 
   // we'll include this block type's class, and pass the block to it, and get
   // the content
   if (count($cArray) > 0) { ?>
   <div class="calendar">
   <?php 
   for ($i = 0; $i < count($cArray); $i++ ) {
      $cobj = $cArray[$i]; 
      $target = $cobj->getAttribute('nav_target');
      $date = $cobj->getCollectionDatePublic('d/m/Y');
      $title = $cobj->getCollectionName();


The error I get is:
Fatal error: Call to a member function getSystemDateTime() on a non-object in /home/oldaskea/public_html/blocks/page_list/templates/calendar_full.php on line 22

Thanks massively for looking
dancer replied on at Permalink Reply
dancer
I had conflicting variable names
SVijay replied on at Permalink Reply
SVijay
Hi,

Visit the below given link, it may help you

http://www.concrete5.org/documentation/developers/helpers/date-and-...