Files
oddmuse/modules
Alex Schroeder f98374df9b PrintFooter relies on @MyFooters
We already called all the subs on @MyFooters and printed the result,
but this commit moves all the code from PrintFooters into subs and
puts those subs on @MyFooters. This allows us to write modules that
can better control where exactly their output should appear. In this
case the change was required in order to allow the Google +1 module to
coexist with code that maybe prints the comment form for all pages.

For example, knowing that the Google +1 sub is the first on one the
list because of unshift(@MyFooters, \&GooglePlusPrintFooter), we can
now write the following:

splice(@MyFooters, 1, 0, \&MyCommentsInTheFooter);

sub MyCommentsInTheFooter {
  my ($id, $rev, $comment) = @_;
  if (not $GooglePlusThisPagePrintedJournal
      and (GetParam('action', 'browse') eq 'browse'
           and $id and $CommentsPrefix
	   and $id ne $RCName
      	   and $id !~ /^$CommentsPrefix(.*)/o)) {

    my $target = $CommentsPrefix . $id;
    my $page = '';
    $page = PageHtml($target) if $IndexHash{$target};
    return $q->div({-class=>'comment'},
		   $q->h2(T('Comments')),
		   $page)
	. GetCommentForm("$CommentsPrefix$id", $rev, $comment);
  }
}

The Google +1 extension was also fixed to not triger the EFF's Privacy
Badger. This is OK because we're using a two step button: The user
needs to click a button before we're loading the script from Google.
2015-08-17 13:39:34 +02:00
..
2015-07-03 14:26:59 +02:00
2015-04-10 13:31:28 +03:00
2015-07-03 13:01:32 +02:00
2015-07-03 13:01:32 +02:00
2015-04-28 00:03:11 +03:00
2015-08-15 10:32:11 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-17 01:39:47 +03:00
2015-04-10 13:31:28 +03:00
2015-04-28 00:03:11 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-28 00:03:11 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-27 17:41:59 +03:00
2015-07-13 06:54:35 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2014-11-06 21:48:08 +01:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-05-17 03:35:35 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-28 00:03:11 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-07-28 10:47:21 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-07-03 11:51:48 +02:00
2015-08-15 10:32:11 +02:00
2015-08-08 03:22:56 +03:00
2015-08-15 10:02:14 +02:00
2015-08-17 13:39:34 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-27 18:20:48 +03:00
2015-04-10 13:31:28 +03:00
2015-08-15 10:32:11 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-27 17:41:59 +03:00
2015-08-15 10:02:14 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-28 00:03:11 +03:00
2015-05-31 22:53:06 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-08-15 10:02:14 +02:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-04-28 00:03:11 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00
2015-07-28 10:49:42 +02:00
2014-08-13 12:06:55 +02:00
2015-04-27 17:41:59 +03:00
2015-04-10 13:31:28 +03:00
2015-04-10 13:31:28 +03:00