Last active
August 25, 2016 06:30
-
-
Save hissy/9616508 to your computer and use it in GitHub Desktop.
Revisions
-
hissy revised this gist
Mar 18, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,8 @@ // Prepare data for each page being listed... $pubTime = strtotime($page->getCollectionDatePublic()); // 60 seconds, 60 minutes, 24 hours, 3 days $new = ((time() - $pubTime) < (60 * 60 * 24 * 3)) ? '<p class="new">New</p>' : ''; /* The HTML from here through "endforeach" is repeated for every item in the list... */ ?> -
hissy created this gist
Mar 18, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ <?php foreach ($pages as $page): // Prepare data for each page being listed... $pubTime = strtotime($page->getCollectionDatePublic()); $new = ((time() - $pubTime) < (60 * 60 * 24 * 3)) ? '<p class="new">New</p>' : ''; // display "New" from 3 days before /* The HTML from here through "endforeach" is repeated for every item in the list... */ ?> <?php echo $new?> <?php endforeach; ?>