function bp_album_screen_images() { ?> <?php if (bp_album_has_pictures()) { ?> <div class="picture-pagination"> <?php bp_album_picture_pagination(); ?> </div> <div class="picture-gallery"> <?php while (bp_album_has_pictures()) { bp_album_the_picture(); ?> <div class="picture-thumb-box"> <a href="<?php bp_album_picture_url(); ?> " class="picture-thumb"><img src='<?php bp_album_picture_thumb_url(); ?> ' /></a> <a href="<?php bp_album_picture_url(); ?> " class="picture-title"><?php bp_album_picture_title_truncate(); ?> </a> </div> <?php } ?> </div> <?php } else { ?> <div id="message" class="info"> <p><?php echo bp_word_or_name(__("You don't have any photos yet. Why not upload some!", 'bp-album'), __("Either %s hasn't uploaded any pictures yet or they have restricted access", 'bp-album'), false, false); ?> </p> </div> <?php } ?> <?php }
<table class="bpa-content-sitewide"> <tr> <?php // STEP 3: Iterate through the items the query has found, printing out each one. while (bp_album_has_pictures()) { bp_album_the_picture(); ?> <td> <a href="<?php bp_album_picture_url(); ?> " class="media-image"><img src='<?php bp_album_picture_thumb_url(); ?> ' /></a> </td> <?php $row_count++; if ($row_count == $images_per_row) { echo '</tr><tr>'; $row_count = 0; } } // STEP 4: Close the CSS block. ?> </tr> </table> </div><?php
/** * bp_album_screen_edit_content() * * @version 0.1.8.12 * @since 0.1.8.0 */ function bp_album_screen_edit_content() { global $bp; if (bp_album_has_pictures()) { bp_album_the_picture(); $limit_info = bp_album_limits_info(); $priv_str = array(0 => __('Public', 'bp-album'), 2 => __('Registered members', 'bp-album'), 4 => __('Only friends', 'bp-album'), 6 => __('Private', 'bp-album'), 10 => __('Hidden (admin only)', 'bp-album')); ?> <h4><?php _e('Edit Picture', 'bp-album'); ?> </h4> <form method="post" enctype="multipart/form-data" name="bp-album-edit-form" id="bp-album-edit-form" class="standard-form"> <img id="picture-edit-thumb" src='<?php bp_album_picture_thumb_url(); ?> ' /> <p> <label><?php _e('Picture Title *', 'bp-album'); ?> <br /> <input type="text" name="title" id="picture-title" size="100" value="<?php echo empty($_POST['title']) ? bp_album_get_picture_title() : wp_filter_kses($_POST['title']); ?> "/></label> </p> <p> <label><?php _e('Picture Description', 'bp-album'); ?> <br /> <textarea name="description" id="picture-description" rows="15"cols="40" ><?php echo empty($_POST['description']) ? bp_album_get_picture_desc() : wp_filter_kses($_POST['description']); ?> </textarea></label> </p> <p> <label><?php _e('Visibility', 'bp-album'); ?> </label> <?php foreach ($priv_str as $k => $str) { if ($limit_info[$k]['enabled']) { ?> <label><input type="radio" name="privacy" value="<?php echo $k; ?> " <?php if ($limit_info[$k]['current']) { echo 'checked="checked" '; } if (!$limit_info[$k]['current'] && !$limit_info[$k]['remaining']) { echo 'disabled="disabled" />' . $str . ' ' . __('(limit reached)', 'bp-album'); } else { echo '/>' . $str; } ?> </label> <?php } } ?> </p> <?php if (bp_is_active('activity') && $bp->album->bp_album_enable_comments) { ?> <p> <label><?php _e('Picture activity and comments', 'bp-album'); ?> </label> <label><input type="radio" name="enable_comments" value="1" checked="checked" /><?php _e('Enable', 'bp-album'); ?> </label> <label><input type="radio" name="enable_comments" value="0" /><?php _e('Disable', 'bp-album'); ?> </label> <?php _e('If the picture already has comments this will delete them', 'bp-album'); ?> </p> <?php } ?> <input type="submit" name="submit" id="submit" value="<?php _e('Save', 'bp-album'); ?> "/> <?php // This is very important, don't leave it out. wp_nonce_field('bp-album-edit'); ?> </form> <?php } else { ?> <p><?php _e("Either this url is not valid or you can't edit this picture.", 'bp-album'); ?> </p> <?php } }