Plugin Directory

Changeset 704918


Ignore:
Timestamp:
04/28/2013 08:10:19 AM (13 years ago)
Author:
bergh
Message:

Version 0.7

Location:
tagged-gallery/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • tagged-gallery/trunk/css/tg.css

    r702849 r704918  
    11.overlay
    22{
    3    background-color: #000;
    4    opacity: .7;
    5    filter: alpha(opacity=70);
    6    position: fixed; top: 0; left: 0;
    7    width: 100%; height: 100%;
    8    z-index: 10;
     3    position: fixed; top: 0; left: 0;
     4    width: 100%; height: 100%;
     5    z-index: 100;
    96}
    107.overlayimg
    118{
    12  
    13   z-index: 11;
    14   position: fixed; top: 20%; left: 20%;
    15  
     9  z-index: 110;
     10  position: fixed; center;
    1611}
    1712
  • tagged-gallery/trunk/js/jquery.resizecrop-1.0.3.js

    r702849 r704918  
     1//
     2// This is a modyfied version of resize-crop
     3// https://code.google.com/p/resize-crop/
     4//
     5
    16jQuery(document).ready(function($){
    27    $.fn.resizecrop = function(options) { 
     
    2227            $obj.css("display","none"); // remove blink transformation
    2328            $obj.removeAttr("width").removeAttr("height"); // remove attribute dimensions
    24             options.width = $obj.attr("thumb-width");
    25             options.height = $obj.attr("thumb-height");
     29            options.width = $obj.attr("thumb-width"); // Added by Tagged Gallery
     30            options.height = $obj.attr("thumb-height"); // Added by Tagged Gallery
     31           
    2632           
    2733            // Wrapper default CSS
     
    3743            // move Classes from IMG to Wrapper element
    3844            if (options.moveClass) {
    39 
     45 
    4046                var classAttr = $obj.attr("class");
    4147
     
    4854                    $obj.removeAttr("class");
    4955                    $obj.addClass(options.className);
    50                 }
     56                }               
    5157            }
    5258
     
    6773                width_ratio  = options.width  / ref.width();
    6874                height_ratio = options.height / ref.height();
     75               
     76                ref.attr("fs-width", ref.width());
     77                ref.attr("fs-height", ref.height());
    6978               
    7079                if (width_ratio > height_ratio) {
     
    127136    };
    128137    $.fn.cropresize = $.fn.resizecrop; // -- deprecated, Backward compatibility
    129 })(jQuery);
     138});(jQuery);
  • tagged-gallery/trunk/js/resize.js

    r702849 r704918  
    11$j=jQuery.noConflict();
    22$j(document).ready(function() {
    3             $j('.tagged-gallery').resizecrop({      });
    4             }); 
     3    $j('.tagged-gallery').resizecrop({      });
     4});  
  • tagged-gallery/trunk/js/tg.js

    r702418 r704918  
    1 function expandPhoto() {
    2 
    3    // create overlay and append to page
    4    var overlay = document.createElement("div");
    5    overlay.setAttribute("id","overlay");
    6    overlay.setAttribute("class", "overlay");
    7    document.body.appendChild(overlay);
    8 
    9    // create image and append to page
    10    var img = document.createElement("img");
    11    img.setAttribute("id","img");
    12    img.src = this.getAttribute("data-larger");
    13    img.setAttribute("class","overlayimg");
    14 
    15    // click to restore page
    16    img.onclick=restore;
    17 
    18    document.body.appendChild(img);
    19 
    20 }
    21 // restore page to normal
    22 function restore() {
    23 
    24  document.body.removeChild(document.getElementById("overlay"));
    25  document.body.removeChild(document.getElementById("img"));
    26 }
    27 
    28 
    29 window.onload=function() {
    30    var imgs = document.getElementsByClassName("tg-resizecrop");
    31    imgs[0].focus();
    32    for (var i = 0; i < imgs.length; i++) {
    33      imgs[i].onclick=expandPhoto;
    34      imgs[i].onkeydown=expandPhoto;
    35    }
    36 }
     1$j=jQuery.noConflict();
     2$j(document).ready(function(){   
     3  $j('.tg-resizecrop').click(function(event){
     4    $j(this).tgbox({});
     5    event.preventDefault();
     6  });
     7});
  • tagged-gallery/trunk/readme.txt

    r704435 r704918  
    55Requires at least: 3.3
    66Tested up to: 3.5.1
    7 Stable tag: 0.6.1
     7Stable tag: 0.7
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828Tagged Gallery does NOT connect to any external servers. Just getting tags and images from your WordPress database
     29
     30= 0.7 =
     31
     32*   PHPImagic is completely replaced with jQuery
     33*   New view image feature created in jQuery. That now fit to screen.
     34*   Support for mobile screen rotation. Image resizes to fit window resize
     35
    2936
    3037= 0.6.1 =
     
    7582== Todo ==
    7683- Next/previous function
    77 - Mobile optimization
    78 - User defined view size
    7984- user defined CSS
    8085- Lose pendency to Tag Pages and WordPress Media Tags
     
    8287== Upgrade Notice ==
    8388
    84 "Bugfix"
    85 
    86 When I converted into jQuery for the thummaking, I forgot to remove hardcoded values from the jq-script and add variables. This is now fixed.
     89*   PHPImagic is completely replaced with jQuery
     90*   New view image feature created in jQuery. That now fit to screen.
     91*   Support for mobile screen rotation. Image resizes to fit window resize
  • tagged-gallery/trunk/tg.php

    r702849 r704918  
    55Description: Tagged Gallery enables you to easily generate a gallery in any post or page based on tagged media.
    66Author: Erik Bergh
    7 Version: 0.6.1
     7Version: 0.7
    88Author URI: http://www.bergh.me
    99*/
     
    1717wp_enqueue_style( 'tg-style' );
    1818   
    19 wp_register_script( 'tg-script', plugins_url( '/js/tg.js', __FILE__ ) );
    20 wp_enqueue_script('tg-script');
     19wp_register_script( 'tg-lighbox', plugins_url( '/js/tgbox.jquery.js', __FILE__ ) );
     20wp_enqueue_script('tg-lighbox');
    2121
    2222wp_register_script( 'jqresize-script', plugins_url( '/js/jquery.resizecrop-1.0.3.js', __FILE__ ) );
     
    2626wp_enqueue_script('resize-script');
    2727
     28wp_register_script( 'tg-script', plugins_url( '/js/tg.js', __FILE__ ) );
     29wp_enqueue_script('tg-script');
     30
     31
     32
    2833add_filter('the_content','tg_gallery');
    2934
  • tagged-gallery/trunk/tg_class.php

    r702849 r704918  
    3636            if($wpdb->num_rows>0)
    3737            {   
     38                $i=0;
    3839                foreach ($test as $post){
     40                    $i++;
    3941                    $postmime=explode('/',$post->post_mime_type);
    4042                    if($postmime[0]=="image")
     
    4244                        $img=substr($post->guid,strlen($server),strlen($post->guid)-strlen($server));
    4345                       
    44                         $string="<img src=\"".$img."\" class=\"tagged-gallery\" style=\"max-width: none;\" thumb-width=\"".$width."\" thumb-height=\"".$height."\" data-larger=\"/wp-content/plugins/tagged-gallery/img.php?img=".$img."&size=700x700\" alt=\"".$img."\" /> ";
     46                        $string="<img src=\"".$img."\" class=\"tagged-gallery\" style=\"max-width: none;\" thumb-width=\"".$width."\" picnum=\"".$i."\" thumb-height=\"".$height."\" data-larger=\"".$img."\" alt=\"Descritption\" /> ";
    4547                        $sup.="<div class=\"tg-thumb\">".$string."</div>";
    4648                        //$sup.=$string;
Note: See TracChangeset for help on using the changeset viewer.