Changes Clip in the Footer
ChangesClipFooter is the name of an action I included in the footer of DescentiaPedia. I made some changes from the original code(recentchanges.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:changesclipft.php (line 1)
- <?php
- // call from footer.php/templates
- //actions/changesclipft.php
- // original author: Marc Mayfield (http://www.IntegratedElf.com)
- // date: 20 June 2006
- // based on: actions/recentchanges.php
- // license: [[GPL]]
- // http://www.gnu.org/copyleft/gpl.html
- // This code may be reused/redistributed freely, so long as this heading
- // is present.
- //
- // Provide a list of recent changes made within the wiki. Presentation includes:
- // - 'Recent Changes' heading
- // - Two-line description of change
- // - Linked page name
- // - Change note
- // - First characters of body
- // - change timestamp and changer
- // - link to 'RecentChanges'
- // - CSS: span class="clip"
- // 19 April 2008: minor hacks by WillyP (http://www.wikkawiki.org/WillyPs) for use in use in footer and to match style of commentsclip.
- //--ToDo: when there is no note and the body of the page is shown, strip formating data so only text of content is shown.
- // irregardless, will not show body if a note is shown. True = show body only if there is no note.
- //i18n USE WIKI FORMATING
- if ($pages = $this->LoadRecentlyChanged())
- {
- $curday = "";
- echo $this->Format(CHANGES_CLIP_HEADING);
- foreach ($pages as $i => $page)
- {
- if (($i < CHANGES_CLIP_QTY) || !CHANGES_CLIP_QTY)
- {
- {
- }
- $page_edited_by = $page["user"];
- if (!$this->LoadUser($page_edited_by)) $page_edited_by .= " " . ($this->Format(CHANGES_CLIP_UNREG));
- $body = "";
- $note = "";
- if (CHANGES_CLIP_SHOW_NOTE && $page['note'] != "")
- {
- //limit amount of characters shown
- {
- {
- $note = $note . '…)';
- } else {
- $note = $note . ')';
- }
- }
- } else {
- if ($note = "")
- {
- $note = ' ' . ($this->Format(CHANGES_CLIP_NOTE_NONE)); // show a message if there is no note
- }
- if (CHANGES_CLIP_SHOW_BODY) //show body clip if there is no note
- {
- $body = " " . $this->htmlspecialchars_ent(substr($page['body'],0,CHANGES_CLIP_BODY_LENGTH)) . "...";
- }
- }
- // show "..." if note is too long
- // print entry
- $pagetag = $page["tag"];
- if ($this->HasAccess("read", $pagetag))
- {
- } else {
- print'<span class="clip">'.($pagetag."<br />".$page[time]." " . ($this->Format(CHANGES_CLIP_READ_NONE)) . "</span><br />");
- }
- }
- }
- }
- echo'<span class="clip">'. ($this->Format(CHANGES_CLIP_MORE))."</span>";
- ?>
See also:
ActionsInFooter
Categories:
CategoryStyle