Flickr Photostream
[resolved] Please update for WP 3.5 (3 posts)

  1. bfintal
    Posted 2 years ago #

    When debugging, warnings these are showing up:

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /wp-includes/functions.php on line 2908

    Notice: Use of undefined constant title - assumed 'title' in /wp-content/plugins/flickr-photostream/flickr-photostream.php on line 183


  2. nammourdesigns
    Posted 2 years ago #

    I had a huge issue with the photo stream not working on the latest WordPress. It just continued to load and no photos displayed. I saw a lot of the same errors when I went to debug the issue. I was able to fix it by doing the following...

    all instances of $photo[title] and $photo[id] I changed to $photo['title'] and $photo['id']

    in addition I had an issue with the image alt text breaking everything. It ended up being an issue caused by the html special characters in the Flickr title. So I added this line of code.

    $mytitle = htmlspecialchars($photo['title'], ENT_QUOTES, 'UTF-8');

    Then I replaced the alt title with my new variable.

    Finally, I am not sure if it was necessary but I set up a variable for my array to use in the function. This is what my code now looks like for lines 183 to 200 of the
    flickr-photostream.php file.

    $photo_array = $photos['photos']['photo'];
        foreach ($photo_array as $photo) {
    	//	print "<div style='position:relative; border:1px solid red; z-index:200;'>" . $photo['title'] . "</div>";
    			$ris .=
    			    '<a href="' . $f->buildPhotoURL($photo, "large") . '" title="' . $photo['title'] . '" >';
    			$ris .=
    				'<a href="' . $photos_url . $photo['id'] . '/in/photostream/lightbox/" target="_blank" title="' . $photo['title'] . '">';
    		$mytitle = htmlspecialchars($photo['title'], ENT_QUOTES, 'UTF-8');
    		$ris .= '<img alt="' . $mytitle . '" src="' . $f->buildPhotoURL($photo, $imgSize) . '" />'
    			 .	'</a>';

    I hope this helps.

  3. miro.mannino
    Plugin Author

    Posted 1 year ago #

    I'm changing the plugin with your suggestions. Thanks for the help

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flickr Photostream
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.