Changeset 1748561
- Timestamp:
- 10/18/2017 10:24:00 AM (8 years ago)
- Location:
- galdget
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.3 (copied) (copied from galdget/trunk)
-
tags/1.0.3/galdget.js (modified) (1 diff)
-
tags/1.0.3/galdget.php (modified) (5 diffs)
-
tags/1.0.3/readme.txt (modified) (4 diffs)
-
trunk/galdget.js (modified) (1 diff)
-
trunk/galdget.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
galdget/tags/1.0.3/galdget.js
r1715235 r1748561 19 19 20 20 function galdget_setlink(P, F) { 21 var u = F.src; 22 var t = ''; 21 var u = F.src, 22 t = '', 23 a = 'Galdget gallery item'; 23 24 if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 4) 24 25 u = galdget_config[galdget_links[P.id][galdget_current[P.id]]][3]; 25 26 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) { 27 28 t = galdget_config[galdget_links[P.id][galdget_current[P.id]]][4]; 29 a = t; 30 } 31 if (F.tagName == 'IMG') F.alt = a; 28 32 var L = P.parentElement.querySelector('#galdget_link'); 29 33 if (L != null) { -
galdget/tags/1.0.3/galdget.php
r1715235 r1748561 4 4 Plugin URI: https://plugins.unforget.rs/galdget 5 5 Description: Gallery shortcode and Widget for displaying images and web pages with timed rotation, highly customisable 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: Unforget 8 8 Author URI: https://unforget.rs 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 Tags: gallery, slider, shortcode, widget, images, sites, urls11 Tags: 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 12 12 Text Domain: galdget_widget 13 13 Domain Path: /languages … … 28 28 defined('ABSPATH') or die('Lorem ipsum dolor sit amet galdget!'); 29 29 30 define('galdget_version', '1.0. 2');30 define('galdget_version', '1.0.3'); 31 31 32 32 register_activation_hook( __FILE__,'galdget_activate'); … … 123 123 if (substr($f,0,1) !== '/') $f = '/'.$f; 124 124 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; } 131 129 else return false; 132 130 133 131 $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; 138 135 $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 } 139 144 } 140 145 } … … 166 171 167 172 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 } 168 183 } 169 184 } … … 364 379 <?php 365 380 $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\">"; 367 382 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>"; ?> 368 383 </div> -
galdget/tags/1.0.3/readme.txt
r1715235 r1748561 2 2 Contributors: unforget 3 3 Donate link: https://plugins.unforget.rs/galdget/#donate 4 Tags: gallery, slider, shortcode, widget, images, sites, urls4 Tags: 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 5 5 Requires at least: 4.5.0 6 Tested up to: 4.8. 17 Stable tag: 1.0. 26 Tested up to: 4.8.2 7 Stable tag: 1.0.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 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.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, 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. 16 16 17 17 So 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. … … 107 107 == Changelog == 108 108 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 109 113 = 1.0.2 = 110 114 * Added minutely content schedule. … … 121 125 == Upgrade Notice == 122 126 123 = 1.0.2 = 124 Version 1.0.2 has improved content scheduling and configurable links for each gallery item. 127 = 1.0.3 = 128 Version 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. 129 Also, "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. 125 130 126 131 == URL list setup == -
galdget/trunk/galdget.js
r1715235 r1748561 19 19 20 20 function galdget_setlink(P, F) { 21 var u = F.src; 22 var t = ''; 21 var u = F.src, 22 t = '', 23 a = 'Galdget gallery item'; 23 24 if (galdget_config[galdget_links[P.id][galdget_current[P.id]]].length >= 4) 24 25 u = galdget_config[galdget_links[P.id][galdget_current[P.id]]][3]; 25 26 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) { 27 28 t = galdget_config[galdget_links[P.id][galdget_current[P.id]]][4]; 29 a = t; 30 } 31 if (F.tagName == 'IMG') F.alt = a; 28 32 var L = P.parentElement.querySelector('#galdget_link'); 29 33 if (L != null) { -
galdget/trunk/galdget.php
r1715235 r1748561 4 4 Plugin URI: https://plugins.unforget.rs/galdget 5 5 Description: Gallery shortcode and Widget for displaying images and web pages with timed rotation, highly customisable 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: Unforget 8 8 Author URI: https://unforget.rs 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 Tags: gallery, slider, shortcode, widget, images, sites, urls11 Tags: 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 12 12 Text Domain: galdget_widget 13 13 Domain Path: /languages … … 28 28 defined('ABSPATH') or die('Lorem ipsum dolor sit amet galdget!'); 29 29 30 define('galdget_version', '1.0. 2');30 define('galdget_version', '1.0.3'); 31 31 32 32 register_activation_hook( __FILE__,'galdget_activate'); … … 123 123 if (substr($f,0,1) !== '/') $f = '/'.$f; 124 124 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; } 131 129 else return false; 132 130 133 131 $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; 138 135 $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 } 139 144 } 140 145 } … … 166 171 167 172 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 } 168 183 } 169 184 } … … 364 379 <?php 365 380 $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\">"; 367 382 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>"; ?> 368 383 </div> -
galdget/trunk/readme.txt
r1715235 r1748561 2 2 Contributors: unforget 3 3 Donate link: https://plugins.unforget.rs/galdget/#donate 4 Tags: gallery, slider, shortcode, widget, images, sites, urls4 Tags: 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 5 5 Requires at least: 4.5.0 6 Tested up to: 4.8. 17 Stable tag: 1.0. 26 Tested up to: 4.8.2 7 Stable tag: 1.0.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 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.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, 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. 16 16 17 17 So 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. … … 107 107 == Changelog == 108 108 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 109 113 = 1.0.2 = 110 114 * Added minutely content schedule. … … 121 125 == Upgrade Notice == 122 126 123 = 1.0.2 = 124 Version 1.0.2 has improved content scheduling and configurable links for each gallery item. 127 = 1.0.3 = 128 Version 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. 129 Also, "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. 125 130 126 131 == URL list setup ==
Note: See TracChangeset
for help on using the changeset viewer.