Browse Source

Added a check for a NoMargin file, which disables links to comment pages.

pull/1/head
Brennen Bearnes 17 years ago
parent
commit
dbf4dc1ff8
2 changed files with 20 additions and 4 deletions
  1. +5
    -4
      Display.pm
  2. +15
    -0
      Display/Markup.pm

+ 5
- 4
Display.pm View File

@ -341,8 +341,7 @@ Very naive; there has got to be a smarter way.
/x;
if ($month == 1) {
$month = 12;
$year--;
$month = 12; $year--;
} else {
$month--;
}
@ -356,8 +355,7 @@ Very naive; there has got to be a smarter way.
# handle January:
if ($month == 1) {
$month = 12;
$year--;
$month = 12; $year--;
next;
}
$month--;
@ -713,6 +711,9 @@ sub datestamp {
$wikititle,
'title: a page you can edit');
if ( -e $self->local_path($entry . "/NoMargin") ) {
$wikistamp = "<!-- Margin blocked. -->";
}
# Return a fancy datestamp:


+ 15
- 0
Display/Markup.pm View File

@ -241,11 +241,26 @@ sub gallery_markup {
if (-d "$basedir/$file") {
return gallery("$basedir/$file", "");
} elsif (-d $self->root_dir . $file) {
return gallery($self->root_dir . $file);
}
}
# Encapsulate some ugly file-location functionality.
sub resolve_file {
my $self = shift;
my ($filename) = @_;
# Get a basename and directory for the file:
my ($basename, $dir) = fileparse($file);
#if (-e "$dir/$image_url" ) {
#$image_file = "$dir/$image_url";
#$image_url = "${file_date}${image_url}";
#} elsif (-e $self->root_dir . "/$image_url") {
#$image_file = $self->root_dir . "/$image_url";
#}
}
1;

|||||||
x
 
000:0
Loading…
Cancel
Save