WP Photo Album Plus - Version 8.0.05.002

Version Description

= 8.0.05 =

  • This version addresses various minor bug fixes and feature requests.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 8.0.05.002
Comparing to
See all releases

Code changes from version 8.0.04.007 to 8.0.05.002

changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 8.0.04 =
4
 
5
  * Settings page will no longer crash when the php implementation does not support the exec() command.
@@ -13,7 +24,7 @@ WP Photo Album Plus Changelog
13
  * Mailing unsubscribe links failed. Fixed.
14
  * Improved algorithm to clear non-wppa caches.
15
  * Corrected and extended helptext in titles (balloons) on the Album Admin -> Edit Album Information page.
16
- * Hotfix 8.0.04.007: Current values of input and selectionoxis did not show up on the settings page. Fixed.
17
 
18
  = 8.0.03 =
19
 
1
  WP Photo Album Plus Changelog
2
 
3
+ = 8.0.05 =
4
+
5
+ * New shortcode type: grid. New attribute photos. Typical use: [wppa type="grid" photos="1.2.5..19"] [wppa type="grid" album="5"] optionally size= and align=.
6
+ * New setting: Basic settings -> Links -> II: Links from standard images -> Item 8: Grid. Grid photo link.
7
+ * New setting: Basic settings -> Misc -> I: Miscellaneous settings -> Item 9: Grid video controls. Show the video controms on a video in a grid display.
8
+ * New setting: Basic settings -> Search -> I: Search albums and photos features related settings -> Item 35: Show empty search. Display empty search message.
9
+ * Fixed a fatal error on the Album admin pages, that happened only when not admin and photo order restricted.
10
+ * Basic settings -> Misc -> I -> Item 3: Default coverphoto selection, has an extra checkbox named Fix first found. This shows only when a random methid is selected.
11
+ When checked, the first found will be registered as fixed cover image.
12
+ * Dropped the selection item Compressed for pretty links as it often does not work correctly.
13
+
14
  = 8.0.04 =
15
 
16
  * Settings page will no longer crash when the php implementation does not support the exec() command.
24
  * Mailing unsubscribe links failed. Fixed.
25
  * Improved algorithm to clear non-wppa caches.
26
  * Corrected and extended helptext in titles (balloons) on the Album Admin -> Edit Album Information page.
27
+ * Hotfix 8.0.04.007: Current values of input and selections did not show up on the settings page. Fixed.
28
 
29
  = 8.0.03 =
30
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.5
8
- Stable tag: 8.0.04.006
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -134,7 +134,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
134
 
135
  == Upgrade Notice ==
136
 
137
- = 8.0.04 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
5
  Requires at least: 3.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.5
8
+ Stable tag: 8.0.04.007
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
134
 
135
  == Upgrade Notice ==
136
 
137
+ = 8.0.05 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 8.0.04.005
7
  *
8
  */
9
 
@@ -780,9 +780,9 @@ global $wppa_revno;
780
 
781
  $df = wppa_opt( 'list_albums_by' );
782
  if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
783
- else foreach( array_keys( $values ) as $key ) {
784
- if ( $df == $values[$key] ) {
785
- $dflt = $options[$key];
786
  }
787
  }
788
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
780
 
781
  $df = wppa_opt( 'list_albums_by' );
782
  if ( $df == '0' ) $dflt = __( 'not specified', 'wp-photo-album-plus' );
783
+ else foreach( array_keys( $vals ) as $key ) {
784
+ if ( $df == $vals[$key] ) {
785
+ $dflt = $opts[$key];
786
  }
787
  }
788
 
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 8.0.00.019
7
  *
8
  */
9
 
@@ -1394,9 +1394,27 @@ global $wpdb;
1394
 
1395
  // get id of coverphoto. does all testing
1396
  function wppa_get_coverphoto_id( $xalb = '' ) {
 
 
 
 
 
 
 
 
 
 
 
1397
  $result = wppa_get_coverphoto_ids( $xalb, '1' );
1398
 
1399
- if ( empty( $result ) ) return false;
 
 
 
 
 
 
 
1400
  return $result['0'];
1401
  }
1402
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
1394
 
1395
  // get id of coverphoto. does all testing
1396
  function wppa_get_coverphoto_id( $xalb = '' ) {
1397
+
1398
+ $save_it = false;
1399
+
1400
+ if ( wppa_switch( 'main_photo_random_once' ) ) {
1401
+ $m_id = wppa_get_album_item( $xalb, 'main_photo' );
1402
+ if ( $m_id == '0' ) $m_id = wppa_opt( 'main_photo' );
1403
+ if ( $m_id == '-3' || $m_id == '-9' ) {
1404
+ $save_it = true;
1405
+ }
1406
+ }
1407
+
1408
  $result = wppa_get_coverphoto_ids( $xalb, '1' );
1409
 
1410
+ if ( empty( $result ) ) {
1411
+ return false;
1412
+ }
1413
+
1414
+ if ( $save_it ) {
1415
+ wppa_update_album( array( 'id' => $xalb, 'main_photo' => $result['0'] ) );
1416
+ wppa_log( 'obs', 'Cover photo of album ' . $xalb . ' set to ' . $result['0'] );
1417
+ }
1418
  return $result['0'];
1419
  }
1420
 
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 8.0.04.004
7
  *
8
  */
9
 
@@ -6524,3 +6524,328 @@ global $wppa_lang;
6524
  ' />';
6525
  wppa_out( $result );
6526
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
6524
  ' />';
6525
  wppa_out( $result );
6526
  }
