WordPress.org

Ready to get started?Download WordPress

Ideas

WordPress Media Gallery - Please, that can't be true ...

  1. Pret en devises
    Member

    Hi everyone,

    I think I've got some nice suggestion here : did some of you tried PDW File Browser (as CKeditor module) ?

    Although it uses a little processor to compute thumbnails I think it would kindof a nice replacement
    ( could be lighter : option to not display thumbnails + kindof sqlite search through files tree ) for the current image + files management

    Posted: 1 year ago #
  2. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Before you jump into that, check out the new media manager in 3.5 - It helps the gallery a lot!

    Posted: 1 year ago #
  3. I found this thread because I wanted to remove the borders from the images, Seems like even with 3.5 the CSS is still hard coded into the site.

    Should an attribute not be added to the short code?

    I would make this change and gladly open a pull request.

    Posted: 1 year ago #
  4. Alright,

    As I was adding a shortcode attribut for style=none I saw:

    if ( apply_filters( 'use_default_gallery_style', true ) )

    The only instance of this was found in the Twenty Ten theme:

    add_filter( 'use_default_gallery_style', '__return_false' );

    Will remove all styles from WordPress, I think having this is a media option rather hidden in the code, or in function.php is not the best option.

    Posted: 1 year ago #
  5. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Borders can be changed with CSS, still. Where are you seeing it that makes you think it's hard coded?

    Posted: 1 year ago #
  6. In wp-include/media.php

    #{$selector} {
    margin: auto;
    }
    #{$selector} .gallery-item {
    float: {$float};
    margin-top: 10px;
    text-align: center;
    width: {$itemwidth}%;
    }
    #{$selector} img {
    border: 2px solid #cfcfcf;
    }
    #{$selector} .gallery-caption {
    margin-left: 0;
    }

    I turned it off with te above filter.

    Posted: 1 year ago #
  7. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Ah, semantics :) They're not 'hard coded' (that would be if they were use style="margin-top:10px;...." and so on). They're defining default CSS.

    Which, again, you can override in your theme :)

    Posted: 1 year ago #
  8. Drew Jaynes (DrewAPicture)
    Volunteer Moderator

    12345

    It's worth pointing out several things ... again:

    • The CSS is hardcoded because it's in a shortcode.
    • You can disable the hardcoded CSS with add_filter( 'use_default_gallery_style', '__return_false' );
    • You can override the default gallery styles and output with the gallery_style filter.
    Posted: 1 year ago #
  9. Thanks drew

    At least we shall never forget the css priorities !
    #id = 100
    .class=10
    htmltag=1

    making #id1 #id2 priority 200
    #id1 .class priority 110
    and last rule having same priority overrides the previous one

    Posted: 1 year ago #
  10. Unsal Korkmaz
    Member

    12345

    You cant make everyone happy with default settings.
    When you happy, someone will not like result.
    This is why there is actions and filters.

    You can check my solution for gallery:
    http://themes.trac.wordpress.org/ticket/10967
    used bootstrap carousel for galleries
    http://twitter.github.com/bootstrap/javascript.html#carousel

    Posted: 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    185 Votes
  • Status

    This idea is under consideration