scottnath
Forum Replies Created
-
Aha! I figured it out.
Did some delving into the code, turns out by choosing to sort by date (Settings->Sorting images in album) we’re making all of the images in these albums the same. It seems that when my Android device (Samsung Galaxy S4) uploads images to to Google Plus, that it uploads them all at the exact same time. So, when we select to sort the images in an album by date, then they all have the same exact date.
So, at line 1718 of picasa-express-2.php is this code:
case 1: $key = strtotime($this->get_item($item,’pubDate’,true)); break;
Which then makes the $key the exact same for each image. Thus, when making the $images array,
$images[$key] = array (…)
[array starts at line 1722]the $key for each image is the same and it therefore wipes out each other image except the last one.
Sadly, it looks like the actual rss feed from Google only has one date, and that’s the pubDate. So, the code for this plugin needs to be re-written to check if the $key made is repeated and if it is, it should create a different $key. Or it could just add the imageTitle to the pubdate key, thus making it unique.
If you want immediate results as a user, just change the sort order of your images on the settings page.
Hope this helps everyone,
ScottHa! That’s hilarious. I was definitely answering about another plugin. Thanks for the heads up.
Aha! I figured it out.
Did some delving into the code, turns out by choosing to sort by date (Settings->Sorting images in album) we’re making all of the images in these albums the same. It seems that when my Android device (Samsung Galaxy S4) uploads images to to Google Plus, that it uploads them all at the exact same time. So, when we select to sort the images in an album by date, then they all have the same exact date.
So, at line 1718 of picasa-express-2.php is this code:
case 1: $key = strtotime($this->get_item($item,'pubDate',true)); break;Which then makes the $key the exact same for each image. Thus, when making the $images array,
$images[$key] = array (...)
[array starts at line 1722]the $key for each image is the same and it therefore wipes out each other image except the last one.
Sadly, it looks like the actual rss feed from Google only has one date, and that’s the pubDate. So, the code for this plugin needs to be re-written to check if the $key made is repeated and if it is, it should create a different $key. Or it could just add the imageTitle to the pubdate key, thus making it unique.
If you want immediate results as a user, just change the sort order of your images on the settings page.
Hope this helps everyone,
ScottHey Pär,
It definitely seems like the setup of your symlinks is causing an issue and requiring an abnormal way to find your plugin file. You should have your plugin file within the WordPress file system.
Is “/Users/bonny/Dropbox/Webb/Simple-History-GIT/” inside of the /wordpress directory or outside of it?
For instance, we have created code to allow us to have two plugin directories. This is similar to how multi site would have it’s own set of plugins. But, both plugin directories reside inside of our docroot on the server.
Therefore, if we are grabbing the link to something in the main (normal) plugin directory, the url comes out as:
http://example.com/site-content/plugins/some-plugin/some-plugin.php
path:
/docroot/site-content/plugins/some-plugin/some-plugin.phpand if we’re grabbing the link to something in the secondary plugin directory, the url comes out as:
http://example.com/weirdpress/weirdpress-plugins/our-plugin/our-plugin.php
path
/docroot/weirdpress/weirdpress-plugins/our-plugin/our-plugin.phpSo, you can see that both folders “site-content” and “weirdpress” are on the same level inside the docroot.
Hope that helps,
ScottWhen comparing a working rss feed and one that only shows one photo, the only difference I could see was that the one-photo one has the authkey in the link to the images. However, all images are included in the rss feed.
I haven’t been able to find a fix.
Hi Pär,
I’ve looked over the latest code in Version 1.2. What you’re using to create the url to for the files isn’t working when a system has some of its plugins in a symlinked directory. Your line #45:
$plugin_dir_url = plugin_dir_url(basename($aa)) . basename(dirname(__FILE__)) . '/';
only ends up pointing to the main plugin directory and looking for the files there.Does this still not work for you?
$plugin_dir_url = plugin_dir_url(__FILE__);-Scott
Thanks for the fix. Totally works in our multi-plugin configuration. Thanks for the update!
-Scott
Hi osexcel,
Sorry, that didn’t fix it.
There are two issues that need to be addressed. Path and URL
To fix the path issue:
In ose_wordpress_firewall.php, line 11 reads:
define('OSEFWDIR', WP_PLUGIN_DIR.DS.dirname( plugin_basename( __FILE__ ) ) );It should read:
define('OSEFWDIR', plugin_dir_path(__FILE__) );reference:
http://codex.ww.wp.xz.cn/Function_Reference/plugin_dir_pathTo fix the URL issue:
1) Remove line #7 from define.php:
define('OSEFWURL',rtrim(site_url(), '/') . '/wp-content/plugins/ose-firewall');and place it in ose_wordpress_firewall.php like this:
define('OSEFWURL',plugins_url('',__FILE__).DS);2) Change line #36 in osewphelper.php to this:
$this->osefwurl = OSEFWURL;reference:
http://codex.ww.wp.xz.cn/Function_Reference/plugins_urlNotes:
These changes are needed even if someone isn’t using a second plugin folder or multisite. You have hard-coded the name of the wp-content folder into your code, yet a user might have a different file structure set up by changing the default content folder. See this article:
http://codex.ww.wp.xz.cn/Editing_wp-config.php#Moving_wp-content_folderHope this helps and that these changes can be implemented.
best,
ScottForum: Plugins
In reply to: [ACF Single Relationship Add New] wrong link to add post itemI’ve done an adjustment to your code, adding a js variable so that the admin url is automatically found.
I’ve put this into a GitHub repo here:
https://github.com/scottnath/acf-single-relationship-add-newthanks,
Scottbump
I am using WordPress 3.1 and Additional Image Sizes (zui) v0.1.7
Hi there,
I’m getting these errors when trying to generate copies:
Warning: array_keys() [function.array-keys]: The first argument should be an array in […]/wp-content/plugins/additional-image-sizes-zui/vendor/beingzoe/zui_php/ZUI/WpAdditionalImageSizes.php on line 923
Warning: array_diff() [function.array-diff]: Argument #1 is not an array in […]/wp-content/plugins/additional-image-sizes-zui/vendor/beingzoe/zui_php/ZUI/WpAdditionalImageSizes.php on line 923
no new images are created.
When I go in to add an image in the media library, no other sizes are created.
Forum: Plugins
In reply to: [Plugin: MailPress] upgrade failedI’m getting the same thing.