6527
+
6528
+ // Grid of photos display
6529
+ function wppa_grid_box() {
6530
+
6531
+ // Open container
6532
+ wppa_container( 'open' );
6533
+
6534
+ // Init
6535
+ $result = '';
6536
+ $mocc = wppa( 'mocc' );
6537
+ $maxh = wppa_opt( 'area_size' );
6538
+ $nice = wppa_switch( 'nicescroll' ) && ! wppa_is_mobile();
6539
+ $overflow = 'visible';
6540
+ if ( $maxh ) {
6541
+ if ( $nice ) $overflow = 'hidden';
6542
+ else $overflow = 'auto';
6543
+ }
6544
+
6545
+ // Open grid box
6546
+ if ( is_feed() ) {
6547
+ $result .= '
6548
+ <div
6549
+ id="wppa-thumb-area-' . $mocc . '"
6550
+ class="wppa-box wppa-thumb-area"
6551
+ >';
6552
+ }
6553
+ else {
6554
+ $result .= '
6555
+ <div
6556
+ id="wppa-thumb-area-' . $mocc . '"
6557
+ class="wppa-box wppa-contest wppa-thumb-area wppa-thumb-area-' . $mocc . '"
6558
+ style="' . ( $maxh > '1' ? 'max-height:' . $maxh . 'px;' : '' ) . '
6559
+ overflow:' . $overflow . ';"
6560
+ onscroll="wppaMakeLazyVisibleScrollEnd();"
6561
+ >';
6562
+ }
6563
+
6564
+ // Use nicescroller?
6565
+ if ( $nice ) {
6566
+ $result .= '<div class="wppa-nicewrap" >';
6567
+ }
6568
+
6569
+ // Find the photos to display
6570
+ $photos = wppa_get_thumbs();
6571
+
6572
+ // Get the html
6573
+ if ( is_array( $photos ) && count( $photos ) ) {
6574
+ $result .= wppa_get_grid_box_html( $photos );
6575
+ }
6576
+
6577
+ // After grid
6578
+ $result .= '<div class="wppa-clear" ></div>';
6579
+
6580
+ // Nicescroller
6581
+ if ( $nice ) {
6582
+ $result .= '
6583
+ <script>
6584
+ jQuery(document).ready(function(){
6585
+ jQuery(".wppa-thumb-area").niceScroll(".wppa-nicewrap",{' . wppa_opt( 'nicescroll_opts' ) . '});
6586
+ });
6587
+ </script>
6588
+ </div>'; // close .wppa-nicewrap div
6589
+ }
6590
+
6591
+ // Close the box
6592
+ $result .= '</div>';
6593
+
6594
+ // Output result
6595
+ wppa_out( $result );
6596
+
6597
+ // Close container
6598
+ wppa_container( 'close' );
6599
+ }
6600
+ function wppa_get_grid_box_html( $photos ) {
6601
+
6602
+ // Init
6603
+ $cols = wppa( 'gridcols' );
6604
+ $size = 100 / $cols . '%';
6605
+ $mocc = wppa( 'mocc' );
6606
+
6607
+ // Local styles
6608
+ $result = '
6609
+ <style>
6610
+ .wppa-grid {
6611
+ border:none;
6612
+ margin:0;
6613
+ padding:0;
6614
+ margin-left:-3px;
6615
+ }
6616
+ .wppa-grid tr {
6617
+ border:none;
6618
+ }
6619
+ .wppa-grid-' . $mocc . ' td {
6620
+ border:none;
6621
+ padding:6px;
6622
+ vertical-align:middle;
6623
+ width:' . $size . ';
6624
+ }
6625
+ </style>';
6626
+
6627
+ // Open table
6628
+ $result .= '
6629
+ <table class="wppa-grid wppa-grid-' . $mocc . '" >';
6630
+
6631
+ // Define equally spaced columns
6632
+ $result .= '
6633
+ <colgroup>';
6634
+ $i = 0;
6635
+ while( $i < $cols ) {
6636
+ $result .= '
6637
+ <col style="width:' . $size . '" > ';
6638
+ $i++;
6639
+ }
6640
+ $result .= '
6641
+ </colgroup>';
6642
+
6643
+ $style = '';
6644
+ $i = 0;
6645
+ foreach( $photos as $item ) {
6646
+
6647
+ // The id
6648
+ $id = $item['id'];
6649
+
6650
+ // Open row
6651
+ if ( $i == 0 ) {
6652
+ $result .= '<tr>';
6653
+ }
6654
+
6655
+ // The item
6656
+ $result .= '
6657
+ <td>' .
6658
+ wppa_get_grid_image_html( $id ) . '
6659
+ </td>';
6660
+
6661
+ // Test for end of row
6662
+ $i++;
6663
+ if ( $i == $cols ) {
6664
+ $result .= '</tr>';
6665
+ $i = 0;
6666
+ }
6667
+ }
6668
+
6669
+ // Fill up last row optionally
6670
+ if ( $i != 0 ) {
6671
+ while( $i != $cols ) {
6672
+ $result .= '<td></td>';
6673
+ $i++;
6674
+ }
6675
+ $result .= '
6676
+ </tr>';
6677
+ }
6678
+
6679
+ // Close table
6680
+ $result .= '
6681
+ </table>';
6682
+
6683
+ return $result;
6684
+ }
6685
+
6686
+ function wppa_get_grid_image_html( $id ) {
6687
+
6688
+ // Get photo data
6689
+ $photo = wppa_cache_thumb( $id );
6690
+
6691
+ // Get link
6692
+ $link = wppa_get_imglnk_a( 'grid', $id );
6693
+
6694
+ // Encrypted photo id
6695
+ $xid = wppa_encrypt_photo( $id );
6696
+
6697
+ // Get occurrance
6698
+ $mocc = wppa( 'mocc' );
6699
+
6700
+ // Find image attributes
6701
+ $imgsrc = wppa_get_photo_path( $id );
6702
+ $cursor = 'pointer';
6703
+ $is_video = wppa_is_video( $id );
6704
+ $has_audio = wppa_has_audio( $id );
6705
+ $is_pdf = wppa_is_pdf( $id );
6706
+ $imgurl = wppa_get_photo_url( $id );
6707
+ $imgalt = wppa_get_imgalt( $id );
6708
+ $imgstyle = 'max-width:100%;';
6709
+ $title = '';
6710
+ $target = '';
6711
+
6712
+ $result = '';
6713
+
6714
+ // Link?
6715
+ if ( $link ) {
6716
+
6717
+ $title = $link['title']; //wppa_get_photo_name( $id );
6718
+ $target = $link['target'];
6719
+
6720
+ // Is link an url?
6721
+ if ( $link['is_url'] ) {
6722
+
6723
+ // The a img
6724
+ if ( $link['ajax_url'] ) {
6725
+ $result .= '<a style="position:static;" onclick="wppaDoAjaxRender('.$mocc.', \''.$link['ajax_url'].'\', \''.$link['url'].'\');" class="grid-img" id="x-'.$xid.'-'.$mocc.'" >';
6726
+ }
6727
+ else {
6728
+ $result .= '<a style="position:static;" href="'.$link['url'].'" target="'.$link['target'].'" class="grid-img" id="x-'.$xid.'-'.$mocc.'" >';
6729
+ }
6730
+ if ( $is_video ) {
6731
+ $result .= wppa_get_video_html( array(
6732
+ 'id' => $id,
6733
+ 'controls' => wppa_switch( 'grid_video' ),
6734
+ 'margin_top' => '0',
6735
+ 'margin_bottom' => '0',
6736
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
6737
+ 'cursor' => 'cursor:pointer;',
6738
+ 'title' => $title,
6739
+ 'preload' => 'metadata',
6740
+ 'onclick' => '',
6741
+ 'lb' => false,
6742
+ 'class' => '',
6743
+ 'style' => $imgstyle
6744
+ ));
6745
+ }
6746
+ else {
6747
+ $result .= '
6748
+ <img
6749
+ id="i-' . $xid . '-' . $mocc . '"' .
6750
+ ( wppa_lazy() ? ' data-' : ' ' ) . 'src="' . $imgurl . '" ' .
6751
+ $imgalt .
6752
+ ( $title ? ' title="' . $title . '"' : '' ) . '
6753
+ style="' . $imgstyle . ' cursor:pointer;"
6754
+ />';
6755
+ }
6756
+
6757
+ // Close the img non ajax
6758
+ $result .= '</a>';
6759
+ }
6760
+
6761
+ // Link is not an url. link is lightbox ?
6762
+ elseif ( $link['is_lightbox'] ) {
6763
+
6764
+ $title = wppa_get_lbtitle( 'grid', $id );
6765
+
6766
+ // The a img
6767
+ $result .= '<a href="'.$link['url'].'" target="'.$link['target'] . '"' .
6768
+ ' data-id="' . wppa_encrypt_photo( $id ) . '"' .
6769
+ ( $is_video ? ' data-videohtml="' . esc_attr( wppa_get_video_body( $id ) ) . '"' .
6770
+ ' data-videonatwidth="'.wppa_get_videox( $id ) . '"' .
6771
+ ' data-videonatheight="'.wppa_get_videoy( $id ) . '"' : '' ) .
6772
+ ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
6773
+ ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
6774
+ ' data-rel="wppa[occ'.$mocc.']"' .
6775
+ ' ' . 'data-lbtitle' . '="'.$title.'" ' .
6776
+ wppa_get_lb_panorama_full_html( $id ) .
6777
+ ' class="grid-img" id="x-'.$xid.'-'.$mocc.'"' .
6778
+ ' data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"' .
6779
+ ' onclick="return false;"' .
6780
+ ' style="cursor:' . wppa_wait() . ';"' .
6781
+ ' >';
6782
+ if ( $is_video ) {
6783
+ $result .= wppa_get_video_html( array(
6784
+ 'id' => $id,
6785
+ 'controls' => false,
6786
+ 'margin_top' => '0',
6787
+ 'margin_bottom' => '0',
6788
+ 'tagid' => 'i-'.$xid.'-'.$mocc,
6789
+ 'cursor' => $cursor,
6790
+ 'title' => wppa_zoom_in( $id ),
6791
+ 'preload' => 'metadata',
6792
+ 'onclick' => '',
6793
+ 'lb' => false,
6794
+ 'class' => '',
6795
+ 'style' => $imgstyle
6796
+ ));
6797
+ }
6798
+ else {
6799
+ $title = wppa_zoom_in( $id );
6800
+ $result .= '
6801
+ <img
6802
+ id="i-' . $xid . '-' . $mocc . '"' .
6803
+ ( wppa_lazy() ? ' data-' : ' ' ) . 'src="' . $imgurl . '" ' .
6804
+ $imgalt . '
6805
+ title="' . esc_attr( $title ) . '"
6806
+ style="' . $imgstyle . $cursor . '"
6807
+ />';
6808
+ }
6809
+
6810
+ // Close the a img
6811
+ $result .= '</a>';
6812
+ }
6813
+
6814
+ // Unsupported
6815
+ wppa_log( 'err', 'Unsupported linktype in wppa_get_grid_image_html() ' . var_export( $link, true ) );
6816
+ }
6817
+
6818
+ // No link
6819
+ else { // no link
6820
+
6821
+ if ( $is_video ) {
6822
+ $result .= wppa_get_video_html( array(
6823
+ 'id' => $id,
6824
+ 'controls' => wppa_switch( 'grid_video' ),
6825
+ 'margin_top' => '0',
6826
+ 'margin_bottom' => '0',
6827
+ 'tagid' => 'i-'.$id.'-'.$mocc,
6828
+ 'cursor' => '',
6829
+ 'title' => $title,
6830
+ 'preload' => 'metadata',
6831
+ 'onclick' => '',
6832
+ 'lb' => false,
6833
+ 'class' => '',
6834
+ 'style' => $imgstyle
6835
+ ));
6836
+ }
6837
+ else {
6838
+ $result .= '
6839
+ <img
6840
+ id="i-' . $xid . '-' . $mocc . '"' .
6841
+ ( wppa_lazy() ? ' data-' : ' ' ) . 'src="' . $imgurl . '" ' .
6842
+ $imgalt . '
6843
+ style="' . $imgstyle . '"
6844
+ title="' . esc_attr( $title ) . '"
6845
+ />';
6846
+ }
6847
+ }
6848
+
6849
+ return $result;
6850
+
6851
+ }
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 8.0.04.004
6
  *
