Plugin Directory

Changeset 1748561


Ignore:
Timestamp:
10/18/2017 10:24:00 AM (8 years ago)
Author:
unforget
Message:

Version 1.0.3

Location:
galdget
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • galdget/tags/1.0.3/galdget.js

    r1715235 r1748561  
    1919
    2020function galdget_setlink(P, F) {
    21     var u = F.src;
    22     var t = '';
     21    var u = F.src,
     22        t = '',
     23        a = 'Galdget gallery item';
    2324    if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 4)
    2425        u = galdget_config[galdget_links[P.id][galdget_current[P.id]]][3];
    2526    if (galdget_linak[P.id]) u = galdget_linak[P.id];
    26     if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 5)
     27    if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 5) {
    2728        t = galdget_config[galdget_links[P.id][galdget_current[P.id]]][4];
     29        a = t;
     30    }
     31    if (F.tagName == 'IMG') F.alt = a;
    2832    var L = P.parentElement.querySelector('#galdget_link');
    2933    if (L != null) {
  • galdget/tags/1.0.3/galdget.php

    r1715235 r1748561  
    44Plugin URI: https://plugins.unforget.rs/galdget
    55Description: Gallery shortcode and Widget for displaying images and web pages with timed rotation, highly customisable
    6 Version: 1.0.2
     6Version: 1.0.3
    77Author: Unforget
    88Author URI: https://unforget.rs
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    11 Tags: gallery, slider, shortcode, widget, images, sites, urls
     11Tags: wordpress gallery plugin, photo gallery, image gallery, gallery widget, animated gallery, image slider, wordpress gallery widget, gallery with frame, gallery shortcode, gallery, slider, shortcode, widget, images, sites, urls
    1212Text Domain: galdget_widget
    1313Domain Path: /languages
     
    2828defined('ABSPATH') or die('Lorem ipsum dolor sit amet galdget!');
    2929
    30 define('galdget_version', '1.0.2');
     30define('galdget_version', '1.0.3');
    3131
    3232register_activation_hook( __FILE__,'galdget_activate');
     
    123123        if (substr($f,0,1) !== '/') $f = '/'.$f;
    124124
    125         if (    is_dir($f)
    126             and (strpos($f, $galdget_rootdir) === 0)
    127             and (strlen($f) > strlen($galdget_rootdir)))  { $subf = substr($f, strlen($galdget_rootdir)); }
    128         elseif (is_dir($galdget_rootdir.$f))              { $subf = $f; $f = $galdget_rootdir.$f; }
    129         elseif (is_dir($galdget_rootdir.$galdget_uploaddir.$f))   { $subf = $galdget_uploaddir.$f; $f = $galdget_rootdir.$galdget_uploaddir.$f; }
    130         elseif (is_dir($galdget_rootdir.$galdget_plugindir.$f))   { $subf = $galdget_plugindir.$f; $f = $galdget_rootdir.$galdget_plugindir.$f; }
     125        if ((is_dir($f) or is_file($f)) and (strpos($f, $galdget_rootdir) === 0) and (strlen($f) > strlen($galdget_rootdir)))  { $subf = substr($f, strlen($galdget_rootdir)); }
     126        elseif (is_dir($galdget_rootdir.$f)                    or is_file($galdget_rootdir.$f))                                { $subf = $f;                    $f = $galdget_rootdir.$f; }
     127        elseif (is_dir($galdget_rootdir.$galdget_uploaddir.$f) or is_file($galdget_rootdir.$galdget_uploaddir.$f))             { $subf = $galdget_uploaddir.$f; $f = $galdget_rootdir.$galdget_uploaddir.$f; }
     128        elseif (is_dir($galdget_rootdir.$galdget_plugindir.$f) or is_file($galdget_rootdir.$galdget_plugindir.$f))             { $subf = $galdget_plugindir.$f; $f = $galdget_rootdir.$galdget_plugindir.$f; }
    131129        else return false;
    132130
    133131        $D = array();
    134         $L = scandir($f);
    135         foreach ($L as $li) {
    136             if (array_search(strtolower(pathinfo($li, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
    137                 $R[0] = $galdget_rooturl . $subf .'/'. $li;
     132        if (is_file($f)) {
     133            if (array_search(strtolower(pathinfo($f, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
     134                $R[0] = $galdget_rooturl . $subf;
    138135                $D[] = $R;
     136            }
     137        } else {
     138            $L = scandir($f);
     139            foreach ($L as $li) {
     140                if (array_search(strtolower(pathinfo($li, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
     141                    $R[0] = $galdget_rooturl . $subf .'/'. $li;
     142                    $D[] = $R;
     143                }
    139144            }
    140145        }
     
    166171
    167172                return $p;
     173            }
     174            if (strpos($u, wp_upload_dir()['baseurl']) === 0) {
     175                global $wpdb;
     176                $att = $wpdb->get_col($wpdb->prepare("select id from $wpdb->posts where guid='%s';",$u));
     177                if (count($att) > 0) {
     178                    if ($att = get_post_meta($att[0], '_wp_attachment_image_alt', true)) {
     179                        $n = $att;
     180                        return $u;
     181                    }
     182                }
    168183            }
    169184        }
     
    364379                <?php
    365380                $onl = "galdget_switch(this.parentElement, this, '$lcsv', $wrnd, $wimgopt, $wanim, $wheight, $wembed, $wlink);";
    366                 if ($jeimg) echo "<img id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" style=\"display:block; visibility:visible; opacity:0; overflow:visible;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\">";
     381                if ($jeimg) echo "<img id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" style=\"display:block; visibility:visible; opacity:0; overflow:visible;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\" alt=\"Galdget gallery image\">";
    367382                else echo "<iframe sandbox=\"allow-forms allow-scripts allow-pointer-lock allow-top-navigation\" id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" frameborder=\"0\" scrolling=\"no\" style=\"display:block;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\"></iframe>"; ?>
    368383            </div>
  • galdget/tags/1.0.3/readme.txt

    r1715235 r1748561  
    22Contributors: unforget
    33Donate link: https://plugins.unforget.rs/galdget/#donate
    4 Tags: gallery, slider, shortcode, widget, images, sites, urls
     4Tags: wordpress gallery plugin, photo gallery, image gallery, gallery widget, animated gallery, image slider, wordpress gallery widget, gallery with frame, gallery shortcode, gallery, slider, shortcode, widget, images, sites, urls
    55Requires at least: 4.5.0
    6 Tested up to: 4.8.1
    7 Stable tag: 1.0.2
     6Tested up to: 4.8.2
     7Stable tag: 1.0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 This plugin provides two features, a gallery shortcode and a widget, which slide-show the images and webpages from the list that you define. The list consists of URLs that point to images or web pages, residing either on your blog website or on some other web server on the internet. You can include one or more directories from your web server into the list, and all images and html/php files from the directories will participate in the slide show.
     15This plugin provides two features, a gallery shortcode and a widget, which slide-show the images and webpages from the list that you define, as may be seen on demo pages [demo 1][galdget animations] and [demo 2][galdget restaurant menu]. The list consists of URLs that point to images or web pages, residing either on your blog website or on some other web server on the internet. You can include one or more directories from your web server into the list, and all images and html/php files from the directories will participate in the slide show.
    1616
    1717So you can display galleries on your posts and pages, but also in the widget areas of your blog. The galleries can display images and/or web pages.
     
    107107== Changelog ==
    108108
     109= 1.0.3 =
     110* Added SEO friendly img alt attributes
     111* "dir" directive in the URL list now can point to single file
     112
    109113= 1.0.2 =
    110114* Added minutely content schedule.
     
    121125== Upgrade Notice ==
    122126
    123 = 1.0.2 =
    124 Version 1.0.2 has improved content scheduling and configurable links for each gallery item.
     127= 1.0.3 =
     128Version 1.0.3 features "alt" descriptions for all images in the gallery, either user-defined or default, which is good for SEO since search engines don't like images without alt tag.
     129Also, "dir://" directive, which is used to include the contents of a directory into the gallery, can now point to a single file instead of a directory. The file can be either image or a web page, and may have acompanying .txt file with link and tooltip text.
    125130
    126131== URL list setup ==
  • galdget/trunk/galdget.js

    r1715235 r1748561  
    1919
    2020function galdget_setlink(P, F) {
    21     var u = F.src;
    22     var t = '';
     21    var u = F.src,
     22        t = '',
     23        a = 'Galdget gallery item';
    2324    if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 4)
    2425        u = galdget_config[galdget_links[P.id][galdget_current[P.id]]][3];
    2526    if (galdget_linak[P.id]) u = galdget_linak[P.id];
    26     if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 5)
     27    if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 5) {
    2728        t = galdget_config[galdget_links[P.id][galdget_current[P.id]]][4];
     29        a = t;
     30    }
     31    if (F.tagName == 'IMG') F.alt = a;
    2832    var L = P.parentElement.querySelector('#galdget_link');
    2933    if (L != null) {
  • galdget/trunk/galdget.php

    r1715235 r1748561  
    44Plugin URI: https://plugins.unforget.rs/galdget
    55Description: Gallery shortcode and Widget for displaying images and web pages with timed rotation, highly customisable
    6 Version: 1.0.2
     6Version: 1.0.3
    77Author: Unforget
    88Author URI: https://unforget.rs
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    11 Tags: gallery, slider, shortcode, widget, images, sites, urls
     11Tags: wordpress gallery plugin, photo gallery, image gallery, gallery widget, animated gallery, image slider, wordpress gallery widget, gallery with frame, gallery shortcode, gallery, slider, shortcode, widget, images, sites, urls
    1212Text Domain: galdget_widget
    1313Domain Path: /languages
     
    2828defined('ABSPATH') or die('Lorem ipsum dolor sit amet galdget!');
    2929
    30 define('galdget_version', '1.0.2');
     30define('galdget_version', '1.0.3');
    3131
    3232register_activation_hook( __FILE__,'galdget_activate');
     
    123123        if (substr($f,0,1) !== '/') $f = '/'.$f;
    124124
    125         if (    is_dir($f)
    126             and (strpos($f, $galdget_rootdir) === 0)
    127             and (strlen($f) > strlen($galdget_rootdir)))  { $subf = substr($f, strlen($galdget_rootdir)); }
    128         elseif (is_dir($galdget_rootdir.$f))              { $subf = $f; $f = $galdget_rootdir.$f; }
    129         elseif (is_dir($galdget_rootdir.$galdget_uploaddir.$f))   { $subf = $galdget_uploaddir.$f; $f = $galdget_rootdir.$galdget_uploaddir.$f; }
    130         elseif (is_dir($galdget_rootdir.$galdget_plugindir.$f))   { $subf = $galdget_plugindir.$f; $f = $galdget_rootdir.$galdget_plugindir.$f; }
     125        if ((is_dir($f) or is_file($f)) and (strpos($f, $galdget_rootdir) === 0) and (strlen($f) > strlen($galdget_rootdir)))  { $subf = substr($f, strlen($galdget_rootdir)); }
     126        elseif (is_dir($galdget_rootdir.$f)                    or is_file($galdget_rootdir.$f))                                { $subf = $f;                    $f = $galdget_rootdir.$f; }
     127        elseif (is_dir($galdget_rootdir.$galdget_uploaddir.$f) or is_file($galdget_rootdir.$galdget_uploaddir.$f))             { $subf = $galdget_uploaddir.$f; $f = $galdget_rootdir.$galdget_uploaddir.$f; }
     128        elseif (is_dir($galdget_rootdir.$galdget_plugindir.$f) or is_file($galdget_rootdir.$galdget_plugindir.$f))             { $subf = $galdget_plugindir.$f; $f = $galdget_rootdir.$galdget_plugindir.$f; }
    131129        else return false;
    132130
    133131        $D = array();
    134         $L = scandir($f);
    135         foreach ($L as $li) {
    136             if (array_search(strtolower(pathinfo($li, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
    137                 $R[0] = $galdget_rooturl . $subf .'/'. $li;
     132        if (is_file($f)) {
     133            if (array_search(strtolower(pathinfo($f, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
     134                $R[0] = $galdget_rooturl . $subf;
    138135                $D[] = $R;
     136            }
     137        } else {
     138            $L = scandir($f);
     139            foreach ($L as $li) {
     140                if (array_search(strtolower(pathinfo($li, PATHINFO_EXTENSION)), array('png','jpg','jpeg','gif','bmp','html','htm','php')) !== false) {
     141                    $R[0] = $galdget_rooturl . $subf .'/'. $li;
     142                    $D[] = $R;
     143                }
    139144            }
    140145        }
     
    166171
    167172                return $p;
     173            }
     174            if (strpos($u, wp_upload_dir()['baseurl']) === 0) {
     175                global $wpdb;
     176                $att = $wpdb->get_col($wpdb->prepare("select id from $wpdb->posts where guid='%s';",$u));
     177                if (count($att) > 0) {
     178                    if ($att = get_post_meta($att[0], '_wp_attachment_image_alt', true)) {
     179                        $n = $att;
     180                        return $u;
     181                    }
     182                }
    168183            }
    169184        }
     
    364379                <?php
    365380                $onl = "galdget_switch(this.parentElement, this, '$lcsv', $wrnd, $wimgopt, $wanim, $wheight, $wembed, $wlink);";
    366                 if ($jeimg) echo "<img id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" style=\"display:block; visibility:visible; opacity:0; overflow:visible;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\">";
     381                if ($jeimg) echo "<img id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" style=\"display:block; visibility:visible; opacity:0; overflow:visible;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\" alt=\"Galdget gallery image\">";
    367382                else echo "<iframe sandbox=\"allow-forms allow-scripts allow-pointer-lock allow-top-navigation\" id=\"galdget_0\" class=\"galdget_iframe\" src=\"$jeimgi\" frameborder=\"0\" scrolling=\"no\" style=\"display:block;\" onload=\"$onl\" onerror=\"this.onerror=null; $onl\"></iframe>"; ?>
    368383            </div>
  • galdget/trunk/readme.txt

    r1715235 r1748561  
    22Contributors: unforget
    33Donate link: https://plugins.unforget.rs/galdget/#donate
    4 Tags: gallery, slider, shortcode, widget, images, sites, urls
     4Tags: wordpress gallery plugin, photo gallery, image gallery, gallery widget, animated gallery, image slider, wordpress gallery widget, gallery with frame, gallery shortcode, gallery, slider, shortcode, widget, images, sites, urls
    55Requires at least: 4.5.0
    6 Tested up to: 4.8.1
    7 Stable tag: 1.0.2
     6Tested up to: 4.8.2
     7Stable tag: 1.0.3
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 This plugin provides two features, a gallery shortcode and a widget, which slide-show the images and webpages from the list that you define. The list consists of URLs that point to images or web pages, residing either on your blog website or on some other web server on the internet. You can include one or more directories from your web server into the list, and all images and html/php files from the directories will participate in the slide show.
     15This plugin provides two features, a gallery shortcode and a widget, which slide-show the images and webpages from the list that you define, as may be seen on demo pages [demo 1][galdget animations] and [demo 2][galdget restaurant menu]. The list consists of URLs that point to images or web pages, residing either on your blog website or on some other web server on the internet. You can include one or more directories from your web server into the list, and all images and html/php files from the directories will participate in the slide show.
    1616
    1717So you can display galleries on your posts and pages, but also in the widget areas of your blog. The galleries can display images and/or web pages.
     
    107107== Changelog ==
    108108
     109= 1.0.3 =
     110* Added SEO friendly img alt attributes
     111* "dir" directive in the URL list now can point to single file
     112
    109113= 1.0.2 =
    110114* Added minutely content schedule.
     
    121125== Upgrade Notice ==
    122126
    123 = 1.0.2 =
    124 Version 1.0.2 has improved content scheduling and configurable links for each gallery item.
     127= 1.0.3 =
     128Version 1.0.3 features "alt" descriptions for all images in the gallery, either user-defined or default, which is good for SEO since search engines don't like images without alt tag.
     129Also, "dir://" directive, which is used to include the contents of a directory into the gallery, can now point to a single file instead of a directory. The file can be either image or a web page, and may have acompanying .txt file with link and tooltip text.
    125130
    126131== URL list setup ==
Note: See TracChangeset for help on using the changeset viewer.