Changeset 18695 for extensions


Ignore:
Timestamp:
Oct 19, 2012, 1:58:58 PM (12 years ago)
Author:
plg
Message:

add Copyright: from readme.txt as <span class=albumCopyright> in album description

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwigo_import_tree/piwigo_import_tree.pl

    r18694 r18695  
    215215    my $title = undef;
    216216    my $date_string = undef;
     217    my $copyright = undef;
    217218    my $is_details = 0;
    218219    my $details = '';
     
    229230            $title = $1;
    230231        }
     232        elsif ($desc_line =~ /^Copyright:\s*(.*)$/) {
     233            $copyright = $1;
     234        }
    231235        elsif ($desc_line =~ /^Details:/) {
    232236            # from now, all the remaining lines are "details"
     
    240244
    241245        if (defined $date_string) {
    242             $comment = '<span class="albumDate">'.$date_string.'</span><br>';
     246            $comment.= '<span class="albumDate">'.$date_string.'</span><br>';
     247        }
     248        if (defined $copyright) {
     249            $comment.= '<span class="albumCopyright">'.$copyright.'</span><br>';
    243250        }
    244251        $comment.= $details;
Note: See TracChangeset for help on using the changeset viewer.