7
  */
8
 
@@ -276,6 +276,9 @@ global $wppa_current_shortcode_atts;
276
  'delayerror' => '',
277
  'is_potdhis' => false,
278
  'is_contest' => false,
 
 
 
279
 
280
  );
281
  }
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 8.0.05.001
6
  *
7
  */
8
 
276
  'delayerror' => '',
277
  'is_potdhis' => false,
278
  'is_contest' => false,
279
+ 'start_photos' => '',
280
+ 'is_grid' => false,
281
+ 'gridcols' => '1',
282
 
283
  );
284
  }
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 8.0.04.002
7
  *
8
  */
9
 
@@ -276,6 +276,8 @@ horizrailenabled:false,";
276
  'wppa_edit_thumb' => 'yes', // II-D17
277
  'wppa_upload_link_thumbs' => 'bottom',
278
 
 
 
279
  // D Covers
280
  'wppa_show_cover_text' => 'yes', // 1
281
  'wppa_enable_slideshow' => 'yes', // 2
@@ -554,6 +556,7 @@ horizrailenabled:false,";
554
  // D Albums and covers
555
  'wppa_list_albums_by' => '0',
556
  'wppa_main_photo' => '-9',
 
557
  'wppa_coverphoto_pos' => 'right',
558
  'wppa_use_cover_opacity' => 'yes',
559
  'wppa_cover_opacity' => '85',
@@ -668,6 +671,11 @@ horizrailenabled:false,";
668
  'wppa_font_calendar_by_bold' => 'no',
669
 
670
  // Table VI: Links
 
 
 
 
 
