Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ur wp-photo-album-plus-old/theme/wppa-style.css wp-photo-album-plus/theme/wppa-style.css
- --- wp-photo-album-plus-old/theme/wppa-style.css 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/theme/wppa-style.css 2011-10-05 18:11:00.000000000 +0200
- @@ -255,3 +255,27 @@
- /* display: none; */ /* to remove the slideshow / browse photos link frm the album covers */
- }
- +.wppa-numberbar {
- + position: absolute;
- + bottom: 20px;
- + right: 0;
- + margin-right: 10px;
- + z-index: 1000;
- +}
- +
- +.wppa-numberbar a {
- + display: block;
- + float: left;
- + width: 24px;
- + height: 24px;
- + line-height: 24px;
- + text-align: center;
- + background-color: #ffd800;
- + color: #fff;
- + margin-right: 10px;
- + font-weight: bold;
- +}
- +
- +.wppa-numberbar a.wppa-numbar-current{
- + background-color: #000;
- +}
- diff -ur wp-photo-album-plus-old/wppa-common-functions.php wp-photo-album-plus/wppa-common-functions.php
- --- wp-photo-album-plus-old/wppa-common-functions.php 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-common-functions.php 2011-10-05 17:09:07.000000000 +0200
- @@ -38,6 +38,7 @@
- 'browse_on' => '0',
- 'name_on' => '0',
- 'desc_on' => '0',
- + 'numbar_on' => '0',
- 'single_photo' => '',
- 'is_mphoto' => '0',
- 'start_album' => '',
- @@ -235,7 +236,8 @@
- 'wppa_apply_newphoto_desc' => '',
- 'wppa_newphoto_description' => '',
- 'wppa_comments_desc' => '',
- - 'wppa_user_upload_on' => ''
- + 'wppa_user_upload_on' => '',
- + 'wppa_show_slideshownumbar' => 'no'
- );
- array_walk($wppa_opt, 'wppa_set_options');
- diff -ur wp-photo-album-plus-old/wppa-settings.php wp-photo-album-plus/wppa-settings.php
- --- wp-photo-album-plus-old/wppa-settings.php 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-settings.php 2011-10-05 17:09:08.000000000 +0200
- @@ -190,9 +190,10 @@
- wppa_update_check('wppa_show_cover_text');
- wppa_update_check('wppa_show_comments');
- wppa_update_check('wppa_show_bbb');
- - wppa_update_check('wppa_show_slideshowbrowselink');
- + wppa_update_check('wppa_show_slideshowbrowselink');
- wppa_update_check('wppa_custom_on');
- wppa_update_textarea('wppa_custom_content');
- + wppa_update_check('wppa_show_slideshownumbar');
- // Table 3: Backgrounds
- wppa_update_value('wppa_bgcolor_even');
- @@ -739,7 +740,7 @@
- $slug = 'wppa_show_browse_navigation';
- $html = wppa_checkbox($slug);
- wppa_setting($slug, '7', $name, $desc, $html, $help);
- -
- +
- $name = __('Filmstrip', 'wppa');
- $desc = __('Show Filmstrip navigation bar.', 'wppa');
- $help = esc_js(__('If checked: display the filmstrip navigation bar under the full_size images and slideshow', 'wppa'));
- @@ -843,8 +844,8 @@
- $slug = 'wppa_show_slideshowbrowselink';
- $html = wppa_checkbox($slug);
- wppa_setting($slug, '20', $name, $desc, $html, $help);
- -
- - $name = __('Show custom box', 'wppa');
- +
- + $name = __('Show custom box', 'wppa');
- $desc = __('Display the custom box in the slideshow', 'wppa');
- $help = esc_js(__('You can fill the custom box with any html you like. It will not be checked, so it is your own responsability to close tags properly.', 'wppa'));
- $help .= '\n\n'.esc_js(__('The position of the box can be defined in Table IX item 6.', 'wppa'));
- @@ -859,6 +860,13 @@
- $slug = 'wppa_custom_content';
- $html = wppa_textarea($slug);
- wppa_setting($slug, '22', $name, $desc, $html, $help);
- +
- + $name = __('Slideshow/Number bar', 'wppa');
- + $desc = __('Display the Slideshow / Number bar.', 'wppa');
- + $help = esc_js(__('If checked: display the number boxes on slideshow', 'wppa'));
- + $slug = 'wppa_show_slideshownumbar';
- + $html = wppa_checkbox($slug);
- + wppa_setting($slug, '23', $name, $desc, $html, $help);
- ?>
- </tbody>
- diff -ur wp-photo-album-plus-old/wppa-setup.php wp-photo-album-plus/wppa-setup.php
- --- wp-photo-album-plus-old/wppa-setup.php 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-setup.php 2011-10-05 17:09:08.000000000 +0200
- @@ -335,7 +335,8 @@
- 'wppa_apply_newphoto_desc' => 'no',
- 'wppa_newphoto_description' => $wppa_npd,
- 'wppa_comments_desc' => 'no',
- - 'wppa_user_upload_on' => 'no'
- + 'wppa_user_upload_on' => 'no',
- + 'wppa_show_slideshownumbar' => 'no'
- );
- diff -ur wp-photo-album-plus-old/wppa-slideshow.js wp-photo-album-plus/wppa-slideshow.js
- --- wp-photo-album-plus-old/wppa-slideshow.js 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-slideshow.js 2011-10-05 17:09:08.000000000 +0200
- @@ -172,7 +172,9 @@
- function wppaGoto(mocc, idx) {
- if ( ! _wppaSlideShowRuns[mocc] ) {
- _wppaGoto(mocc, idx);
- - }
- + }else{
- + _wppaGotoRunning(mocc,idx);
- + }
- }
- function wppaValidateComment(mocc) {
- @@ -183,6 +185,8 @@
- _wppaLog('NextSlide', mocc);
- if ( ! _wppaSlideShowRuns[mocc] && mode == 'auto' ) return; // Kill an old timed request, while stopped
- + if ( _wppaSlides[mocc].length < 2 && !_wppaFirst[mocc] ) return; //Do not animate single image
- + if ( ! _wppaSlideShowRuns[mocc] && mode == 'reset' ) _wppaSlideShowRuns[mocc] = true;
- // Set the busy flag
- _wppaIsBusy[mocc] = true;
- @@ -194,6 +198,8 @@
- _wppaNextIndex[mocc] = _wppaCurrentIndex[mocc] + 1;
- if (_wppaNextIndex[mocc] == _wppaSlides[mocc].length) _wppaNextIndex[mocc] = 0;
- }
- + jQuery('[id^=wppanumbar-' + mocc + '-]').removeClass("wppa-numbar-current");
- + jQuery("#wppanumbar-" + mocc + "-" + _wppaNextIndex[mocc]).addClass("wppa-numbar-current");
- // first:
- if (_wppaFirst[mocc]) {
- if (_wppaCurrentIndex[mocc] != -1) {
- @@ -403,6 +409,31 @@
- jQuery(".arrow-"+mocc).stop().fadeTo(400,0.2);
- _wppaNextSlide(mocc, 0);
- }
- +function _wppaGotoRunning(mocc, idx) {
- + //wait until not bussy
- + if (_wppaIsBusy[mocc]) {
- + setTimeout('_wppaGotoRunning('+mocc+',' + idx + ')', 10); // Try again after 10 ms
- + return;
- + }
- +
- + _wppaLog('GotoRunning', mocc);
- +
- + _wppaSlideShowRuns[mocc] = false; // we don't want timed loop to occur during our work
- +
- + _wppaToTheSame = (_wppaNextIndex[mocc] == idx);
- + _wppaNextIndex[mocc] = idx;
- + _wppaNextSlide(mocc, "manual"); // enqueue new transition
- +
- + _wppaGotoContinue(mocc);
- +}
- +
- +function _wppaGotoContinue(mocc){
- + if (_wppaIsBusy[mocc]) {
- + setTimeout('_wppaGotoContinue('+mocc+')', 10); // Try again after 10 ms
- + return;
- + }
- + setTimeout('_wppaNextSlide('+mocc+', "reset")', _wppaTimeOut[mocc] + 10); //restart slideshow after new timeout
- +}
- function _wppaStart(mocc, idx) {
- _wppaLog('Start', mocc);
- diff -ur wp-photo-album-plus-old/wppa-slideshow.php wp-photo-album-plus/wppa-slideshow.php
- --- wp-photo-album-plus-old/wppa-slideshow.php 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-slideshow.php 2011-10-05 17:09:08.000000000 +0200
- @@ -94,7 +94,9 @@
- $wppa['out'] .= wppa_nltab().'<img id="bbb-'.$wppa['master_occur'].'-l" class="bbb-'.$wppa['master_occur'].'" src="'.wppa_get_imgdir().'bbbl.png" style=" opacity:0; filter:alpha(opacity=0); border:none; z-index:903; position: absolute; left:0px; top: 0px; width: '.($wppa['slideframewidth']*0.5).'px; height: '.$wppa['slideframeheight'].'px; box-shadow: none; cursor:default;" onmouseover="wppaBbb('.$wppa['master_occur'].',\'l\',\'show\')" onmouseout="wppaBbb('.$wppa['master_occur'].',\'l\',\'hide\')" onclick="wppaBbb('.$wppa['master_occur'].',\'l\',\'click\')" />';
- $wppa['out'] .= wppa_nltab().'<img id="bbb-'.$wppa['master_occur'].'-r" class="bbb-'.$wppa['master_occur'].'" src="'.wppa_get_imgdir().'bbbr.png" style=" opacity:0; filter:alpha(opacity=0); border:none; z-index:903; position: absolute; left:'.($wppa['slideframewidth']*0.5).'px;top: 0px; width: '.($wppa['slideframewidth']*0.5).'px; height: '.$wppa['slideframeheight'].'px; box-shadow: none; cursor:default;" onmouseover="wppaBbb('.$wppa['master_occur'].',\'r\',\'show\')" onmouseout="wppaBbb('.$wppa['master_occur'].',\'r\',\'hide\')" onclick="wppaBbb('.$wppa['master_occur'].',\'r\',\'click\')" />';
- } /***/
- -
- +
- + wppa_numberbar();
- +
- $wppa['out'] .= wppa_nltab('-').'</div>';
- }
- @@ -313,6 +315,33 @@
- }
- }
- +function wppa_numberbar($opt = ''){
- +global $wppa;
- +global $wppa_opt;
- + if (is_feed()) {
- + //don't know if it works with feeds, so switch off
- + return;
- + }
- + $do_it = false;
- + if($wppa_opt["wppa_show_slideshownumbar"] && !$wppa['is_slideonly']) $do_it = true;
- + if ($wppa['numbar_on']) $do_it = true;
- + if(!$do_it){
- + return;
- + }
- + $thumbs = wppa_get_thumbs($alb);
- + if (!$thumbs || count($thumbs) < 1) return;
- + $wppa['out'] .= wppa_nltab('+') . '<div class="wppa-numberbar">';
- + $numid = 0;
- + foreach ($thumbs as $tt) :
- + $wppa['out'] .= wppa_nltab('+') . '<a href="" id="wppanumbar-'.$wppa['master_occur'].'-'.$numid.'" ' . ($numid == 0 ? ' class="wppa-numbar-current" ' : '') .' onclick="wppaGoto('.$wppa['master_occur'].',' . $numid . ');return false;">';
- + $wppa['out'] .= wppa_nltab() . $numid + 1;
- + $wppa['out'] .= wppa_nltab('-') . '</a>';
- + $numid++;
- + endforeach;
- + $wppa['out'] .= wppa_nltab('-') . '</div>';
- +
- +}
- +
- function wppa_browsebar($opt = '') {
- global $wppa;
- diff -ur wp-photo-album-plus-old/wppa-slideshow-widget.php wp-photo-album-plus/wppa-slideshow-widget.php
- --- wp-photo-album-plus-old/wppa-slideshow-widget.php 2011-10-03 15:37:47.000000000 +0200
- +++ wp-photo-album-plus/wppa-slideshow-widget.php 2011-10-05 17:09:08.000000000 +0200
- @@ -43,6 +43,7 @@
- 'film' => 'no',
- 'browse' => 'no',
- 'name' => 'no',
- + 'numbar' => 'no',
- 'desc' => 'no'
- ) );
- @@ -59,6 +60,7 @@
- $film = $instance['film'];
- $browse = $instance['browse'];
- $name = $instance['name'];
- + $numbar = $instance['numbar'];
- $desc = $instance['desc'];
- if (is_numeric($album)) {
- @@ -79,9 +81,11 @@
- $wppa['film_on'] = ($film == 'yes');
- $wppa['browse_on'] = ($browse == 'yes');
- $wppa['name_on'] = ($name == 'yes');
- + $wppa['numbar_on'] = ($numbar == 'yes');
- $wppa['desc_on'] = ($desc == 'yes');
- echo wppa_albums($album, 'slideonly', $width, 'center');
- $wppa['desc_on'] = false;
- + $wppa['numbar_on'] = false;
- $wppa['name_on'] = false;
- $wppa['browse_on'] = false;
- $wppa['film_on'] = false;
- @@ -133,6 +137,7 @@
- $instance['film'] = $new_instance['film'];
- $instance['browse'] = $new_instance['browse'];
- $instance['name'] = $new_instance['name'];
- + $instance['numbar'] = $new_instance['numbar'];
- $instance['desc'] = $new_instance['desc'];
- return $instance;
- @@ -157,6 +162,7 @@
- 'film' => 'no',
- 'browse' => 'no',
- 'name' => 'no',
- + 'numbar' => 'no',
- 'desc' => 'no'
- ) );
- @@ -174,6 +180,7 @@
- $film = $instance['film'];
- $browse = $instance['browse'];
- $name = $instance['name'];
- + $numbar = $instance['numbar'];
- $desc = $instance['desc'];
- ?>
- @@ -230,6 +237,13 @@
- <option value="yes" <?php if ($browse == 'yes') echo 'selected="selected"' ?>><?php _e('yes.', 'wppa'); ?></option>
- </select>
- </p>
- + <p>
- + <?php _e('Show numbar:', 'wppa'); ?>
- + <select id="<?php echo $this->get_field_id('numbar'); ?>" name="<?php echo $this->get_field_name('numbar'); ?>">
- + <option value="no" <?php if ($numbar == 'no') echo 'selected="selected"' ?>><?php _e('no.', 'wppa'); ?></option>
- + <option value="yes" <?php if ($numbar == 'yes') echo 'selected="selected"' ?>><?php _e('yes.', 'wppa'); ?></option>
- + </select>
- + </p>
- <p><span style="color:blue"><small><?php _e('The following text fields support qTranslate', 'wppa') ?></small></span></p>
- <p><label for="<?php echo $this->get_field_id('linktitle'); ?>"><?php _e('Tooltip text:', 'wppa'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('linktitle'); ?>" name="<?php echo $this->get_field_name('linktitle'); ?>" type="text" value="<?php echo $linktitle; ?>" /></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement