* Added screencast!
※スクリーンキャストを追加しました。英語表記ですが、
日本語版Wordpressをお使いの方はもちろん日本語表記が行なわれます。)
WordPress 2.5 のリッチエディターにて、Flickr の写真を選択してエディター上に貼り付けられるプラグイン「Wordpress Media Flickr 1.0.0」をリリースします。
必要なもの
- WordPress 2.5
- Flickrアカウント
動作確認環境
- Internet Explorer 6, 7
- FireFox 2.0.0.13
- Safari 3.1
ダウンロード
インストール方法
アーカイブをダウンロードし展開後、ディレクトリごと /wp-content/plugins にコピーします。 あとはWordpressの管理画面にて「Wordpress Media Flickr」プラグインを有効にするだけです。
WordPress Media Flickrの設定
管理画面の「設定」から「Media Flickr」を選択します。 画面の流れに従ってFlickrの利用認証を行うと、記事の投稿画面から自分の写真を貼り付けることができます。
Flickrの写真を記事に貼り付ける
記事の投稿画面のツールバーにFlickrアイコンが増えているかと思います。これをクリックするとWordpress Media Flickrのダイアログが表示されます。
自分の写真や全体の写真を検索し、写真をクリックすると写真の位置を選択する画面が表示されます。位置を選択後「挿入」をクリックすることで記事に貼り付けることができます。
また写真一覧の写真タイトルの左にあるアイコンをクリックすることで、新しいウィンドウが開かれ写真をFlickrで確認することができます。
不具合や要望など
不具合やご意見、ご要望などありましたらコメントやメールいただければと思います。
Let’s enjoy Flickr!
※ちなみに私はあまりFlickrを活用できていません…