671
  'wppa_sphoto_linktype' => 'photo',
672
  'wppa_sphoto_linkpage' => '0',
673
  'wppa_sphoto_blank' => 'no',
@@ -770,6 +778,8 @@ horizrailenabled:false,";
770
 
771
  'wppa_supersearch_linkpage' => '0',
772
 
 
 
773
  'wppa_album_navigator_widget_linktype' => 'thumbs',
774
  'wppa_album_navigator_widget_linkpage' => '0',
775
  'wppa_album_navigator_widget_blank' => 'no',
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
276
  'wppa_edit_thumb' => 'yes', // II-D17
277
  'wppa_upload_link_thumbs' => 'bottom',
278
 
279
+ 'wppa_grid_video' => 'no',
280
+
281
  // D Covers
282
  'wppa_show_cover_text' => 'yes', // 1
283
  'wppa_enable_slideshow' => 'yes', // 2
556
  // D Albums and covers
557
  'wppa_list_albums_by' => '0',
558
  'wppa_main_photo' => '-9',
559
+ 'wppa_main_photo_random_once' => 'no',
560
  'wppa_coverphoto_pos' => 'right',
561
  'wppa_use_cover_opacity' => 'yes',
562
  'wppa_cover_opacity' => '85',
671
  'wppa_font_calendar_by_bold' => 'no',
672
 
673
  // Table VI: Links
674
+ 'wppa_grid_linktype' => 'photo',
675
+ 'wppa_grid_linkpage' => '0',
676
+ 'wppa_grid_blank' => 'no',
677
+ 'wppa_grid_overrule' => 'no',
678
+
679
  'wppa_sphoto_linktype' => 'photo',
680
  'wppa_sphoto_linkpage' => '0',
681
  'wppa_sphoto_blank' => 'no',
778
 
779
  'wppa_supersearch_linkpage' => '0',
780
 
781
+ 'wppa_show_empty_search' => 'yes',
782
+
783
  'wppa_album_navigator_widget_linktype' => 'thumbs',
784
  'wppa_album_navigator_widget_linkpage' => '0',
785
  'wppa_album_navigator_widget_blank' => 'no',
wppa-encrypt.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
- * Version 8.0.03.005
7
  *
8
  */
9
 
@@ -79,7 +79,19 @@ function wppa_encrypt_photo( $id ) {
79
  return $id;
80
  }
81
 
82
- // Yes
 
 
 
 
 
 
 
 
 
 
 
 
83
  if ( strlen( $id ) < 12 ) {
84
  $crypt = wppa_get_photo_item( $id, 'crypt' );
85
  }
@@ -159,7 +171,19 @@ global $wpdb;
159
 
160
  // Feature enabled?
161
  if ( ! wppa_switch( 'use_encrypted_links' ) ) {
162
- return intval( $photo );
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
164
 
165
  // Already decrypted?
@@ -308,6 +332,7 @@ function wppa_encrypt_url( $url ) {
308
  }
309
  break;
310
  case 'wppa-photo':
 
311
  case 'photo':
312
  $t['1'] = wppa_encrypt_photo( $t['1'] );
313
  if ( $t['1'] === false ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all ecryption/decryption logic
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
79
  return $id;
80
  }
81
 
82
+ // If enumeration, split
83
+ if ( strpos( $id, '.' ) !== false ) {
84
+ $ids = explode( '.', $id );
85
+ foreach( array_keys( $ids ) as $key ) {
86
+ if ( strlen( $ids[$key] ) ) {
87
+ $ids[$key] = wppa_encrypt_photo( $ids[$key] );
88
+ }
89
+ }
90
+ $crypt = implode( '.', $ids );
91
+ return $crypt;
92
+ }
93
+
94
+ // Encrypt single item
95
  if ( strlen( $id ) < 12 ) {
96
  $crypt = wppa_get_photo_item( $id, 'crypt' );
97
  }
171
 
172
  // Feature enabled?
173
  if ( ! wppa_switch( 'use_encrypted_links' ) ) {
174
+ return $photo;
175
+ }
176
+
177
+ // If enumeration, split
178
+ if ( strpos( $photo, '.' ) !== false ) {
179
+ $photos = explode( '.', $photo );
180
+ foreach( array_keys( $photos ) as $key ) {
181
+ if ( strlen( $photos[$key] ) ) {
182
+ $photos[$key] = wppa_decrypt_photo( $photos[$key] );
183
+ }
184
+ }
185
+ $id = implode( '.', $photos );
186
+ return $id;
187
  }
188
 
189
  // Already decrypted?
332
  }
333
  break;
334
  case 'wppa-photo':
335
+ case 'wppa-photos':
336
  case 'photo':
337
  $t['1'] = wppa_encrypt_photo( $t['1'] );
338
  if ( $t['1'] === false ) {
wppa-filter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
- * Version 8.0.03.003
7
  *
8
  */
9
 
@@ -136,6 +136,7 @@ global $wppa_current_shortcode_atts;
136
  'type' => 'generic',
137
  'album' => '',
138
  'photo' => '',
 
139
  'size' => '',
140
  'align' => '',
141
  'taglist' => '',
@@ -496,6 +497,25 @@ global $wppa_current_shortcode_atts;
496
  $wppa['start_album'] = $atts['album'];
497
  $wppa['is_contest'] = true;
498
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
 
500
  default:
501
  wppa_dbg_msg ( 'Invalid type: ' . htmlentities( $atts['type'] ) . ' in wppa shortcode ' . $wppa_current_shortcode . '.', 'red', 'force' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 8.0.05.001
7
  *
8
  */
9
 
136
  'type' => 'generic',
137
  'album' => '',
138
  'photo' => '',
139
+ 'photos' => '',
140
  'size' => '',
141
  'align' => '',
142
  'taglist' => '',
497
  $wppa['start_album'] = $atts['album'];
498
  $wppa['is_contest'] = true;
499
  break;
500
+ case 'grid':
501
+ $wppa['is_grid'] = true;
502
+ $wppa['photos_only'] = true;
503
+ if ( $atts['photos'] ) {
504
+ $wppa['start_photos'] = $atts['photos'];
505
+ }
506
+ elseif ( $atts['album'] ) {
507
+ $wppa['start_album'] = $atts['album'];
508
+ }
509
+ if ( isset( $atts['cols'] ) ) {
510
+ $cols = explode( ',', $atts['cols'] );
511
+ $col = $cols[0];
512
+ if ( isset( $cols[1] ) && wppa_is_mobile() ) {
513
+ $col = $cols[1];
514
+ }
515
+ if ( ! wppa_is_int( $col ) || $col < '1' ) $col = '2'; // On error use default
516
+ $wppa['gridcols'] = $col;
517
+ }
518
+ break;
519
 
520
  default:
521
  wppa_dbg_msg ( 'Invalid type: ' . htmlentities( $atts['type'] ) . ' in wppa shortcode ' . $wppa_current_shortcode . '.', 'red', 'force' );
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 8.0.04.005
7
  *
8
  */
9
 
@@ -100,9 +100,12 @@ global $wppa_current_shortcode_atts;
100
 
101
  // Test validity of album arg
102
  wppa( 'start_album', wppa_get_get( 'album' ) );
 
103
 
104
  wppa( 'is_cover', wppa_get_get( 'cover' ) );
105
- wppa( 'is_slide', wppa_get_get( 'slide' ) || ( wppa_get_get( 'album' ) !== false && wppa_get_get( 'photo' ) ) );
 
 
106
  if ( wppa_get_get( 'slideonly' ) ) {
107
  wppa( 'is_slide', true );
108
  wppa( 'is_slideonly', true );
@@ -115,6 +118,8 @@ global $wppa_current_shortcode_atts;
115
  }
116
  if ( wppa( 'is_slide' ) ) {
117
  wppa( 'start_photo', wppa_get_get( 'photo' ) ); // Start a slideshow here
 
 
118
  }
119
  else {
120
  wppa( 'single_photo', wppa_get_get( 'photo' ) ); // Photo is the single photoid
@@ -951,6 +956,10 @@ global $wppa_current_shortcode_atts;
951
  elseif ( wppa( 'is_contest' ) ) {
952
  wppa_contest_box();
953
  }
 
 
 
 
954
  // The normal case
955
  else {
956
  if ( function_exists( 'wppa_theme' ) ) {
@@ -968,7 +977,11 @@ global $wppa_current_shortcode_atts;
968
 
969
  // Done
970
  global $wppa_empty_content;
971
- if ( $wppa_empty_content && ! wppa( 'src' ) && ! wppa( 'is_tag' ) && ! wppa( 'supersearch' ) ) {
 
 
 
 
972
  $wppa_empty_content = false;
973
  wppa( 'out', '<!-- Nothing to display, occ = ' . wppa( 'mocc' ) . ' -->' );
974
  }
@@ -1335,6 +1348,23 @@ global $wppa_session;
1335
  // Limit
1336
  $limit_clause = '';
1337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1338
  // Make Album clause if album given
1339
  if ( wppa( 'start_album' ) ) {
1340
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
100
 
101
  // Test validity of album arg
102
  wppa( 'start_album', wppa_get_get( 'album' ) );
103
+ wppa( 'start_photos', wppa_decrypt_photo( wppa_get_get( 'photos' ) ) );
104
 
105
  wppa( 'is_cover', wppa_get_get( 'cover' ) );
106
+
107
+ wppa( 'is_slide', wppa_get_get( 'slide' ) || ( wppa_get_get( 'album' ) !== false && ( wppa_get_get( 'photo' ) || wppa_get_get( 'photos' ) ) ) );
108
+
109
  if ( wppa_get_get( 'slideonly' ) ) {
110
  wppa( 'is_slide', true );
111
  wppa( 'is_slideonly', true );
118
  }
119
  if ( wppa( 'is_slide' ) ) {
120
  wppa( 'start_photo', wppa_get_get( 'photo' ) ); // Start a slideshow here
121
+
122
+ wppa( 'is_grid', false );
123
  }
124
  else {
125
  wppa( 'single_photo', wppa_get_get( 'photo' ) ); // Photo is the single photoid
956
  elseif ( wppa( 'is_contest' ) ) {
957
  wppa_contest_box();
958
  }
959
+ // Is it grid display?
960
+ elseif ( wppa( 'is_grid' ) ) {
961
+ wppa_grid_box();
962
+ }
963
  // The normal case
964
  else {
965
  if ( function_exists( 'wppa_theme' ) ) {
977
 
978
  // Done
979
  global $wppa_empty_content;
980
+ if ( $wppa_empty_content &&
981
+ ( ( ! wppa( 'src' ) && ! wppa( 'is_tag' ) && ! wppa( 'supersearch' ) ) ||
982
+ ( ! wppa_switch( 'show_empty_search' ) )
983
+ )
984
+ ) {
985
  $wppa_empty_content = false;
986
  wppa( 'out', '<!-- Nothing to display, occ = ' . wppa( 'mocc' ) . ' -->' );
987
  }
1348
  // Limit
1349
  $limit_clause = '';
1350
 
1351
+ // Start photos given?
1352
+ if ( wppa( 'start_photos' ) ) {
1353
+ $photos = wppa_expand_enum( wppa( 'start_photos' ) );
1354
+ $ids = explode( '.', $photos );
1355
+ $ids = array_diff( $ids, wppa_get_void_pids() );
1356
+ if ( count( $ids ) ) {
1357
+ $photos = implode( ',', $ids );
1358
+ $query = "SELECT * FROM $wpdb->wppa_photos
1359
+ WHERE id IN ($photos)";
1360
+ $thumbs = wppa_do_get_thumbs_query( $query );
1361
+ }
1362
+ else {
1363
+ $thumbs = false;
1364
+ }
1365
+ return $thumbs;
1366
+ }
1367
+
1368
  // Make Album clause if album given
1369
  if ( wppa( 'start_album' ) ) {
1370
 
wppa-links.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
- * Version 8.0.03.001
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
@@ -457,6 +457,9 @@ function wppa_convert_from_pretty( $uri ) {
457
  case 'ph':
458
  $deltauri = 'wppa-potdhis=';
459
  break;
 
 
 
460
 
461
  default:
462
  $deltauri = '';
@@ -546,6 +549,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
546
  'vt',
547
  'catbox',
548
  'potdhis',
 
549
  );
550
 
551
  $uri = $parts[0] . '?';
@@ -673,6 +677,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
673
  'vt',
674
  'catbox',
675
  'potdhis',
 
676
  );
677
  if ( count($args) > 0 ) {
678
  foreach ( $args as $arg ) {
@@ -714,6 +719,7 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
714
  case 'vt': $newuri .= 'vt'; break;
715
  case 'catbox': $newuri .= 'cb'; break;
716
  case 'potdhis': $newuri .= 'ph'; break;
 
717
  default: wppa_log( 'err', sprintf( 'err', 'Unimplemented code %s encountered in wppa_convert_to_pretty()', $code ) );
718
  }
719
  if ( $val !== false ) {
@@ -724,9 +730,9 @@ function wppa_convert_to_pretty( $xuri, $no_names = false, $overrule = false ) {
724
  }
725
  }
726
 
727
- if ( wppa_opt( 'use_pretty_links' ) == 'compressed' ) {
728
- $newuri = wppa_compress_pretty( $newuri );
729
- }
730
  return $newuri;
731
  }
732
 
@@ -1495,7 +1501,9 @@ global $wpdb;
1495
 
1496
  // make sure the photo data ia available
1497
  $thumb = wppa_cache_thumb( $id );
1498
- if ( ! $thumb ) return false;
 
 
1499
 
1500
  // Is it a video?
1501
  $is_video = wppa_is_video( $id, true );
@@ -1534,7 +1542,79 @@ global $wpdb;
1534
  $result['target'] = '_self';
1535
  $result['title'] = '';
1536
  $result['onclick'] = '';
 
1537
  switch ( $wich ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1538
  case 'sphoto':
1539
  $type = wppa_opt( 'sphoto_linktype' );
1540
  $page = wppa_opt( 'sphoto_linkpage' );
@@ -1942,7 +2022,7 @@ global $wpdb;
1942
  else {
1943
  $url = wppa_get_photo_url( $id, true, '', $wid, $hig );
1944
  }
1945
-
1946
  $name = esc_js( wppa_get_photo_name( $id ) );
1947
  $result['url'] = esc_attr( 'wppaFullPopUp( ' . wppa( 'mocc' ) . ', ' . $id . ', "' . $url . '", ' . $wid . ', ' . $hig . ', "' . $name . '" )' );
1948
  }
3
  * Package: wp-photo-album-plus
4
  *
5
  * Frontend links
6
+ * Version 8.0.05.002
7
  */
8
 
9
  if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
457
  case 'ph':
458
  $deltauri = 'wppa-potdhis=';
459
  break;
460
+ case 'ps':
461
+ $deltauri = 'wppa-photos=';
462
+ break;
463
 
464
  default:
465
  $deltauri = '';
549
  'vt',
550
  'catbox',
551
  'potdhis',
552
+ 'photos',
553
  );
554
 
555
  $uri = $parts[0] . '?';
677
  'vt',
678
  'catbox',
679
  'potdhis',
680
+ 'photos',
681
  );
682
  if ( count($args) > 0 ) {
683
  foreach ( $args as $arg ) {
719
  case 'vt': $newuri .= 'vt'; break;
720
  case 'catbox': $newuri .= 'cb'; break;
721
  case 'potdhis': $newuri .= 'ph'; break;
722
+ case 'photos': $newuri .= 'ps'; break;
723
  default: wppa_log( 'err', sprintf( 'err', 'Unimplemented code %s encountered in wppa_convert_to_pretty()', $code ) );
724
  }
725
  if ( $val !== false ) {
730
  }
731
  }
732
 
733
+ // if ( wppa_opt( 'use_pretty_links' ) == 'compressed' ) {
734
+ // $newuri = wppa_compress_pretty( $newuri );
735
+ // }
736
  return $newuri;
737
  }
738
 
1501
 
1502
  // make sure the photo data ia available
1503
  $thumb = wppa_cache_thumb( $id );
1504
+ if ( ! $thumb ) {
1505
+ return false;
1506
+ }
1507
 
1508
  // Is it a video?
1509
  $is_video = wppa_is_video( $id, true );
1542
  $result['target'] = '_self';
1543
  $result['title'] = '';
1544
  $result['onclick'] = '';
1545
+ $result['ajax_url'] = '';
1546
  switch ( $wich ) {
1547
+ case 'grid':
1548
+ $type = wppa_opt( 'grid_linktype' );
1549
+ $page = wppa_opt( 'grid_linkpage' );
1550
+ if ( wppa_switch( 'grid_blank' ) ) $result['target'] = '_blank';
1551
+ $result['url'] = '';
1552
+ $result['title'] = '';
1553
+ $result['is_url'] = true;
1554
+ $result['is_lightbox'] = false;
1555
+ $result['onclick'] = '';
1556
+ if ( $page == '0' ) {
1557
+ $occ = wppa( 'mocc' );
1558
+ $can_ajax = true;
1559
+ $page = get_the_ID();
1560
+ }
1561
+ else {
1562
+ $occ = '1';
1563
+ $can_ajax = false;
1564
+ }
1565
+ switch ( $type ) {
1566
+ case 'none':
1567
+ return false;
1568
+ break;
1569
+ case 'file':
1570
+ $result['is_url'] = true;
1571
+ $result['url'] = wppa_get_photo_url( $id );
1572
+ $result['target'] = '_blank';
1573
+ break;
1574
+ case 'photo': // slideshow
1575
+ case 'single': // single image slide
1576
+ if ( $type == 'single' ) {
1577
+ $a = wppa_get_photo_item( $id, 'album' );
1578
+ $result['url'] = wppa_encrypt_url( wppa_get_permalink( $page ) . 'wppa-occur=' . $occ . '&amp;wppa-slide=1&amp;wppa-album=' . $a . '&amp;wppa-photo=' . $id . '&amp;wppa-single=1');
1579
+ }
1580
+ elseif ( wppa( 'start_album' ) ) {
1581
+ $album = wppa( 'start_album' );
1582
+ $result['url'] = wppa_encrypt_url( wppa_get_permalink( $page ) . 'wppa-occur=' . $occ . '&amp;wppa-slide=1&amp;wppa-album=' . $album . '&amp;wppa-photo=' . $id );
1583
+ }
1584
+ elseif ( wppa( 'start_photos' ) ) {
1585
+ $photos = wppa( 'start_photos' );
1586
+ $result['url'] = wppa_encrypt_url( wppa_get_permalink( $page ) . 'wppa-occur=' . $occ . '&amp;wppa-slide=1&amp;wppa-photos=' . $photos . '&amp;wppa-photo=' . $id );
1587
+ }
1588
+ else {
1589
+ return false;
1590
+ }
1591
+ $result['is_url'] = true;
1592
+ $result['is_lightbox'] = false;
1593
+ break;
1594
+ case 'lightbox':
1595
+ $result['is_lightbox'] = true;
1596
+ if ( $is_video ) {
1597
+ $result['url'] = wppa_get_photo_url( $id );
1598
+ }
1599
+ else {
1600
+ if ( ( wppa_switch( 'lb_hres' ) && ! wppa_is_stereo( $id ) && ! wppa_is_panorama( $id ) ) || ( wppa_is_panorama( $id ) && ! wppa_is_mobile() ) ) {
1601
+ $result['url'] = wppa_get_hires_url( $id );
1602
+ }
1603
+ else {
1604
+ $siz = array( wppa_get_photox( $id ), wppa_get_photoy( $id ) );
1605
+ $result['url'] = wppa_get_photo_url( $id, false, '', $siz['0'], $siz['1'] );
1606
+ }
1607
+ }
1608
+ $result['title'] = __( wppa_get_photo_name( $id ) );
1609
+ $result['is_url'] = false;
1610
+ break;
1611
+ }
1612
+ if ( $can_ajax ) {
1613
+ $result['ajax_url'] = str_replace( wppa_get_permalink( $page ), wppa_get_ajaxlink(), $result['url'] );
1614
+ $result['ajax_url'] = str_replace( '&amp;', '&', $result['ajax_url'] );
1615
+ }
1616
+ return $result;
1617
+ break;
1618
  case 'sphoto':
1619
  $type = wppa_opt( 'sphoto_linktype' );
1620
  $page = wppa_opt( 'sphoto_linkpage' );
2022
  else {
2023
  $url = wppa_get_photo_url( $id, true, '', $wid, $hig );
2024
  }
2025
+
2026
  $name = esc_js( wppa_get_photo_name( $id ) );
2027
  $result['url'] = esc_attr( 'wppaFullPopUp( ' . wppa( 'mocc' ) . ', ' . $id . ', "' . $url . '", ' . $wid . ', ' . $hig . ', "' . $name . '" )' );
2028
  }
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 8.0.04.007
7
  *
8
  */
9
 
@@ -4649,6 +4649,13 @@ global $wppa_subtab_names;
4649
  $html = $html1 . '<span style="float:left;" >&nbsp;</span>' . $html2;
4650
  wppa_setting_new(false, '34', $name, $desc, $html, $help);
4651
 
 
 
 
 
 
 
 
4652
  wppa_setting_box_footer_new();
4653
  }
4654
  }
@@ -4906,9 +4913,9 @@ global $wppa_subtab_names;
4906
  $slug = 'wppa_use_pretty_links';
4907
  $opts = array( __( 'None', 'wp-photo-album-plus' ),
4908
  __( 'Classic', 'wp-photo-album-plus' ),
4909
- __( 'Compressed', 'wp-photo-album-plus' ),
4910
  );
4911
- $vals = array( '-none-', 'classic', 'compressed' );
4912
  $html = wppa_select($slug, $opts, $vals );
4913
  wppa_setting_new($slug, '4', $name, $desc, $html, $help);
4914
 
@@ -5155,6 +5162,39 @@ global $wppa_subtab_names;
5155
  $html = array($html1, $html2, $html3, $html4);
5156
  wppa_setting_new($slug, '7', $name, $desc, $html, $help);
5157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5158
  wppa_setting_box_footer_new();
5159
  }
5160
  // Links from items and images in widgets
@@ -9033,7 +9073,7 @@ global $wppa_subtab_names;
9033
  $help = '';
9034
  $slug = 'wppa_map_apikey';
9035
  $html = wppa_input($slug, '300px', '');
9036
- wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_opt( 'gpx_implementation' ) == 'external-plugin' );
9037
 
9038
  $name = __('GPX Shortcode', 'wp-photo-album-plus');
9039
  $desc = __('The shortcode to be used for the gpx feature.', 'wp-photo-album-plus');
@@ -9693,8 +9733,25 @@ global $wppa_subtab_names;
9693
  );
9694
  $vals = array('-9', '-1', '-2', '-3', '-4', '-5');
9695
  $slug = 'wppa_main_photo';
9696
- $html = wppa_select($slug, $opts, $vals);
9697
- wppa_setting_new($slug, '3', $name, $desc, $html, $help);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9698
 
9699
  $name = __('Related count', 'wp-photo-album-plus');
9700
  $desc = __('The default maximum number of related photos to find.', 'wp-photo-album-plus');
@@ -9731,6 +9788,13 @@ global $wppa_subtab_names;
9731
  $html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
9732
  wppa_setting_new($slug, '8', $name, $desc, $html, $help, wppa_switch('enable_video'));
9733
 
 
 
 
 
 
 
 
9734
  wppa_setting_box_footer_new();
9735
  }
9736
  // Panorma related settings
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
4649
  $html = $html1 . '<span style="float:left;" >&nbsp;</span>' . $html2;
4650
  wppa_setting_new(false, '34', $name, $desc, $html, $help);
4651
 
4652
+ $name = __('Show empty search', 'wp-photo-album-plus');
4653
+ $desc = __('Display empty search message', 'wp-photo-album-plus');
4654
+ $help = __('Display a message when a search operation has an empty result', 'wp-photo-album-plus');
4655
+ $slug = 'wppa_show_empty_search';
4656
+ $html = wppa_checkbox($slug);
4657
+ wppa_setting_new($slug, '35', $name, $desc, $html, $help);
4658
+
4659
  wppa_setting_box_footer_new();
4660
  }
4661
  }
4913
  $slug = 'wppa_use_pretty_links';
4914
  $opts = array( __( 'None', 'wp-photo-album-plus' ),
4915
  __( 'Classic', 'wp-photo-album-plus' ),
4916
+ // __( 'Compressed', 'wp-photo-album-plus' ),
4917
  );
4918
+ $vals = array( '-none-', 'classic' ); //, 'compressed' );
4919
  $html = wppa_select($slug, $opts, $vals );
4920
  wppa_setting_new($slug, '4', $name, $desc, $html, $help);
