"Powered by UsemodWiki (nnnn lines)"
at the bottom of each page, where "nnnn" means lines of code of Usemod Wiki.
sub GetFooterText {
my ($id, $rev) = @_;
my $result;
+ my $lines = 0;
+ my $buffer;
...
. $ConfigError . '<br>';
}
+ open(SCRIPT, $ENV{SCRIPT_FILENAME} ) || die(Ts('Can not open %s', $ENV{SCRIPT_NAME}) . ": $!");
+ while (sysread SCRIPT, $buffer, 4096) {
$lines += ($buffer =~ tr/\n//);
+ }
+ close SCRIPT;
+ $result .= '<br><i>' . Ts('Powered by UsemodWiki with %s lines of code', $lines) . '</i>';
I don't know for the time being if this piece of code has a free license; some help will be appreciated.
--JuanmaMP