Had an issues with the plugin because it was using file_get_contents which was turned off (blocked) by my hosting provider (1and1). I renamed the function to my_file_get_contents and put this function at the top of the file wp-media-flickr.php:
function my_file_get_contents($url) {
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
return $file_contents;
}
I was then able to authenticate and properly use the plugin when adding a post. Thanks for a great plugin.
Jeremy
Hello and thanks for a nice plugin!
I think that Flickr has disabled your API key.
When I click on “Flickr Authenticate” in my WordPress admin, I get transported to flickr.com and see the error message:
“Oops! The API key or signature is invalid.”
I did signup for my own API key, but I guess that is useless?
Regards,
Anders.
Hi, what changes should i make in order to make this plugin automatically add a class=”lightview” when I instert a flickr picture in my post?
I´ve been playing with wp-media-flickr.js but had no success.
Thanks
I must be really dim, but when I click on ‘Flickr Authenticate’ the browser doesn’t do anything. I”m trying this on Firefox 2.0.0.14 and am about to try it on IE.
Just to confirm that Jeremy’s fix worked for me (see Comment #1) A big thank you!
ピンバック: ラワンクルの「新・日記のある暮らし」
I was released new version “1.0.2″, try it.
> Jeremy
I fixed this problem, thank you.
> Anders
Please check the new version, maybe fix..
> Emo
I was added function of customize “rel” attribute of link tag.
Please check the new version.
Thank you use my plugin.
Enjoy.
Great!, thanks!! I really appreciate your help. Will try it in a few minutes
I´ve tryied your new version. There´s one little thing that would make it even better. Im using lightview instead of lightbox. It would be great to be able to add some setting options for both as most people use them.
The difference between lightbox is that it´s activated when you add rel=”lightbox” to a link, and lightview is activated with ”
class=”lightview”
Also lightbox allows you to create a gallery by adding rel=”lightbox[galleryname], and lightview by adding class=”lightview” rel=”gallery[galleryname]”
Would this be possible?
Thanks!
ok.
I will add function of customize class attribute.
Thank you.
Hello,
Thank you for this wonderful plug-in! I use flickr all the time, and this plug-in makes it very easy to put flickr photos in my blog.
I would also love to see using lightview as a possible way to display photos in my blog. Hope to see this customization soon.
Cheers!
I did make the changes like in the #1 comment and this is the error I got:
User informations
Please authorization according to the following instruction.
Fatal error: Call to undefined function curl_init() in C:XAMPPhtdocsblogwp-contentpluginswordpress-media-flickrwp-media-flickr.php on line 12
Great, will be around waiting for the new version.
Thanks!
Greetings.Great plugin. I’ve also tried Jeremy’s (Comment #1) idea and I get the Error from flickr that the API is invalid!
Please help!
With reference to the comment dated (08-04-20 (日) 19:10) – it seems it’s already been fixed?
Hi.
The Jeremy’s fix(Comment #1) was inside at version 1.0.2.
Please try again 1.0.2.
The next version is under coding.
Please wait few days, thank you.
Hey, thank you for your flickr Plug In, I had only one problem with it. If I try to connect it with my flickr account, flickr tell me the API is wrong. Did you know something about this problem?
regards
Manuel
I do have version 1.0.2 and still I get the ‘Invalid API’ error. What could be wrong?
>Manuel and Prasannah
Please tellme URL of ‘Invalid API’ in flickr?
NOTE: I tested php4, but no problems.
thank you.
This is the problematic URI:
http://www.flickr.com/services/auth/?api_key=448e0602a1f453c0e668e701f4bf8924&perms=read&api_sig=8634f45ba191202f13be7a9c1a51966fTo confirm it worked for me in php5.
Well it didn’t work for me! I couldn’t figure out why!!
I was released version 1.0.3.
Please check out, thank you.
If your PHP is not supported curl and allow_url_open option is disabled, Flickr authentication is cannot use, sorry…
I know for sure that curl and allow_url_open are supported in my server because I have seen other plugins use that. But now I still cannot get authorization from flickr. The same error! TOTALLY CLUELESS!
Yu-Ji, this is GREAT! Just GREAT.
Two things I think are missing:
1) An option to open the original image (bigger) size and not the same that you are showing. Take a look at http://www.fotogeek.com.ar/test-725.htm When you click on the first image it will open it using lightview but in the same size as the “thumbnail”. It should open a bigger size.
If you click on the second image it will open lightview and inside will show the Flickr Page of that image.
Those are the 2 options you added in “Link of photo”. I think there should be a way to open a bigger size version of the image.
2) Maybe an autoupdate option so we can update de plugin using the autoupdate option from the admin control panel? This isn´t really necessary but it would be very useful.
THANKS!!!
An update. Without authenticating if I try to use your plugin, it gets some random pictures from flickr (or maybe they’re from your album!?) and I am able to insert them into my posts. Anyways, I am still facing trouble with authenticating it!
>Prasannah
Ok, please report contents displayed in the following procedures.
1. Add following lines in wp-config.php
> if(!empty($_GET['page']) && $_GET['page'] == ‘wordpress-media-flickr/wp-media-flickr-admin.php’) {
> define(‘DEBUG’, true);
> }
2. Request following URL.
> http://yourdomain/yourblogpath/wp-admin/options-general.php?page=wordpress-media-flickr/wp-media-flickr-admin.php
3. If page is showing errors, copy errors and report here.
4. Rollback wp-config.php
Thank you.
I followed those steps and I found NO change at all! I get the normal plugin options page, and when I click on Flickr authenticate, I get the SAME error again!
Oops! The API key or signature is invalid.ピンバック: my confidence…
@Prasannah: With all due respect, I think Yu-Ji’s comment was to see if your server/host listed any errors upon loading the WP Media Flickr, admin page, rather than asking you to make the change (which would make no difference as it is actually just code for ‘listing errors’ during code debugging, errors which are not usually shown) and expect a difference.
My experience: I have just downloaded v1.0.3 and tested the installation procedure on WP 2.5.1 (server host has PHP Version 5.2.x and mySQL 5.0.xx) with no problems authenticating to Flickr. Although CURL is enabled, allow_url_fopen has been turned off.
@Mosey:
Oh I did not know that man! Sorry! I too run PHP5 with curl enabled. Not sure about allow_url_fopen. I am confused with myself being the ONLY person with this problem!!
@Prasannah: No worries. Did the debug code throw up any errors or messages for you at all? I think anything from there would be the most useful for the developer, Yu-Ji.
I’m not sure if you were the only person, a “Manuel” mentions having the same authentication issue as well.
And for the next part: I presume this is what you’re aware of already, so apologies for mentioning it if you do: if you visit e.g. http://help.mosso.com/article.php?id=082 and copy/paste the code in the middle (between the blurb) to a new page called e.g. ‘something.php’, after uploading it to your server, you can load the file up in your browser and look for allow_url_fopen.
@Mosey:
Yeah I do know about phpinfo!! Let me show you mine ->
http://pastebin.ca/1004730
Hi,
Thanks for this great plugin. I have some suggestions:
1. Can you please add a feature to allow us to choose different Flickr photo set?
2. Can you please add a feature to add page navigations if there’s more than 2 pages? So if I have 50 pages, and I want to insert a photo in the 50th page, I have have to click the Next page link for 49 times!
hi, great plugin, thanks.
i use «class=”lightview”».
i would like to automate the «rel=”"» to have the name of the post category.
i tried to define «a.rel = $single_cat_title();» on line 477 in «wp-media-flickr.php», but it’s not working…
can u help me?
はじめまして。wordpress.comからやってきました。
「large」ではなく「original」を選べるようになりませんか?
wp2.3でflickr managerというplug-inを使っていたのですが、
wp2.5にしてから他のplug-inとコンフリクトしてしまい、
ほかを探していたところWordpress Media Flickrにたどり着きました。
In my error_log I’m getting this error when I try to use Settings -> Media Flickr
PHP Parse error: syntax error, unexpected $end wp-content/plugins/wordpress-media-flickr/wp-media-flickr-admin.php on line 120, referer: http://wp.dembowski.net/wp-admin/options-general.php
And I get a blank page for the settings portion. The plugin works, but I’d like to be able to select images from my own Flickr account.
Any idea what I’m missing in my PHP5 install?
Thanks,
Jan Dembowski
Hello,
Thank you for put in the lightview support!
I’m now interested in the same idea that baa has – automate the generation of the «rel=”"» part. I want to generate the post id, example: for post #192, the «rel=”"» will be «rel=”gallery[192]“».
I tried to put in “gallery['']” in the media flickr management page, but that didn’t work out.
Can someone shed some light on how to code this properly? Thank you.
すばらしいプラグインありがとうございます。
質問です:複数のFlickrアカウントに対応するにはどうしたらよいのでしょう?
Thanks for this great plugin. I have a question;
Are there any way to handle multiple Flickr accounts?
Great plugin. I have not run into any issues with it on 2.6 yet.
One plugin interaction that I have been having is with lighter-admin-drop-menus. When this plugin is installed, it provides custom icons next to the drop-down items, but there is no image for Media Flickr. I think it has something to do with the was add_options_page is being called, but I have been unable to debug it.
What I get is:
but what I expect to see is:
Note that the plugin.png is missing. Looking at the source to the lighter-admin-drop-menus code, it seems to think it will find a custom image icon for Media Flickr, but cannot locate it and the URL is incomplete.
Any ideas or suggestions appreciated.
Sorry — forgot that I can;t drop code in comments like that.
What I get is:
img src=’http://www.heyvan.com/blogs/steve/wp-content/plugins/lighter-admin-drop-menus/images/’ height=’16′ width=’16′ alt=”/
but what I expect to see is:
img src=’http://www.heyvan.com/blogs/steve/wp-content/plugins/lighter-admin-drop-menus/images/plugin.png’ height=’16′ width=’16′ alt=”/
Note that the plugin.png is missing. Looking at the source to the lighter-admin-drop-menus code, it seems to think it will find a custom image icon for Media Flickr, but cannot locate it and the URL is incomplete.
はじめまして。Wordpress Media Flickrを愛用させていただいております!WordPress2.6.2にてWordpress Media Flickr1.0.3を使用した際に、「写真を追加」ボタンで開くダイアログに、下記にエラーが表示されてしまいます。エラーを無視すれば機能自体は正常に動作しているように見受けられます。WordPress2.6.2とメディアアップロード系のプラグインで発生するエラーのようなのですが、お時間あればぜひご対応をよろしくお願いいたします。
–
Warning: call_user_func_array(): First argumented is expected to be a valid callback, ‘media_admin_css’ was given in /*****/wp-includes/plugin.php on line 311
–
The plugin works, but I always see this error at the top of the thumbnail window:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘media_admin_css’ was given in **************/wp-includes/plugin.php on line 339
Thanx! Good plugin.
ずっとプラグイン、私用させて頂いています!
で…wordpressを2.8.2にしたら、設定画面にアクセス出来なくなりました。。
flickrのアカウント、鞍替えしようと思ったんですが…
プラグイン、スゴク気に入っているので、何とかなると嬉しいです!
>ochappaさん
同じ現象が発生しましたが、解決できました。
私の環境ではwordpress-media-flickr/wp-media-flickr.phpの78行目を変更したところ開けるようになりました。
修正前:
add_options_page(__(‘Media Flickr’, ‘wp-media-flickr’), __(‘Media Flickr’, ‘wp-media-flickr’), 8, “options-general.php?page=”.$plugin_basename.”/wp-media-flickr-admin.php”);
修正後:
add_options_page(__(‘Media Flickr’, ‘wp-media-flickr’), __(‘Media Flickr’, ‘wp-media-flickr’), 8, dirname(__FILE__).’/wp-media-flickr-admin.php’);
以上、ご参考になれば。
Media Flickr便利ですね!
>kamabisさん
ochappaさんと同じ現象でしたが78行目直したら解消しました。
感謝!
2.8.4では動かない?のかな。
kamabisさんのとおり78行目を同様に修正してみたのですが、駄目でした。
>機会忍者さん
私が動作させている環境は2.8.4の英語版ですが問題なく動いています。
ということで、手元の開発用環境(2.8.4の日本語)で未修正状態のエラーメッセージなど確認してみました。
修正前:
設定>>MediaFlickr を開こうとすると日本語版では「このページにアクセスするための十分なアクセス権がありません。」と表示され設定画面に入れない。
修正方法:
wordpress-media-flickr/wp-media-flickr.phpの78行目を変更(3つ前のポスト参照)。
もしかして機会忍者さんの方で起きている現象は上記修正前のものとは違うのではないでしょうか?
確認してみてください。
# GPLのようだしフォークさせちゃって自分の手元でメンテナンス引き継いだほうがいいんだろうか?
> kamabisさん
返事ありがとうございます!
ご指摘いただいたエラーのとおり(「このページにアクセスするための十分なアクセス権がありません。」と表示され設定画面に入れない。)で、自分も78行目を直せば動く!と思ってやってみましたが、管理画面だけでなくアクセスすると画面が真っ白になってしまう状態です。
もう少し奮闘してみます(パーマリンクの設定とかかなぁ・・modrewriteで転けたときと似てる気がする)
何度もすいません。結局解決せず、よくわからない度壺にはまったので、別プラグインにしてしまいました。
WordPress 2.8 以降に対応するバージョンをリリースしました。
http://factage.com/yu-ji/2009/09/25/wordpress-media-flickr-1-1-0/
機械忍者 さんが ポストしている現象と同じです。
設定>Media Flickr
真っ白画面。
WP2.9なので、対応していないのでしょうか?
v1.1において、wp-media-flickr-admin.php の98,99行目で、phpのshort open tag ( ) が使われているため、環境によっては設定画面が開けないようです。
にしたら開けるようになり、正常に動作しました。
大変便利に使わせていただいております。便利なプラグインを公開していただきありがとうございました!
@akiyan
さきほどこちらの問題を修正した 1.1.1 のバージョンをリリースしました。
詳しい現象についてご連絡いただきありがとうございました。
プラグインを使わせていただこうと、ダンロードして設定しましたが、なぜか写真をインサートしようとエディタの上のアイコンをクリックしても、表示する画面の中に、登録した写真がでてきません。検索ですべての写真を選んだ場合は、写真が表示されます。なぜか自分のphotostreamが見えない状態です。wordpress 2.9.2です。CentOS上のappacheで動かしています。編集は、Windows7のchrome5.0ですが、Safariでも同じ現象を確認しました。仕方が無いので、他のプラグインにしようか迷っているところです。
試行錯誤しましたが、何とか使えるようになりました。どの変更が有効だったのかわかりませんが。。。」
ピンバック: wordpressとflickrの連携について参考になれば。 | 大地に立つ。
ピンバック: WP LOVE PLUGIN » Blog Archive » [WordPress Media Flickr]自分のFlickrの写真を簡単に貼り付け - WordPressのプラグインを紹介
ピンバック: そのうち試してみたいWORDPRESSのプラグイン27個 | WgimP
ピンバック: » WordPressの記事にFlickrの写真を直接貼り付ける
ピンバック: FlickrPressを試しつつポスト。 » 泣きながら撤退。
ピンバック: 2011年版WordPressに入れた30のプラグイン | のぶろぐ
ピンバック: 記事の中にflickrの写真を挿入する | モノストック|mono stock|デザインの便利ネタ