4921
 
5162
  $html = array($html1, $html2, $html3, $html4);
5163
  wppa_setting_new($slug, '7', $name, $desc, $html, $help);
5164
 
5165
+ $name = __('Grid', 'wp-photo-album-plus');
5166
+ $desc = __('Grid photo link.', 'wp-photo-album-plus');
5167
+ $help = __('Select the type of link you want, or no link at all.', 'wp-photo-album-plus');
5168
+ $help .= '<br />'.__('If you select the fullsize photo on its own, it will be stretched to fit, regardless of that setting.', 'wp-photo-album-plus');
5169
+ $help .= '<br />'.__('Note that a page must have at least [wppa] in its content to show up the photo(s).', 'wp-photo-album-plus');
5170
+ $slug1 = 'wppa_grid_linktype';
5171
+ $slug2 = 'wppa_grid_linkpage';
5172
+ wppa_verify_page($slug2);
5173
+ $slug3 = 'wppa_grid_blank';
5174
+ $slug4 = 'wppa_grid_overrule';
5175
+ $slug = array($slug1, $slug2, $slug3, $slug4);
5176
+ $opts = array(
5177
+ __('no link at all.', 'wp-photo-album-plus'),
5178
+ __('the plain photo (file).', 'wp-photo-album-plus'),
5179
+ __('the full size photo in a slideshow.', 'wp-photo-album-plus'),
5180
+ __('the fullsize photo on its own.', 'wp-photo-album-plus'),
5181
+ __('lightbox.', 'wp-photo-album-plus')
5182
+ );
5183
+ $vals = array(
5184
+ 'none',
5185
+ 'file',
5186
+ 'photo',
5187
+ 'single',
5188
+ 'lightbox'
5189
+ );
5190
+ $html1 = wppa_select($slug1, $opts, $vals, 'wppaRefreshAfter();');
5191
+ $npag = wppa_need_page($slug1);
5192
+ $html2 = $npag ? wppa_select($slug2, $opts_page_post, $vals_page) : '';
5193
+ $html3 = $npag ? wppa_checkbox($slug3) : '';
5194
+ $html4 = wppa_checkbox($slug4);
5195
+ $html = array($html1, $html2, $html3, $html4);
5196
+ wppa_setting_new($slug, '8', $name, $desc, $html, $help);
5197
+
5198
  wppa_setting_box_footer_new();
