[Home]WikiPatches/RawOutPutInFooterBar

UseModWiki | WikiPatches | RecentChanges | Preferences

It allows straight link to render pages in raw mode. Just another link in GetFooterText.

sub GetFooterText {
...
$result .= &GetHistoryLink($id, T('View other revisions'));
  if ($rev ne '') {
    $result .= ' | ';
    $result .= &GetPageLinkText($id, T('View current revision'));
  }
+  $result .= ' | ' . &GetRawLink($id, T('Raw'));
...
In somewhere, best before GetEditLink:
sub GetRawLink {
  my ($id, $text) = @_;
  my $revision;
  
  $revision = &GetParam('revision', '');
  if ($FreeLinks) {
    $id =~ s/ /_/g;
  }
  if ($revision) {
	return &ScriptLink("action=browse&id=$id&revision=$revision&raw=1", $text);
  } else {
	return &ScriptLink("action=browse&id=$id&raw=1", $text);
  }
}
--JuanmaMP

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 24, 2009 5:28 pm by JuanmaMP (diff)
Search: