Tested with: WikkaWiki version 1.1.6.4
Example: DescentiaPedia
Example: DescentiaPedia
Comments Clip in the Footer
CommentsClipFooter is the name of an action I included in the footer of 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:commentsclipft.php (line 1)
- <?php
- /**
- * Display a list of recent comments.
- *
- * @package Actions
- * @name CommentsClipFooter
- *
- * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} (preliminary code cleanup)
- * @author {@link http://wikkawiki.org/NickDamoulakis Nick Damoulakis} (ACL check)
- * @author {@link http://wikkawiki.org/WillyP WillyP} (minor hack to match 'changesclipft' style, and to be able to use this in a footer. Added COMMENT_QTY, more link)
- * @since
- *
- * @input none
- * Tested with 1.1.6.4, in the footer only.
- */
- //constants
- //i18n USE WIKI FORMATTING
- $readable = 0;
- $username = '';
- {
- $username = $this->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
- if ($day != $curday)
- {
- }
- {
- $comment_preview = $comment_preview.'…';
- }
- $pagetag = $page["tag"];
- if ($this->HasAccess("read", $pagetag))
- { print '<span class="clip">'.($this->Link($comment['page_tag']).': '.$comment_preview.'<br /> '.$dateformatted.' '.$timeformatted." by: ".$this->Format($comment['user'])."</span><br />");
- }
- }
- }
- if ($readable == 0)
- {
- echo '<em class="error">'.NO_READABLE_RECENT_COMMENTS_CLIP.'</em><br />';
- }
- }
- else
- {
- {
- }
- else
- {
- }
- }
- echo '<span class="clip">'. ($this->Format(COMMENT_CLIP_MORE))."</span>";
- ?>
See also:
ActionsInFooter
Categories:
CategoryStyle