Help for this page

Select Code to Download


  1. or download this
     # Define your your image names, along with
     # any thumbnails they might need, and their max width and heights.
    
  2. or download this
     my %Media = {
            img_1 => {
    ...
                            { name => 'img_1_thumb_2', w => 50 , h => 50  
    +}, 
                    ],
            },
    
  3. or download this
            # A simple syntax if you just want some thumbnails
            img_2 => [
    ...
            media_table => 'media', # defaults to 'media'
            media_def => \%Media,
     );
    
  4. or download this
            -- Note the MySQL specific syntax here
            create table media (
    ...
                    width      integer,
                    height     integer
            )
    
  5. or download this
      img_1_id
      img_1_thumb_1_id
    
  6. or download this
     my %Media = {
            img_1 => [
    ...
            ],
            img_3 => [],
     };
    
  7. or download this
     my ($add_to_valid,@rm_from_valid) = $media_srv->create_install_med
    +ia($valid);
    
  8. or download this
     $valid = { %$valid, %$add_to_valid } if $add_to_valid;
     map { delete $valid->{$_} } @$rm_from_valid;
    
  9. or download this
     img_id_1 => 23
    
  10. or download this
     img_1_info
    
  11. or download this
            my @deleted_field_ids = $img_srv->delete_checked_media;
    
  12. or download this
            img_1_id
    
  13. or download this
            my $field_id = $img_srv->delete_media('img_1');
    
  14. or download this
      img_1_id
    
  15. or download this
            my $tmpl_vars_ref = $media_srv->create_img_tmpl_vars($table,\%
    +where,@prefixes);
    
  16. or download this
            my $tmpl_vars_ref = $media_srv->create_img_tmpl_vars('news',{ 
    +item_id => 23 },qw/img_1/);
    
  17. or download this
            {
                    img_1_id     => 523,
    ...
                    img_1_height => 200,
                    img_1_url    => '<a href="http://localhost/images/medi
    +a/523.jpg">http://localhost/images/media/523.jpg</a>',
            }
    
  18. or download this
     SELECT media_id as id,width,height,extension 
            FROM media, $table where (media_id = ${prefix}_id and (%where_
    +clause_expanded here));