Exemple #1
0
$images_per_row = 5;
// STEP 1: Run the query.
bp_album_query_pictures($args);
$row_count = 0;
// STEP 2: Check items were found. If so, open the CSS block.
if (bp_album_has_pictures()) {
    ?>

	    <div class="bpa-content-wrap" id="default">

		<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) {
function bp_album_screen_single_image()
{
    ?>
	<?php 
    if (bp_album_has_pictures()) {
        bp_album_the_picture();
        ?>



		<div class="picture-single">

			<div class="single-picture-links"><?php 
        bp_album_adjacent_links();
        ?>
</div>
			<h3><?php 
        bp_album_picture_title();
        ?>
</h3>
        	<div class="picture-outer-container">
        		<div class="picture-inner-container">
	                <div class="picture-middle">
		                <img src="<?php 
        bp_album_picture_middle_url();
        ?>
" />
	                </div>
                </div>
            </div>



			<p class="picture-description"><?php 
        bp_album_picture_desc();
        ?>
</p>

            <div class="single-picture-meta">
            	<div class="picture-edit-link"><?php 
        bp_album_picture_edit_link();
        ?>
</div>
            	<div class="picture-delete-link"><?php 
        bp_album_picture_delete_link();
        ?>
</div>
            </div>
         </div>
         <div class="activity">
		<?php 
        bp_album_load_subtemplate(apply_filters('bp_album_template_screen_comments', 'album/comments'));
        ?>
         </div>


			<?php 
    } else {
        ?>

		<div id="message" class="info activity">
			<p><?php 
        echo bp_word_or_name(__("This url is not valid.", 'bp-album'), __("Either this url is not valid or picture has restricted access.", 'bp-album'), false, false);
        ?>
</p>
		</div>

	<?php 
    }
    ?>

<?php 
}
Exemple #3
0
					</ul>
				</div>
			</div>

			<div id="item-body">

				<div class="item-list-tabs no-ajax" id="subnav">
					<ul>
						<?php 
bp_get_options_nav();
?>
					</ul>
				</div>

					<?php 
if (bp_album_has_pictures()) {
    bp_album_the_picture();
    ?>

				<div class="picture-single activity">
					<h3><?php 
    bp_album_picture_title();
    ?>
</h3>

                	<div class="picture-outer-container">
                		<div class="picture-inner-container">
			                <div class="picture-middle">
				                <img src="<?php 
    bp_album_picture_middle_url();
    ?>
Exemple #4
0
/**
 * 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 
    }
}