Forums

[Plugin:NextGen Gallery][Plugin: NextGEN Galleryview] - get rid of next and prev (4 posts)

  1. eskymo
    Member
    Posted 6 months ago #

    I've installed the NextGen Gallery plugin and also the GalleryView plugin (the John Brien one) and I've got it all working the way I want it apart from one aspect.

    I want my thumbnails to span the whole width of the gallery and I do not want the next and previous arrows to be there. Is there a way to code these out and to make the filmstrip the full width of the gallery?

  2. hedera13
    Member
    Posted 5 months ago #

    I had this same problem earlier this year; I ended up rewriting the plugin code. It doesn't look like John Brien is maintaining the plugin -- maybe someone can take over and add the "no arrows" feature. (I've never maintained a plugin!!) Here's what you need to do.

    1. In the plugin folder wordpress-nextgen-galleryview/GalleryView/images/themes copy make a new folder called "noarrows" and copy four blank 1x1 gifs into it -- name them to match the files in the other themes.

    2. In the file "nggGalleryView.php" add this code at line 415:

    <option value="noarrows" <?php echo ($data_ngs['navTheme'] == "noarrows" ? "selected":"") ?>> No Arrows </option>

    3. In jquery.galleryview-2.0.js find & replace (at line 919) this code:

    if(filmstrip_orientation=='horizontal') {
    				strip_size = opts.show_panels?Math.floor((opts.panel_width-((opts.frame_gap+22)*2))/(f_frame_width+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);
    			} else {
    				strip_size = opts.show_panels?Math.floor((opts.panel_height-(opts.frame_gap+22))/(f_frame_height+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);
    			}

    and replace it with:

    if(filmstrip_orientation=='horizontal') {
    					if( opts.nav_theme=='noarrows') { //MH addition, this line and next two
    						strip_size = opts.show_panels?Math.floor((opts.panel_width+opts.frame_gap)/(f_frame_width+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);
    					} else {
    						strip_size = opts.show_panels?Math.floor((opts.panel_width-((opts.frame_gap+22)*2))/(f_frame_width+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);
    					}
    			} else {
    					strip_size = opts.show_panels?Math.floor((opts.panel_height-(opts.frame_gap+22))/(f_frame_height+opts.frame_gap)):Math.min(item_count,opts.filmstrip_size);
    			}

    4. I also changed the plugin so that if there's only one image it wouldn't add thumbnails:
    In nggGalleryViewSharedFunctions.php

    after line 118
    $final = array();
    add
    $pcount = count($pictures); // count the number of photos so thumbnails won't show if only one photo -- MH

    at line 160 replace

    $out .= " show_filmstrip: " . ($showfilmstrip?'true':'false') . ",";

    with

    ` if ($pcount >1) { // new "no arrows code -- MH -- that doesn't show filmstrip if only one photo
    $out .= " show_filmstrip: " . ($showfilmstrip?'true':'false') . ",";
    } else {
    $out .= " show_filmstrip: false,";
    }`

    Hope that all works for you! I can also email you the files if you need them.

  3. hedera13
    Member
    Posted 5 months ago #

    after that's all working, go into your GalleryView settings and pick the "No Arrows" theme!

    ...and you can see my galleries in action here: http://www.ca-atelierps.com/projects/

    Good luck!

  4. hedera13
    Member
    Posted 5 months ago #

    also, I have this in my theme css:

    .galleryview .nav-next, .galleryview .nav-prev, .nav-prev-overlay, .nav-next-overlay {width:1px;display:none;padding:0;margin:0;overflow:hidden;}

Reply

You must log in to post.

About this Topic