Plugin Directory

Changeset 346060


Ignore:
Timestamp:
02/15/2011 09:35:01 PM (15 years ago)
Author:
jjcoder
Message:
 
Location:
jj-nextgen-image-list/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • jj-nextgen-image-list/trunk/includes/jj_ngg_image_list.php

    r346012 r346060  
    116116        if($vertical)
    117117        {
    118           $gap_style = " style=\"margin-top: " . $gap . "px;\"";
    119         }
    120         else
    121         {
    122           $gap_style = " style=\"margin-left: " . $gap . "px;\"";
     118          $gap_style = "margin-bottom: " . $gap . "px;";
     119        }
     120        else
     121        {
     122          $gap_style = "margin-right: " . $gap . "px;";
     123          if($center == '1')
     124          {
     125            $gap_style .= " margin-left: " . $gap . "px;";
     126          }         
     127        }
     128        if($gap_style != '')
     129        {
     130          $gap_style = " style=\"" . $gap_style . "\"";
    123131        }
    124132      }     
     
    133141      $image_alt = null;
    134142      $image_description = null;
    135       $first_image_shown = false;
    136143      foreach($results as $result)
    137144      {
     
    157164        }
    158165       
    159         if($first_image_shown && $gap_style != '')
     166        if($gap_style != '')
    160167        {
    161168          $gap_style_item = $gap_style;
     
    201208          $output .= "</li>";
    202209        }
    203         $first_image_shown = true;           
    204210      }
    205211      if($vertical)
     
    209215      $output .= "\n  </div>";
    210216      $output .= "\n</div>";
     217
     218      // Add javascript
     219      if($order == 'random' && $shuffle == 'true')
     220      {
     221        $output .= "\n<script type=\"text/javascript\">";   
     222        if($vertical)
     223        {
     224          $output .= "\n  jQuery('div#" . $html_id . " ul.image_list').jj_ngg_shuffle();";       
     225        }
     226        else
     227        {
     228          $output .= "\n  jQuery('div#" . $html_id . "').jj_ngg_shuffle();";
     229        }
     230        $output .= "\n</script>\n";
     231      }
     232         
    211233    }   
    212234 
  • jj-nextgen-image-list/trunk/jj-ngg-image-list.php

    r346012 r346060  
    44Description: Allows you to pick a gallery from the 'NextGen Gallery' plugin to use with as an Image List. You can list images vertically or horizontally.
    55Author: JJ Coder
    6 Version: 1.0.0
     6Version: 1.0.1
    77*/
    88
  • jj-nextgen-image-list/trunk/readme.txt

    r346012 r346060  
    55Requires at least: 2.8
    66Tested up to: 3.0.5
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88
    99Allows you to pick a gallery from the 'NextGen Gallery' plugin to list images from. You can list images vertically or horizontally.
     
    7474== Changelog ==
    7575
     76- 1.0.1: Shuffle should be working now. Gap tweaks.
    7677- 1.0.0: First version.
    7778
Note: See TracChangeset for help on using the changeset viewer.