21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 780 Views |
-
SOLVED: Blog module with expire date on blog entries

27 October 2009 at 3:52am Last edited: 27 October 2009 10:32pm
I have manage to make the blog entries with expiry date. This works just fine, but I have another little problem now. When I use the archive the entries doesn't show because the date on those have expired.
Any ideas on how this can be solved.
Heres the code for the expire date..
In BlogEntires.php
function ExpiresDoNotShow() {
$now = strtotime('now');
if($this->owner->DateOut && strtotime($this->owner->DateOut) < $now) {
return false;
} else {
return true;
}
}In BlogSummary.ss
<% if ExpiresDoNotShow %>...<% end_if %>
Add this in the function ExpiresDoNotShow
if (Director::urlParam('Action') && Director::urlParam('Action') != "tag" ) {
return true;
}
| 780 Views | ||
|
Page:
1
|
Go to Top |

