@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 https://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