>>Tested with: WikkaWiki version **1.1.6.4** Example: [[DescentiaPedia:DescentiaPedia | DescentiaPedia]]>>=====Comments Clip in the Footer===== CommentsClipFooter is the name of an action I included in the footer of [[www.prepare4descent.net/DescentiaPedia | DescentiaPedia]]. I made some changes from the original code (recentcomments.php... or was it recentlycommented.php???) in order to work this into the footer, and to style this to match ""DescentiaPedia"". I have not tested this to see if it can be still used in a page. Nor have I tested this in any version of wikka other than 1.1.6.4. Here is the code: %%(php;1;commentsclipft.php) htmlspecialchars_ent($_REQUEST['user']); } echo $this->Format(COMMENTS_CLIP_HEADING); if ($comments = $this->LoadRecentComments(COMMENT_CLIP_QTY, $username)) { $curday = ''; foreach ($comments as $comment) { if ($this->HasAccess('comment', $comment['page_tag'])) { $readable++; // day header list($day, $time) = explode(' ', $comment['time']); if ($day != $curday) { $dateformatted = date(COMMENT_CLIP_DATE_FORMAT, strtotime($day)); } $timeformatted = date(COMMENT_CLIP_TIME_FORMAT, strtotime($comment['time'])); $comment_preview = str_replace('
', '', $comment['comment']); $comment_preview = substr($comment_preview, 0, COMMENT_CLIP_SNIPPET_LENGTH); if (strlen($comment['comment']) > COMMENT_CLIP_SNIPPET_LENGTH) { $comment_preview = $comment_preview.'…'; } $pagetag = $page["tag"]; if ($this->HasAccess("read", $pagetag)) { print ''.($this->Link($comment['page_tag']).': '.$comment_preview.'
  '.$dateformatted.' '.$timeformatted."  by: ".$this->Format($comment['user'])."

"); } } } if ($readable == 0) { echo ''.NO_READABLE_RECENT_COMMENTS_CLIP.'
'; } } else { if(!empty($username)) { echo ''.sprintf(NO_RECENT_COMMENTS_CLIP, " by $username.").'
'; } else { echo ''.sprintf(NO_RECENT_COMMENTS_CLIP, ".").'
'; } } echo ''. ($this->Format(COMMENT_CLIP_MORE)).""; ?> %% ---- See also: ActionsInFooter ---- Categories: CategoryStyle