Example #1
0
                $data['title'] = $data['album_title'] ? $data['album_title'] : $locale['402'];
                $data['description'] = $data['album_description'] ? nl2br(parse_textarea($data['album_description'])) : '';
                $_photo = dbquery("SELECT pp.photo_user, u.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\tFROM " . DB_PHOTOS . " pp\n\t\t\tLEFT JOIN " . DB_USERS . " u on u.user_id=pp.photo_user\n\t\t\tWHERE album_id='" . intval($data['album_id']) . "'\n\t\t\tORDER BY photo_datestamp\n\t\t\t");
                $data['photo_rows'] = dbrows($_photo);
                $user = array();
                if ($data['photo_rows'] > 0) {
                    while ($_photo_data = dbarray($_photo)) {
                        $user[$_photo_data['user_id']] = $_photo_data;
                    }
                    // distinct value.
                }
                $data['photo_user'] = $user;
                $info['item'][] = $data;
            }
        }
        render_gallery($info);
    }
}
function photo_thumbnail($data)
{
    global $locale, $gallery_settings;
    echo "<div class='panel panel-default tbl-border'>\n";
    echo "<div class='p-0'>\n";
    echo "<!--photogallery_album_photo_" . $data['photo_id'] . "-->";
    echo "<a href='" . INFUSIONS . "gallery/gallery.php?photo_id=" . $data['photo_id'] . "' class='photogallery_album_photo_link'>\n";
    $thumb_img = $data['photo_thumb1'] && file_exists(IMAGES_G . $data['photo_thumb1']) ? IMAGES_G . $data['photo_thumb1'] : DOWNLOADS . "images/no_image.jpg";
    $title = $data['album_thumb1'] && file_exists(PHOTOS . $data['album_thumb1']) ? $data['album_thumb1'] : $locale['432'];
    echo "<img class='photogallery_album_photo img-responsive' style='min-width: 100%;' src='" . $thumb_img . "' title='{$title}' alt='{$title}' />\n";
    echo "</a>\n";
    echo "</div>\n<div class='panel-body photogallery_album_photo_info'>\n";
    echo "<a href='" . INFUSIONS . "gallery/gallery.php?photo_id=" . $data['photo_id'] . "' class='photogallery_album_photo_link'><strong>" . $data['photo_title'] . "</strong></a>\n";
"></div>
        <?php 
    }
    ?>
 
    </div>
    <?php 
    return ob_get_clean();
}
$gal_1 = get_post_meta(get_the_ID(), 'front_gallery_1', false);
$gal_2 = get_post_meta(get_the_ID(), 'front_gallery_2', false);
?>
<section class="home-before-footer">
    
    <?php 
if ($gal_1 && is_array($gal_1)) {
    echo render_gallery($gal_1, 'gallery-top');
}
?>
    
    <?php 
get_template_part('template-parts/home/front-boxes');
?>
    
    <?php 
if ($gal_2 && is_array($gal_2)) {
    echo render_gallery($gal_2, 'gallery-top');
}
?>

</section>