Plugin Directory

Changeset 476472


Ignore:
Timestamp:
12/16/2011 06:02:01 PM (14 years ago)
Author:
Chaser324
Message:
 
Location:
featured-posts-scroll/branches/varsize
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • featured-posts-scroll/branches/varsize/featured-posts-scroll.php

    r473938 r476472  
    252252    $post_heading_text = get_option('fps_heading_text');
    253253
    254     $post_autoscroll = get_option('fps_autoscroll');
    255 
    256254    $post_arrow_position = get_option('fps_arrow_position');
    257255
    258256    $fps_image_full_size = get_option('fps_image_full_size');
    259 
    260    
    261257
    262258    $wrapper_classes .= "featured-posts-wrapper fps-single";
     
    264260    $bg_classes .= "featured-posts-background fps-single";
    265261    $li_classes = "";
    266 
    267     // Check if auto scrolling is enabled
    268     if ($post_autoscroll == '1')
    269     {
    270         $wrapper_classes .= " fps-autoscroll";
    271     }
    272262
    273263    // Generate the main output.
  • featured-posts-scroll/branches/varsize/js/featuredpostslides.js.php

    r473938 r476472  
    66
    77<?php
     8    $post_autoscroll = get_option('fps_autoscroll');
    89    $post_scroll_speed = get_option('fps_scroll_speed');
    910    $post_scroll_fadeInSpeed = get_option('fps_scroll_fadeInSpeed');
     
    1718
    1819(function($j) {
    19     var type = 'none'; // Type of slider present (v1.0 only supports 'single')
    20     var fpg_animLocked = new Array(); // Lock object for animations
     20    var type = 'none';
     21    var fps_animLocked = new Array(); // Lock object for animations
    2122    var autoscrollInterval = new Array();
    2223
     
    4445
    4546        // release animation locks
    46         for (var i=1; i<=fpg_animLocked.length; i++)
    47         {
    48             fpg_animLocked[i-1] = false;
     47        for (var i=1; i<=fps_animLocked.length; i++)
     48        {
     49            fps_animLocked[i-1] = false;
    4950        }
    5051    };
     
    5859            $j('.scrollFeaturedPostsRight').each(function(index) {
    5960                $j(this).click(function() {
    60                     if (fpg_animLocked[index] == false)
     61                    if (fps_animLocked[index] == false)
    6162                    {
    6263                        FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'right', index);
     
    6869            $j('.scrollFeaturedPostsLeft').each(function(index) {
    6970                $j(this).click(function() {
    70                     if (fpg_animLocked[index] == false)
     71                    if (fps_animLocked[index] == false)
    7172                    {
    7273                        FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'left', index);
     
    7879            $j('.scrollFeaturedPostsRight-below').each(function(index) {
    7980                $j(this).click(function() {
    80                     if (fpg_animLocked[index] == false)
     81                    if (fps_animLocked[index] == false)
    8182                    {
    8283                        FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'right', index);
     
    8889            $j('.scrollFeaturedPostsLeft-below').each(function(index) {
    8990                $j(this).click(function() {
    90                     if (fpg_animLocked[index] == false)
     91                    if (fps_animLocked[index] == false)
    9192                    {
    9293                        FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'left', index);
     
    111112            $j('ul.fps-slideNumberList').each(function(index) {
    112113                $j(this).children('li').click(function() {
    113                     if (fpg_animLocked[index] == false)
     114                    if (fps_animLocked[index] == false)
    114115                    {
    115116                        scrollToPost(this, index);
     
    124125    function initAutoscroll()
    125126    {
    126         if (type != 'none')
     127        if (type != 'none' && 1 == <?php echo $post_autoscroll ?>)
    127128        {
    128129            $j('.featured-posts-wrapper').each(function(index) {
    129                 fpg_animLocked[index] = true;
    130                 if ($j(this).hasClass('fps-autoscroll'))
    131                 {
    132                     if ($j('.featured-posts-wrapper').slice(index,index+1).children('.scrollFeaturedPostsRight').length > 0)
    133                     {
    134                         var callback =
    135                             "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" +
    136                             index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight'), 'right', " + index + ")";
    137                         autoscrollInterval[index] = setInterval(
    138                             callback, <?php echo $post_scroll_interval ?>);
    139                     }
    140                     else
    141                     {
    142                         var callback =
    143                             "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" +
    144                             index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight-below'), 'right', " + index + ")";
    145                         autoscrollInterval[index] = setInterval(
    146                             callback, <?php echo $post_scroll_interval ?>);
    147                     }
     130                fps_animLocked[index] = true;
     131               
     132                if ($j('.featured-posts-wrapper').slice(index,index+1).children('.scrollFeaturedPostsRight').length > 0)
     133                {
     134                    var callback =
     135                        "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" +
     136                        index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight'), 'right', " + index + ")";
     137                    autoscrollInterval[index] = setInterval(
     138                        callback, <?php echo $post_scroll_interval ?>);
     139                }
     140                else
     141                {
     142                    var callback =
     143                        "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" +
     144                        index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight-below'), 'right', " + index + ")";
     145                    autoscrollInterval[index] = setInterval(
     146                        callback, <?php echo $post_scroll_interval ?>);
    148147                }
    149148            });
     
    157156        {
    158157            // lock animations
    159             fpg_animLocked[index] = true;
     158            fps_animLocked[index] = true;
    160159
    161160            var currentItem = $j(slideButton).parent().siblings('ul.featured-posts').children('li:visible');
     
    174173    FeaturedPostsLib.fps.scrollFeaturedPosts = function(button, dir, index)
    175174    {
    176         if (fpg_animLocked[index] != true)
     175        if (fps_animLocked[index] != true)
    177176        {
    178177            // lock animations
    179             fpg_animLocked[index] = true;
     178            fps_animLocked[index] = true;
    180179
    181180            // get the currently displayed element(s)
     
    184183            var nextItem;
    185184
    186             if (type == 'single')
    187             {       
    188                 if (dir == 'right')
    189                 {
    190                     nextItem = currentItem.next();
    191 
    192                     if (nextItem.length == 0)
    193                     {
    194                         nextItem = currentItem.siblings().first();
    195                     }
    196                 }
    197                 else if (dir == 'left')
    198                 {
    199                     nextItem = currentItem.prev();
    200 
    201                     if (nextItem.length == 0)
    202                     {
    203                         nextItem = currentItem.siblings().last();
    204                     }
     185            if (dir == 'right')
     186            {
     187                nextItem = currentItem.next();
     188
     189                if (nextItem.length == 0)
     190                {
     191                    nextItem = currentItem.siblings().first();
     192                }
     193            }
     194            else if (dir == 'left')
     195            {
     196                nextItem = currentItem.prev();
     197
     198                if (nextItem.length == 0)
     199                {
     200                    nextItem = currentItem.siblings().last();
    205201                }
    206202            }
     
    253249                toHide.css('float','');
    254250                $j(toShow).find('.fps-text').fadeIn(<?php echo $post_scroll_fadeInSpeed ?>, function() {
    255                     fpg_animLocked[index] = false;
     251                    fps_animLocked[index] = false;
    256252                });
    257253            });
  • featured-posts-scroll/branches/varsize/readme.txt

    r475101 r476472  
    8787
    88881. Admin Screen
    89 2. Appearance Customization
    90 3. New Features: Slide Numbers, Alternate Arrow Position, Custom Sizing
    91 4. New in Release 1.13: Borderless Arrow Position, Drop Shadow Spread Parameter
     892. New Features: Slide Numbers, Alternate Arrow Position, Custom Sizing
     903. New in Release 1.13: Borderless Arrow Position, Drop Shadow Spread Parameter
    9291
    9392== Changelog ==
     
    181180= 1.23 =
    182181* Reorganized/renamed some CSS and JS files. Removed files that are no longer used.
    183 * Code refactoring and cleanup: activate/deactivate functions, admin page.
     182* Code refactoring and cleanup: activate/deactivate functions, admin page
     183* Removed dead code from JS file.
Note: See TracChangeset for help on using the changeset viewer.