WordPress - FlickrRSS、Flickr Gallery - 两者都不起作用

发布于 2024-10-07 10:01:49 字数 637 浏览 2 评论 0原文

我已经被这个最简单的问题难住了好几个小时,向 StackOverflow 的朋友求助:)

基本上,我正在开发一个自定义 WordPress 主题。我使用的代码与之前多次使用过的八面“FlickrRSS”插件的代码相同。代码如下所示:

<?php 
  get_flickrRSS(
       array(
         'set' => '72157625440574627', 
         'num_items' => 20, 
         'type' => 'set'
       )
  ); 
?>

问题(很难解决)是我从上面的代码中得到绝对零返回。到目前为止,我尝试过不同的用户和不同的照片集,但没有成功。

由于无法调试而感到沮丧,我尝试了另一个插件“Flickr Gallery”插件,它也具有很高的评级。使用这个画廊的短代码我再次一无所获。

我想也许我的服务器以某种方式重置为 PHP 4,但事实并非如此,它设置为 PHP 5。

另外,我想到它可能是 WordPress 3.03。该网站是我使用 WordPress 3.03 开发的唯一一个网站。

我完全被难住了。有人见过这个问题,甚至有调试建议吗?我会尝试任何事情(只要我还没有尝试过)。

I have been stumped by this simplest problem for hours now, turning to my friends at StackOverflow :)

Basically, I'm developing a custom WordPress theme. I'm using the same code that I have used many times before from EightFaces "FlickrRSS" plugin. Code looks like this:

<?php 
  get_flickrRSS(
       array(
         'set' => '72157625440574627', 
         'num_items' => 20, 
         'type' => 'set'
       )
  ); 
?>

The problem (which is very difficult to troubleshoot) is that I get absolutely ZERO return from the above code. So far I have tried different users and different Photo Sets, with no luck.

Frustrated by being unable to debug, I tried a different plugin the "Flickr Gallery" plugin which has high ratings also. Using the shortcodes for this gallery I again get ABSOLUTELY NOTHING.

I thought that perhaps my server somehow got reset to PHP 4, but that's not it, it's set for PHP 5.

Also, occurred to me that it might be WordPress 3.03. This site is the only one of those I've developed using WordPress 3.03.

I'm totally stumped. Anyone out there seen this problem or even have suggestions for debugging? I'll try anything (as long as I haven't tried it already).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云柯 2024-10-14 10:01:49

数组设置正确,但我认为您的“set”值错误。

我浏览了您的用户个人资料,找到了您的网站,并从那里找到了您的 Flickr 帐户。当我导航到 http://www.flickr.com/photos/brianfeister/sets/ 时72157625440574627/ 我收到 404。

要么您设置的号码错误,要么您将其设置为私人或其他。

编辑:

花了一段时间,但我找到了问题所在。

根据插件附带的自述文件,只有当“type”设置为“user”或“group”时才需要“id”字段,但事实证明“set”也需要它。

如果我运行这个:

  get_flickrRSS(
    array(
      'set' => '72157624166201871', 
      'num_items' => 5, 
      'type' => 'set' 
    )
  )

我什么也得不到,但如果我添加“id”字段(即拥有该集合的用户的“id”,而不是您的“id”):

  get_flickrRSS(
    array(
      'set' => '72157624166201871', 
      'num_items' => 5, 
      'type' => 'set', 
      'id' => '51236489@N06'
    )
  )

它可以工作。

The array is setup properly, but I think you have the wrong value for "set".

I went through your user profile, found your site, and from there I found your Flickr account. When I navigate to http://www.flickr.com/photos/brianfeister/sets/72157625440574627/ I get a 404.

Either you have the wrong set number, or you have it set to private or something.

Edit:

It took a while, but I figured out the problem.

According to the README file that comes with the plugin, the 'id' field is only needed when 'type' is set to 'user' or 'group', but it turns out that it's needed with 'set' as well.

If I run this:

  get_flickrRSS(
    array(
      'set' => '72157624166201871', 
      'num_items' => 5, 
      'type' => 'set' 
    )
  )

I get nothing, but if I add the 'id' field (i.e. the 'id' for the user owning the set, not your 'id'):

  get_flickrRSS(
    array(
      'set' => '72157624166201871', 
      'num_items' => 5, 
      'type' => 'set', 
      'id' => '51236489@N06'
    )
  )

It works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文