• Resolved laskowv

    (@laskowv)


    I have rolled back to NextGen Gallery 1.9.13, running WP 3.8. When you have sub albums, there is text below stating there are # Photos instead of # Albums. The source is the code is in the directory: view/album-compact.php

    The class=”ngg-album-desc” and the statement is:
    <?php echo $gallery->counter ?> <?php _e(‘Photos’, ‘nggallery’) ?>

    I would like to put “if” logic here and only print if this statement if it is a gallery, but I cannot tell for sure what variable name to check. Someone that is familiar with this source might be able to tell me.

    Note: in the 2.0.x versions, they did put “if” logic, but the I tried using the same variable but it did not work. It might not have been declared where it was supposed to be or possibly was a field addition to the database.

    I am hoping someone from Photocrati can answer this or someone more familiar with the code can help me with this simple customization.

    Thanks…Valerie

    http://wordpress.org/plugins/nextgen-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t know if this is what you mean :


    http://www.doublesixx.com/gallery/om-2013/events-2013/

    No if logic just css. I’m still using 1.9.13.

    You’ll need to edit nggallery.css.

    First backup your naggallery.css located in : /wp-content/plugins/nextgen-gallery/css

    Now for the changes :

    .ngg-album {
    	overflow: hidden;
    	padding: 5px;
    	margin-bottom: 5px;
    	border: 1px solid #cccccc; // -sixx- thin boarder around extended gallery
    }
    
    .ngg-albumtitle {
    // sixx--
    	//text-align: left;
     	//font-weight: bold;
    	//margin:0px;
    	//padding:0px;
    	//font-size: 1.4em;
    	//margin-bottom: 10px;
    	display:none;
    // --sixx
    }
    
    /* ----------- Album Styles Compact -------------*/
    
    .ngg-album-compact {
    	float:left;
    	height:110px; // -sixx- 180px;
    	padding-right:6px !important;
    	margin:0px !important;
    	text-align:center; // -sixx- (#photos) left;
    	width:120px;
    }
    
    .ngg-album-compactbox {
    
    	// -sixx- background:transparent url(albumset.gif) no-repeat scroll 0%;
    	height:86px;
    	margin:0pt 0pt 6px !important;
    	padding:0px 0pt 0pt 0px; // -sixx- 12px 0pt 0pt 7px !important;
    	width:120px;
    }
    
    .ngg-album-compactbox .Thumb {
    
    	background-color:#FFFFFF; // -sixx-
    	border:1px solid #000000;
    	margin:4px !important; // -sixx- 0px !important;
    	padding:4px !important; // -sixx- 0px !important;
    	// -sixx- width:91px;
    	// -sixx- height:68px;
    }
    
    .ngg-album-compact h4 {
    // sixx--
    	//font-size:15px;
    	//font-weight:bold;
    	//margin-bottom:0px;
    	//margin-top:0px;
    	//width:110px;
        display:none;
    // --sixx
    }
    
    .ngg-gallery-thumbnail {
    	/* float: left; sixx */
    	/* margin-right: 5px; sixx */
    	/* padding-top:10px;  -sixx- row space in gallery */
    
    	height:86px;
    	margin:0pt 0pt 6px !important;
    	padding:0px 0pt 0pt 0px; /* -sixx- 12px 0pt 0pt 7px !important; */
    	padding-top:10px;
    	padding-bottom: 5px; /* -sixx- */
    	width:120px;
    }
    
    .ngg-gallery-thumbnail img {
    	background-color:#FFFFFF;
    	border:1px solid #A9A9A9;
    	display:block;
    	/* -sixx margin:4px 0px 4px 5px; */
        margin-left: auto; /* -sixx- */
    	margin-right: auto; /* -sixx- */
    	padding:4px;
    	position:relative;
    }

    Now upload the altered nggallery.css to your current WordPress theme.
    /wp-content/themes/ Whatever theme you’re using

    Using the theme directory will ignore the nggallery.css in /wp-admin/admin.php?page=nggallery-style. A good trick before 2.x that would prevent newer versions of nggallery from effecting the changes made. But you could change it there too.

    Hope this helps, Happy New Year and good luck.

    Plugin Contributor photocrati

    (@photocrati)

    @doublesixx – Thanks for sharing those details.

    – Cais.

    Thread Starter laskowv

    (@laskowv)

    @doublesixx – Thanks for the code — but it still does not address my issue.

    My issue is regarding having to create sub albums (albums within albums) that have galleries in them. For example, one of my sites http://txdcw.org/photos/ is a prime example.

    I created an album called Photo Gallery. Within this album there is a sub album called State Meetings. In State Meetings there are 12 galleries so far. When you click on the the Photos page (link above), the text states there are “12 Photos”. This is because in version 1.9.13, album-compact.php is using a loop and assuming that there will not be any sub albums — hence the foreach loop plugs everything into the $galleries variable (see code)

    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($galleries)) : ?>
    
    <div class="ngg-albumoverview">
    	<!-- List of galleries -->
    	<?php foreach ($galleries as $gallery) : ?>
    	<div class="ngg-album-compact">
    		<div class="ngg-album-compactbox">
    			<div class="ngg-album-link">
    				<a class="Link" href="<?php echo $gallery->pagelink ?>">
    					<img class="Thumb" alt="<?php echo $gallery->title ?>" src="<?php echo $gallery->previewurl ?>"/>
    				</a>
    			</div>
    		</div>
    		<h4><a class="ngg-album-desc" title="<?php echo $gallery->title ?>" href="<?php echo $gallery->pagelink ?>" ><?php echo $gallery->title ?></a></h4>
    		<?php if ($gallery->counter > 0) : ?>
    		<p><strong><?php echo $gallery->counter ?></strong> <?php _e('Photos', 'nggallery') ?></p>
    		<?php endif; ?>
    	</div>
    
     	<?php endforeach; ?>
    
    	<!-- Pagination -->
     	<?php echo $pagination ?>
    </div>
    
    <?php endif; ?>

    My issue is that I need it to check each record to determine if it is a gallery or album and have variable set to that so that I can do a if/then logic where it is currently printing “Photos” so that it will print “12 Albums” instead of “12 Photos” when it encounters an album.

    This is a bug!! In 2.0.x version, they just omitted printing anything below the sub album, but the actual galleries had the correct number of photos within the gallery. Unfortunately, there were too many issues with each of the 2.0.x versions and I had to rollback to 1.9.13.

    This should be a simple fix, but my php coding is not that strong yet; have been on legacy systems way too long. If I knew how to display the contents of $gallery on my page, I might be able to figure it out myself. There has to be something in the database flagging the album types versus gallery types.

    I am hoping for a GREAT response from Photocrati personnel.
    – Thanks…Valerie

    Thread Starter laskowv

    (@laskowv)

    resolved by upgrading to the latest version

    Plugin Contributor photocrati

    (@photocrati)

    @laskowv – Thanks for the update!

    – Cais.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘NextGen Gallery 1.9.13 sub albums no of photos text display’ is closed to new replies.