Version Description
= 7.7.02 =
- This version addresses various minor bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.7.02.004 |
Comparing to | |
See all releases |
Code changes from version 7.7.02.002 to 7.7.02.004
- changelog.txt +3 -3
- wppa-functions.php +13 -13
- wppa-items.php +12 -10
- wppa-slideshow.php +9 -9
- wppa-thumbnails.php +17 -19
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -2,11 +2,11 @@ WP Photo Album Plus Changelog
|
|
2 |
|
3 |
= 7.7.02 =
|
4 |
|
5 |
-
* New setting: Table II-E10: Album id on cover. Places the album id in parenthesis near the album name on album covers. Selectable: 'none' (default), 'If user has
|
6 |
* New setting: Table VI-C14: Album id on cover is link. The album number on the cover links to the album admin page of the album for those users who have the rights to edit the album info.
|
7 |
-
* On the Album Admin page you can now also enter an album id to edit the album directly without the need to
|
|
|
8 |
|
9 |
-
* New setting: Tanle
|
10 |
= 7.7.01 =
|
11 |
|
12 |
* New feature: On the album admin page (Edit album information) one can now overrule the following default settings for the items in the album:
|
2 |
|
3 |
= 7.7.02 =
|
4 |
|
5 |
+
* New setting: Table II-E10: Album id on cover. Places the album id in parenthesis near the album name on album covers. Selectable: 'none' (default), 'If user has edit access', 'Always'.
|
6 |
* New setting: Table VI-C14: Album id on cover is link. The album number on the cover links to the album admin page of the album for those users who have the rights to edit the album info.
|
7 |
+
* On the Album Admin page you can now also enter an album id to edit the album directly without the need to locate the album in the albumtable.
|
8 |
+
* Overruling display options as introduced in 7.7.01 not always worked correctly. Fixed.
|
9 |
|
|
|
10 |
= 7.7.01 =
|
11 |
|
12 |
* New feature: On the album admin page (Edit album information) one can now overrule the following default settings for the items in the album:
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 7.7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2481,7 +2481,8 @@ global $wpdb;
|
|
2481 |
static $user;
|
2482 |
|
2483 |
// Make sure $thumb contains our image data
|
2484 |
-
$thumb
|
|
|
2485 |
|
2486 |
if ( ! $user ) $user = wppa_get_user( 'display' );
|
2487 |
$photo = wppa_get_get( 'photo' );
|
@@ -2497,7 +2498,7 @@ static $user;
|
|
2497 |
}
|
2498 |
|
2499 |
// Find rating
|
2500 |
-
if ( wppa_is_item_displayable(
|
2501 |
|
2502 |
// Find my ( avg ) rating
|
2503 |
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
@@ -2577,7 +2578,7 @@ static $user;
|
|
2577 |
|
2578 |
|
2579 |
// Find comments
|
2580 |
-
$comment = ( wppa_is_item_displayable(
|
2581 |
|
2582 |
// Get the callback url.
|
2583 |
if ( wppa_switch( 'rating_on' ) ) {
|
@@ -2649,7 +2650,7 @@ static $user;
|
|
2649 |
// Name
|
2650 |
$name = '';
|
2651 |
$fullname = '';
|
2652 |
-
$disp = wppa_is_item_displayable(
|
2653 |
if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
|
2654 |
$name = esc_js( wppa_get_photo_name( $id ) );
|
2655 |
if ( ! $name ) {
|
@@ -2681,7 +2682,7 @@ static $user;
|
|
2681 |
|
2682 |
// Make photo desc, filtered
|
2683 |
$desc = '';
|
2684 |
-
if ( ( ! wppa( 'is_slideonly' ) || wppa_is_item_displayable(
|
2685 |
|
2686 |
$desc .= wppa_get_photo_desc( $id, array( 'doshortcodes' => wppa_switch( 'allow_foreign_shortcodes' ), 'dogeo' => true ) ); // Foreign shortcodes is handled here
|
2687 |
|
@@ -5659,17 +5660,16 @@ function wppa_get_lbtitle( $type, $id ) {
|
|
5659 |
|
5660 |
if ( ! is_numeric( $id ) || $id < '1' ) wppa_dbg_msg( 'Invalid arg wppa_get_lbtitle( '.$id.' )', 'red' );
|
5661 |
|
5662 |
-
$thumb
|
|
|
5663 |
|
5664 |
-
$do_download
|
5665 |
if ( $type == 'xphoto' ) $type = 'mphoto';
|
5666 |
|
5667 |
-
$do_name = wppa_is_item_displayable(
|
5668 |
-
$do_desc = wppa_is_item_displayable(
|
5669 |
-
$do_rating = wppa_is_item_displayable(
|
5670 |
|
5671 |
-
// $do_name = wppa_switch( 'ovl_'.$type.'_name' ) || wppa_switch( 'ovl_add_owner' );
|
5672 |
-
// $do_desc = wppa_switch( 'ovl_'.$type.'_desc' );
|
5673 |
$do_sm = wppa_switch( 'share_on_lightbox' );
|
5674 |
|
5675 |
$dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ),
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 7.7.02.004
|
7 |
*
|
8 |
*/
|
9 |
|
2481 |
static $user;
|
2482 |
|
2483 |
// Make sure $thumb contains our image data
|
2484 |
+
$thumb = wppa_cache_thumb( $id );
|
2485 |
+
$alb = $thumb['album'];
|
2486 |
|
2487 |
if ( ! $user ) $user = wppa_get_user( 'display' );
|
2488 |
$photo = wppa_get_get( 'photo' );
|
2498 |
}
|
2499 |
|
2500 |
// Find rating
|
2501 |
+
if ( wppa_is_item_displayable( $alb, 'rating', 'rating_on' ) && ! wppa( 'is_slideonly' ) && ! wppa( 'is_filmonly' ) ) {
|
2502 |
|
2503 |
// Find my ( avg ) rating
|
2504 |
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
2578 |
|
2579 |
|
2580 |
// Find comments
|
2581 |
+
$comment = ( wppa_is_item_displayable( $alb, 'comments', 'show_comments' ) && ! wppa( 'is_filmonly' ) && ! wppa( 'is_slideonly' ) ) ? wppa_comment_html( $id, $comment_allowed ) : 'void';
|
2582 |
|
2583 |
// Get the callback url.
|
2584 |
if ( wppa_switch( 'rating_on' ) ) {
|
2650 |
// Name
|
2651 |
$name = '';
|
2652 |
$fullname = '';
|
2653 |
+
$disp = wppa_is_item_displayable( $alb, 'name', 'show_full_name' );
|
2654 |
if ( $disp && ( ! wppa( 'is_slideonly' ) || wppa( 'name_on' ) ) && ! wppa( 'is_filmonly' ) ) {
|
2655 |
$name = esc_js( wppa_get_photo_name( $id ) );
|
2656 |
if ( ! $name ) {
|
2682 |
|
2683 |
// Make photo desc, filtered
|
2684 |
$desc = '';
|
2685 |
+
if ( ( ! wppa( 'is_slideonly' ) || wppa_is_item_displayable( $alb, 'description', 'desc_on' ) ) && ! wppa( 'is_filmonly' ) ) {
|
2686 |
|
2687 |
$desc .= wppa_get_photo_desc( $id, array( 'doshortcodes' => wppa_switch( 'allow_foreign_shortcodes' ), 'dogeo' => true ) ); // Foreign shortcodes is handled here
|
2688 |
|
5660 |
|
5661 |
if ( ! is_numeric( $id ) || $id < '1' ) wppa_dbg_msg( 'Invalid arg wppa_get_lbtitle( '.$id.' )', 'red' );
|
5662 |
|
5663 |
+
$thumb = wppa_cache_thumb( $id );
|
5664 |
+
$alb = $thumb['album'];
|
5665 |
|
5666 |
+
$do_download = wppa_is_video( $id ) ? false : wppa_switch( 'art_monkey_on_lightbox' );
|
5667 |
if ( $type == 'xphoto' ) $type = 'mphoto';
|
5668 |
|
5669 |
+
$do_name = wppa_is_item_displayable( $alb, 'name', 'ovl_'.$type.'_name' );
|
5670 |
+
$do_desc = wppa_is_item_displayable( $alb, 'description', 'ovl_'.$type.'_desc' );
|
5671 |
+
$do_rating = wppa_is_item_displayable( $alb, 'rating', 'ovl_rating' );
|
5672 |
|
|
|
|
|
5673 |
$do_sm = wppa_switch( 'share_on_lightbox' );
|
5674 |
|
5675 |
$dl_name = wppa_is_pdf( $id ) ? wppa_get_photo_item( $id, 'filename' ) : wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'ovl_add_owner' ),
|
wppa-items.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
-
* Version 7.7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -1065,28 +1065,30 @@ function wppa_get_imagey( $id, $key = 'photo' ) {
|
|
1065 |
}
|
1066 |
|
1067 |
// See if a photo item should be displayed for a given album (enumeration)
|
1068 |
-
function wppa_is_item_displayable( $xalb, $item, $
|
1069 |
static $cache;
|
1070 |
|
1071 |
// Computed this one before?
|
1072 |
-
if ( isset( $cache[$xalb . $item] ) ) return $cache[$xalb . $item];
|
1073 |
|
1074 |
$albs = explode( '.', wppa_expand_enum( $xalb ) );
|
1075 |
|
1076 |
if ( is_array( $albs ) ) {
|
1077 |
foreach( $albs as $alb ) {
|
1078 |
-
if ( _wppa_is_item_displayable( $alb, $item, $
|
1079 |
-
$cache[$xalb . $item] = true;
|
1080 |
-
wppa_log( 'obs', "Function called: wppa_is_item_displayable( $xalb, $item,
|
1081 |
return true;
|
1082 |
}
|
1083 |
}
|
1084 |
}
|
1085 |
-
$cache[$xalb . $item] = false;
|
1086 |
-
wppa_log( 'obs', "Function called: wppa_is_item_displayable( $xalb, $item,
|
1087 |
return false;
|
1088 |
}
|
1089 |
-
function _wppa_is_item_displayable( $alb, $item, $
|
|
|
|
|
1090 |
|
1091 |
if ( in_array( $alb, array( '', '0', '-1' ) ) ) return $default;
|
1092 |
|
@@ -1100,7 +1102,7 @@ function _wppa_is_item_displayable( $alb, $item, $default ) {
|
|
1100 |
return false;
|
1101 |
}
|
1102 |
if ( $default !== true && $default !== false ) {
|
1103 |
-
wppa_log( 'err', 'Default ' . $
|
1104 |
return false;
|
1105 |
}
|
1106 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
+
* Version 7.7.02.004
|
7 |
*
|
8 |
*/
|
9 |
|
1065 |
}
|
1066 |
|
1067 |
// See if a photo item should be displayed for a given album (enumeration)
|
1068 |
+
function wppa_is_item_displayable( $xalb, $item, $default_slug ) {
|
1069 |
static $cache;
|
1070 |
|
1071 |
// Computed this one before?
|
1072 |
+
if ( isset( $cache[$xalb . $item . $default_slug] ) ) return $cache[$xalb . $item . $default_slug];
|
1073 |
|
1074 |
$albs = explode( '.', wppa_expand_enum( $xalb ) );
|
1075 |
|
1076 |
if ( is_array( $albs ) ) {
|
1077 |
foreach( $albs as $alb ) {
|
1078 |
+
if ( _wppa_is_item_displayable( $alb, $item, $default_slug ) ) {
|
1079 |
+
$cache[$xalb . $item . $default_slug] = true;
|
1080 |
+
wppa_log( 'obs', "Function called: wppa_is_item_displayable( $xalb, $item, $default_slug ) returned true" );
|
1081 |
return true;
|
1082 |
}
|
1083 |
}
|
1084 |
}
|
1085 |
+
$cache[$xalb . $item . $default_slug] = false;
|
1086 |
+
wppa_log( 'obs', "Function called: wppa_is_item_displayable( $xalb, $item, $default_slug ) returned false" );
|
1087 |
return false;
|
1088 |
}
|
1089 |
+
function _wppa_is_item_displayable( $alb, $item, $default_slug ) {
|
1090 |
+
|
1091 |
+
$default = wppa_switch( $default_slug );
|
1092 |
|
1093 |
if ( in_array( $alb, array( '', '0', '-1' ) ) ) return $default;
|
1094 |
|
1102 |
return false;
|
1103 |
}
|
1104 |
if ( $default !== true && $default !== false ) {
|
1105 |
+
wppa_log( 'err', 'Default ' . $default_slug . ' not implemted in wppa_is_item_displayable()' );
|
1106 |
return false;
|
1107 |
}
|
1108 |
|
wppa-slideshow.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
-
* Version 7.7.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -592,8 +592,8 @@ function wppa_slide_name_desc( $key = 'optional' ) {
|
|
592 |
else {
|
593 |
// if ( wppa_switch( 'show_full_desc') ) $do_it = true;
|
594 |
// if ( wppa_switch( 'show_full_name') || wppa_switch( 'show_full_owner') ) $do_it = true;
|
595 |
-
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'description',
|
596 |
-
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name',
|
597 |
}
|
598 |
if ( $do_it ) {
|
599 |
wppa_out( '<div' .
|
@@ -624,7 +624,7 @@ function wppa_slide_name_box( $key = 'optional' ) {
|
|
624 |
if ( wppa( 'name_on' ) ) $do_it = true;
|
625 |
}
|
626 |
else {
|
627 |
-
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name',
|
628 |
}
|
629 |
if ( $do_it ) {
|
630 |
wppa_out( '<div' .
|
@@ -668,7 +668,7 @@ function wppa_slide_name($opt = '') {
|
|
668 |
}
|
669 |
else {
|
670 |
if ( $opt == 'optional' ) {
|
671 |
-
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name',
|
672 |
else $doit = false;
|
673 |
}
|
674 |
else $doit = true;
|
@@ -694,7 +694,7 @@ function wppa_slide_description( $opt = '' ) {
|
|
694 |
}
|
695 |
else {
|
696 |
if ( $opt == 'optional' ) {
|
697 |
-
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'description',
|
698 |
else $doit = false;
|
699 |
}
|
700 |
else $doit = true;
|
@@ -809,7 +809,7 @@ function wppa_slide_rating_vote_only( $opt, $id = '0', $is_lightbox = false ) {
|
|
809 |
function wppa_get_slide_rating_vote_only( $opt, $id = '0', $is_lightbox = false ) {
|
810 |
|
811 |
if ( ! $is_lightbox ) {
|
812 |
-
if ( $opt == 'optional' && ! wppa_is_item_displayable( wppa( 'start_album' ), 'rating',
|
813 |
if ( wppa( 'is_slideonly' ) ) return ''; /* Not when slideonly */
|
814 |
if ( is_feed() ) return '';
|
815 |
}
|
@@ -930,7 +930,7 @@ function wppa_get_slide_rating_vote_only( $opt, $id = '0', $is_lightbox = false
|
|
930 |
function wppa_slide_rating_range( $opt ) {
|
931 |
|
932 |
// On a slide: depending on slide visibility settings
|
933 |
-
if ( $opt == 'optional' && ! wppa_is_item_displayable( wppa( 'start_album' ), 'rating',
|
934 |
return '';
|
935 |
}
|
936 |
|
@@ -1703,7 +1703,7 @@ function wppa_comments( $opt = '' ) {
|
|
1703 |
|
1704 |
$do_it = false;
|
1705 |
if ( $opt != 'optional' ) $do_it = true;
|
1706 |
-
if ( ! wppa( 'is_slideonly' ) && wppa_is_item_displayable( wppa( 'start_album' ), 'comments',
|
1707 |
|
1708 |
if ( $do_it ) {
|
1709 |
wppa_out( '<div' .
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains all the slideshow high level functions
|
6 |
+
* Version 7.7.02.004
|
7 |
*
|
8 |
*/
|
9 |
|
592 |
else {
|
593 |
// if ( wppa_switch( 'show_full_desc') ) $do_it = true;
|
594 |
// if ( wppa_switch( 'show_full_name') || wppa_switch( 'show_full_owner') ) $do_it = true;
|
595 |
+
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'description', 'show_full_desc' ) ) $do_it = true;
|
596 |
+
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name', 'show_full_name' ) || wppa_switch( 'show_full_owner') ) $do_it = true;
|
597 |
}
|
598 |
if ( $do_it ) {
|
599 |
wppa_out( '<div' .
|
624 |
if ( wppa( 'name_on' ) ) $do_it = true;
|
625 |
}
|
626 |
else {
|
627 |
+
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name', 'show_full_name' ) || wppa_switch( 'show_full_owner' ) ) $do_it = true;
|
628 |
}
|
629 |
if ( $do_it ) {
|
630 |
wppa_out( '<div' .
|
668 |
}
|
669 |
else {
|
670 |
if ( $opt == 'optional' ) {
|
671 |
+
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'name', 'show_full_name' ) || wppa_switch( 'show_full_owner' ) ) $doit = true;
|
672 |
else $doit = false;
|
673 |
}
|
674 |
else $doit = true;
|
694 |
}
|
695 |
else {
|
696 |
if ( $opt == 'optional' ) {
|
697 |
+
if ( wppa_is_item_displayable( wppa( 'start_album' ), 'description', 'show_full_desc' ) ) $doit = true;
|
698 |
else $doit = false;
|
699 |
}
|
700 |
else $doit = true;
|
809 |
function wppa_get_slide_rating_vote_only( $opt, $id = '0', $is_lightbox = false ) {
|
810 |
|
811 |
if ( ! $is_lightbox ) {
|
812 |
+
if ( $opt == 'optional' && ! wppa_is_item_displayable( wppa( 'start_album' ), 'rating', 'rating_on' ) ) return;
|
813 |
if ( wppa( 'is_slideonly' ) ) return ''; /* Not when slideonly */
|
814 |
if ( is_feed() ) return '';
|
815 |
}
|
930 |
function wppa_slide_rating_range( $opt ) {
|
931 |
|
932 |
// On a slide: depending on slide visibility settings
|
933 |
+
if ( $opt == 'optional' && ! wppa_is_item_displayable( wppa( 'start_album' ), 'rating', 'rating_on' ) ) {
|
934 |
return '';
|
935 |
}
|
936 |
|
1703 |
|
1704 |
$do_it = false;
|
1705 |
if ( $opt != 'optional' ) $do_it = true;
|
1706 |
+
if ( ! wppa( 'is_slideonly' ) && wppa_is_item_displayable( wppa( 'start_album' ), 'comments', 'show_comments' ) && ! wppa_in_widget() ) $do_it = true;
|
1707 |
|
1708 |
if ( $do_it ) {
|
1709 |
wppa_out( '<div' .
|
wppa-thumbnails.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
-
* Version 7.7.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -27,16 +27,17 @@ global $wpdb;
|
|
27 |
|
28 |
// Initialize
|
29 |
$result = '';
|
30 |
-
$mocc
|
31 |
|
32 |
// Encrypted photo id
|
33 |
-
$xid
|
34 |
|
35 |
// Get the photo info
|
36 |
-
$thumb
|
37 |
|
38 |
// Get the album info
|
39 |
-
$
|
|
|
40 |
|
41 |
global $wppa;
|
42 |
if ( isset( $wppa['current_album'] ) ) {
|
@@ -612,15 +613,12 @@ global $wpdb;
|
|
612 |
}
|
613 |
|
614 |
// Name
|
615 |
-
if ( wppa_is_item_displayable(
|
616 |
$result .= '<div' .
|
617 |
' class="wppa-thumb-text"' .
|
618 |
' style="'.wppa_wcs( 'wppa-thumb-text' ).'"' .
|
619 |
' >' .
|
620 |
-
wppa_get_photo_name( $id,
|
621 |
-
array( 'addowner' => wppa_switch( 'thumb_text_owner' ),
|
622 |
-
'showname' => wppa_is_item_displayable( wppa_get_photo_item( $id, 'album' ), 'name', wppa_switch( 'thumb_text_name' ), 'get_thumb_default' ) )
|
623 |
-
) .
|
624 |
'</div>';
|
625 |
}
|
626 |
|
@@ -720,7 +718,7 @@ global $wpdb;
|
|
720 |
}
|
721 |
|
722 |
// Description
|
723 |
-
if ( wppa_is_item_displayable(
|
724 |
$thumb['status'] == 'pending' ||
|
725 |
$thumb['status'] == 'scheduled' ) {
|
726 |
$desc = '';
|
@@ -745,7 +743,7 @@ global $wpdb;
|
|
745 |
}
|
746 |
|
747 |
// Rating
|
748 |
-
if ( wppa_is_item_displayable(
|
749 |
$rating = wppa_get_rating_by_id( $id );
|
750 |
if ( $rating && wppa_switch( 'show_rating_count' ) ) $rating .= ' ( '.wppa_get_rating_count_by_id( $id ).' )';
|
751 |
$result .= '<div' .
|
@@ -756,7 +754,7 @@ global $wpdb;
|
|
756 |
}
|
757 |
|
758 |
// Comcount
|
759 |
-
if ( wppa_is_item_displayable(
|
760 |
$comcount = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments
|
761 |
WHERE photo = %d", $id ) );
|
762 |
if ( $comcount ) {
|
@@ -1575,22 +1573,22 @@ global $wpdb;
|
|
1575 |
function wppa_get_masonry_title( $id ) {
|
1576 |
|
1577 |
$result = '';
|
1578 |
-
$thumb
|
|
|
1579 |
|
1580 |
// Name
|
1581 |
-
if ( wppa_is_item_displayable(
|
1582 |
-
$result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'thumb_text_owner' )
|
1583 |
-
'showname' => wppa_is_item_displayable( wppa_get_photo_item( $id, 'album' ), 'name', wppa_switch( 'thumb_text_name' ), 'get_masonry_title' ) ) ) . "\n";
|
1584 |
}
|
1585 |
|
1586 |
// Description
|
1587 |
-
if ( wppa_is_item_displayable(
|
1588 |
$thumb['status'] == 'pending' || $thumb['status'] == 'scheduled' ) {
|
1589 |
$result .= wppa_get_photo_desc( $id, array( 'doshortcodes' => wppa_switch( 'allow_foreign_shortcodes_thumbs' ) ) ) . "\n";
|
1590 |
}
|
1591 |
|
1592 |
// Rating
|
1593 |
-
if ( wppa_is_item_displayable(
|
1594 |
$rating = wppa_get_rating_by_id( $id );
|
1595 |
if ( $rating && wppa_switch( 'show_rating_count' ) ) {
|
1596 |
$result .= ' ( '.wppa_get_rating_count_by_id( $id ).' )' . "\n";
|
5 |
* Various funcions to display a thumbnail image
|
6 |
* Contains all possible frontend thumbnail types
|
7 |
*
|
8 |
+
* Version 7.7.02.004
|
9 |
*
|
10 |
*/
|
11 |
|
27 |
|
28 |
// Initialize
|
29 |
$result = '';
|
30 |
+
$mocc = wppa( 'mocc' );
|
31 |
|
32 |
// Encrypted photo id
|
33 |
+
$xid = wppa_encrypt_photo( $id );
|
34 |
|
35 |
// Get the photo info
|
36 |
+
$thumb = wppa_cache_thumb( $id );
|
37 |
|
38 |
// Get the album info
|
39 |
+
$alb = $thumb['album'];
|
40 |
+
$album = wppa_cache_album( $alb );
|
41 |
|
42 |
global $wppa;
|
43 |
if ( isset( $wppa['current_album'] ) ) {
|
613 |
}
|
614 |
|
615 |
// Name
|
616 |
+
if ( wppa_is_item_displayable( $alb, 'name', 'thumb_text_name' ) ) {
|
617 |
$result .= '<div' .
|
618 |
' class="wppa-thumb-text"' .
|
619 |
' style="'.wppa_wcs( 'wppa-thumb-text' ).'"' .
|
620 |
' >' .
|
621 |
+
wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'thumb_text_owner' ) ) ) .
|
|
|
|
|
|
|
622 |
'</div>';
|
623 |
}
|
624 |
|
718 |
}
|
719 |
|
720 |
// Description
|
721 |
+
if ( wppa_is_item_displayable( $alb, 'description', 'thumb_text_desc' ) ||
|
722 |
$thumb['status'] == 'pending' ||
|
723 |
$thumb['status'] == 'scheduled' ) {
|
724 |
$desc = '';
|
743 |
}
|
744 |
|
745 |
// Rating
|
746 |
+
if ( wppa_is_item_displayable( $alb, 'rating', 'thumb_text_rating' ) ) {
|
747 |
$rating = wppa_get_rating_by_id( $id );
|
748 |
if ( $rating && wppa_switch( 'show_rating_count' ) ) $rating .= ' ( '.wppa_get_rating_count_by_id( $id ).' )';
|
749 |
$result .= '<div' .
|
754 |
}
|
755 |
|
756 |
// Comcount
|
757 |
+
if ( wppa_is_item_displayable( $alb, 'comments', 'thumb_text_comcount' ) ) {
|
758 |
$comcount = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->wppa_comments
|
759 |
WHERE photo = %d", $id ) );
|
760 |
if ( $comcount ) {
|
1573 |
function wppa_get_masonry_title( $id ) {
|
1574 |
|
1575 |
$result = '';
|
1576 |
+
$thumb = wppa_cache_thumb( $id );
|
1577 |
+
$alb = $thumb['album'];
|
1578 |
|
1579 |
// Name
|
1580 |
+
if ( wppa_is_item_displayable( $alb, 'name', 'thumb_text_name' ) ) {
|
1581 |
+
$result .= wppa_get_photo_name( $id, array( 'addowner' => wppa_switch( 'thumb_text_owner' ) ) ) . "\n";
|
|
|
1582 |
}
|
1583 |
|
1584 |
// Description
|
1585 |
+
if ( wppa_is_item_displayable( $alb, 'description', 'thumb_text_desc' ) ||
|
1586 |
$thumb['status'] == 'pending' || $thumb['status'] == 'scheduled' ) {
|
1587 |
$result .= wppa_get_photo_desc( $id, array( 'doshortcodes' => wppa_switch( 'allow_foreign_shortcodes_thumbs' ) ) ) . "\n";
|
1588 |
}
|
1589 |
|
1590 |
// Rating
|
1591 |
+
if ( wppa_is_item_displayable( $alb, 'rating', 'thumb_text_rating' ) ) {
|
1592 |
$rating = wppa_get_rating_by_id( $id );
|
1593 |
if ( $rating && wppa_switch( 'show_rating_count' ) ) {
|
1594 |
$result .= ' ( '.wppa_get_rating_count_by_id( $id ).' )' . "\n";
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 7.7.02.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7701'; // WPPA db version
|
27 |
-
global $wppa_api_version; $wppa_api_version = '7.7.02.
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.7.02.004
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_revno; $wppa_revno = '7701'; // WPPA db version
|
27 |
+
global $wppa_api_version; $wppa_api_version = '7.7.02.004'; // WPPA software version
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|