5199
  }
5200
  // Links from items and images in widgets
9073
  $help = '';
9074
  $slug = 'wppa_map_apikey';
9075
  $html = wppa_input($slug, '300px', '');
9076
+ wppa_setting_new($slug, '3', $name, $desc, $html, $help);
9077
 
9078
  $name = __('GPX Shortcode', 'wp-photo-album-plus');
9079
  $desc = __('The shortcode to be used for the gpx feature.', 'wp-photo-album-plus');
9733
  );
9734
  $vals = array('-9', '-1', '-2', '-3', '-4', '-5');
9735
  $slug = 'wppa_main_photo';
9736
+ $html = wppa_select($slug, $opts, $vals, 'wppaRefreshAfter()');
9737
+ wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_opt('main_photo') != '-3' && wppa_opt('main_photo') != '-9');
9738
+
9739
+ $name = __('Default coverphoto selection', 'wp-photo-album-plus');
9740
+ $desc = __('Default select cover photo method.', 'wp-photo-album-plus');
9741
+ $help = __('The coverphoto slection method can be overruled on the edit album page.', 'wp-photo-album-plus');
9742
+ $help .= '<br />' . __('Alternatively an individual photo can be selected on the edit album page.', 'wp-photo-album-plus');
9743
+ $opts = array( __('--- random ---', 'wp-photo-album-plus'),
9744
+ __('--- random featured ---', 'wp-photo-album-plus'),
9745
+ __('--- most recent added ---', 'wp-photo-album-plus'),
9746
+ __('--- random from (grand)children ---', 'wp-photo-album-plus'),
9747
+ __('--- most recent from (grand)children ---', 'wp-photo-album-plus'),
9748
+ __('--- according to albums photo sequence ---', 'wp-photo-album-plus'),
9749
+ );
9750
+ $vals = array('-9', '-1', '-2', '-3', '-4', '-5');
9751
+ $slug1 = 'wppa_main_photo';
9752
+ $slug2 = 'wppa_main_photo_random_once';
9753
+ $html = wppa_select($slug1, $opts, $vals, 'wppaRefreshAfter()') . '<span style="float:left;margin:0 6px;" >' . __('Fix first found', 'wp-photo-album-plus') . '</span>' . wppa_checkbox($slug2);
9754
+ wppa_setting_new($slug, '3', $name, $desc, $html, $help, wppa_opt('main_photo') == '-3' || wppa_opt('main_photo') == '-9');
9755
 
9756
  $name = __('Related count', 'wp-photo-album-plus');
9757
  $desc = __('The default maximum number of related photos to find.', 'wp-photo-album-plus');
9788
  $html = wppa_input($slug, '40px', '', __('pixels', 'wp-photo-album-plus'));
9789
  wppa_setting_new($slug, '8', $name, $desc, $html, $help, wppa_switch('enable_video'));
9790
 
9791
+ $name = __('Grid video controls', 'wp-photo-album-plus');
9792
+ $desc = __('Show the video controms on a video in a grid display', 'wp-photo-album-plus');
9793
+ $help = '';
9794
+ $slug = 'wppa_grid_video';
9795
+ $html = wppa_checkbox($slug);
9796
+ wppa_setting_new($slug, '9', $name, $desc, $html, $help, wppa_switch('enable_video'));
9797
+
9798
  wppa_setting_box_footer_new();
9799
  }
9800
  // Panorma related settings
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 8.0.04.001
7
  *
8
  */
9
 
@@ -116,6 +116,8 @@ global $previous_page_last_id;
116
 
117
  wppa( 'ss_pag', false );
118
 
 
 
119
  // Save thumb ids of full selection
120
  $thumbs_ids = array();
121
  if ( $thumbs ) foreach ( $thumbs as $t ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all the slideshow high level functions
6
+ * Version 8.0.05.002
7
  *
8
  */
9
 
116
 
117
  wppa( 'ss_pag', false );
118
 
119
+ if ( ! $thumbs ) return;
120
+
121
  // Save thumb ids of full selection
122
  $thumbs_ids = array();
123
  if ( $thumbs ) foreach ( $thumbs as $t ) {
wppa-styles.php CHANGED
@@ -3,7 +3,7 @@
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
- /* Version 8.0.00.019
7
  /*
8
  */
9
 
@@ -449,6 +449,7 @@ function wppa_get_imgstyle_a( $id, $file, $xmax_size, $xvalign = '', $type = ''
449
  }
450
 
451
  break;
 
452
  default:
453
  wppa_out( 'Error wrong "$type" argument: ' . $type . ' in wppa_get_imgstyle_a' );
454
  }
3
  /* Package: wp-photo-album-plus
4
  /*
5
  /* Various style computation routines
6
+ /* Version 8.0.05.002
7
  /*
8
  */
9
 
449
  }
450
 
451
  break;
452
+
453
  default:
454
  wppa_out( 'Error wrong "$type" argument: ' . $type . ' in wppa_get_imgstyle_a' );
455
  }
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: 8.0.04.007
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_api_version;
27
- $wppa_api_version = '8.0.04.007'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30
 
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: 8.0.05.002
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_api_version;
27
+ $wppa_api_version = '8.0.05.002'; // WPPA software version
28
  global $wppa_revno;
29
  $wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
30