{"id":72194,"date":"2011-08-11T08:00:00","date_gmt":"2011-08-11T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/flickr-shortcode-importer\/"},"modified":"2017-02-07T20:38:00","modified_gmt":"2017-02-07T20:38:00","slug":"flickr-shortcode-importer","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/flickr-shortcode-importer\/","title":{"rendered":"Flickr Shortcode Importer"},"content":{"rendered":"<p>Flickr Shortcode Importer imports [flickr], [flickrset], [flickr-gallery] shortcode and Flickr-sourced A\/IMG tagged media into the Media Library. Furthermore, it transforms the post content [flickr] shortcodes into links containing the Media Library based image of the proper size and alignment.<\/p>\n<p>Import can be run directly from edit page and post screens.<\/p>\n<p>The first [flickr] image found in post content is set as the post\u2019s Featured Image and removed from the post content. The remaining [flickr] shortcodes are then transformed as image links to their attachment page.<\/p>\n<p>[flickrset] and [flickr-gallery] shortcodes are converted to [ gallery] after the Flickr set images have been added to the Media Library. If \u2018Set Featured Image\u2019 is checked in Options, then the first image of the [flickrset] is used as such.<\/p>\n<p>Flickr-sourced A\/IMG tagged media is converted into [flickr] and then imported as normal. Great for finally bringing into your control all of those media items you\u2019ve been using, but now Flickr is giving you \u2018Image is unavailable\u2019 for. A\/IMG tag is processed before IMG to prevent unexpected results.<\/p>\n<p>Image attribution links can be added if enabled via Settings.<\/p>\n<p>This plugin is handy for transitioning from plugin <code>wordpress-flickr-manager<\/code> and <code>flickr-gallery<\/code> to your own Media Library because you have CDN services or want to move off of third party software.<\/p>\n<p>There is no restore functionality. Backup beforehand or be prepared to revert every transformed post by hand via the post revision tool.<\/p>\n<h4>Primary Features<\/h4>\n<ul>\n<li>API<\/li>\n<li>Automatically adds media ids to newly inserted gallery shortcodes<\/li>\n<li>Flickr-sourced A\/IMG tagged media imported into WordPress<\/li>\n<li>Media of [flick] shortcodes are imported and converted to locally hosted A\/IMG<\/li>\n<li>Media of [flickrset] and [flickr-gallery] shortcodes are imported and converted to [ gallery]<\/li>\n<li>Settings export\/import<\/li>\n<li>Settings screen<\/li>\n<\/ul>\n<h4>Handled shortcode & media samples<\/h4>\n<ul>\n<li>[flickr size=\u201dsmall\u201d float=\u201dleft\u201d]http:\/\/www.flickr.com\/photos\/dancoulter\/2619594365\/[\/flickr] (image)<\/li>\n<li>[flickr height=\u201d300\u2033 width=\u201d400\u2033]http:\/\/www.flickr.com\/photos\/dancoulter\/2422361554\/[\/flickr] (video)<\/li>\n<li>[flickr id=\u201d5348222727\u2033 thumbnail=\u201dsmall\u201d overlay=\u201dfalse\u201d size=\u201dlarge\u201d group=\u201d\u201d align=\u201dnone\u201d]<\/li>\n<li>[flickrset id=\u201d72157631107721746\u2033 thumbnail=\u201dsmall\u201d photos=\u201d\u201d overlay=\u201dtrue\u201d size=\u201dlarge\u201d]<\/li>\n<li>[flickr-gallery mode=\u201dphotoset\u201d photoset=\u201d72157626302265777\u2033]<\/li>\n<li>[flickr-gallery mode=\u201dtag\u201d tags=\u201dfoo,bar\u201d tag_mode=\u201dall\u201d]<\/li>\n<li>[flickr-gallery mode=\u201dinteresting\u201d]<\/li>\n<li>[flickr-gallery mode=\u201drecent\u201d]<\/li>\n<li>[flickr-gallery mode=\u201dsearch\u201d tags=\u201dbarcamp\u201d group_id=\u201d431412@N25\u2033]<\/li>\n<li><code><a class=\"tt-flickr tt-flickr-Medium\" title=\"Khan Sao Road, Bangkok, Thailand\" href=\"http:\/\/www.flickr.com\/photos\/comprock\/4334303694\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/farm3.static.flickr.com\/2768\/4334303694_37785d0f0d.jpg\" alt=\"Khan Sao Road, Bangkok, Thailand\" width=\"500\" height=\"375\" \/><\/a><\/code><\/li>\n<li><code><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/farm3.static.flickr.com\/2768\/4334303694_37785d0f0d.jpg\" alt=\"Khan Sao Road, Bangkok, Thailand\" width=\"500\" height=\"375\" \/><\/code><\/li>\n<\/ul>\n<h4>Settings Options<\/h4>\n<p><strong>Import Settings<\/strong><\/p>\n<ul>\n<li>Skip Importing Videos \u2013 Importing videos from Flickr often fails. Shortcode is still converted to object\/embed linking to Flickr.<\/li>\n<li>Import Flickr-sourced A\/IMG tags \u2013 Converts Flickr-sourced A\/IMG tags to [flickr] and then proceeds with import.<\/li>\n<li>Set Featured Image \u2013 Set the first [flickr] or [flickrset] image found as the Featured Image. Will not replace the current Featured Image of a post.<\/li>\n<li>Force Set Featured Image \u2013 Set the Featured Image even if one already exists for a post.<\/li>\n<li>Remove First Flickr Shortcode \u2013 Removes the first [flickr] from post content. If you use Featured Images as header or lead images, then this might prevent duplicate images in your post.<\/li>\n<li>Make Nice Image Title? \u2013 Try to make a nice title if none is set. For Flickr set images, Flickr set title plus a numeric suffix is applied.<\/li>\n<li>Replace Filename with Image Title? \u2013 Mainly for SEO purposes. This setting replaces the imported media filename with the media\u2019s title. For non-images, this is always done.<\/li>\n<li>Image Import Size \u2013 Size of image to import into media library from Flickr. If requested size doesn\u2019t exist, then original is imported because it\u2019s the closest to the requested import size.<\/li>\n<li>Default Image Alignment \u2013 Default alignment of image displayed in post when no alignment is found.<\/li>\n<li>Default Image Size \u2013 Default size of image displayed in post when no size is found.<\/li>\n<li>Default A Tag Class \u2013 Inserts a class into links around imported images. Useful for lightbox\u2019ing.<\/li>\n<li>Link Image to Attachment Page? \u2013 If set, post single view images are linked to attachment pages. Otherwise the image links to its source file.<\/li>\n<li>Image Wrap Class \u2013 If set, a span tag is wrapped around the image with the given class. Also wraps attribution if enabled. e.g. Providing <code>flickr-image<\/code> results in <code>&lt;span class=\"flickr-image\"&gt;|&lt;\/span&gt;<\/code><\/li>\n<li>Set Captions \u2013 Uses media title as the caption.<\/li>\n<li>Set Descriptions \u2013 Include Flickr descriptions in media information.<\/li>\n<li>Include Flickr Author Attribution? \u2013 Appends Flickr username, linked back to Flickr image to the imported Flickr image.<\/li>\n<li>Flickr Author Attribution Text<\/li>\n<li>Flickr Author Attribution Wrap Class \u2013 If set, a span tag is wrapped around the attribution with the given class. e.g. Providing <code>flickr-attribution<\/code> results in <code>&lt;span class=\"flickr-attribution\"&gt;|&lt;\/span&gt;<\/code><\/li>\n<li>Add Flickr Link in Description? \u2013 Like <code>Include Flickr Author Attribution<\/code> but appends the image description.<\/li>\n<li>Flickr Link Text<\/li>\n<li>Add Image License to Description? \u2013 Append image license and link to image description.<\/li>\n<li>Flickr Image License Text<\/li>\n<\/ul>\n<p><strong>Posts Selection<\/strong><\/p>\n<ul>\n<li>Posts to Import \u2013 A CSV list of post ids to import, like \u20181,2,3\u2019.<\/li>\n<li>Skip Importing Posts \u2013 A CSV list of post ids not to import, like \u20181,2,3\u2019.<\/li>\n<\/ul>\n<p><strong>Testing Options<\/strong><\/p>\n<ul>\n<li>Import Limit \u2013 Useful for testing import on a limited amount of posts. 0 or blank means unlimited.<\/li>\n<li>Debug Mode \u2013 Bypass Ajax controller to handle posts_to_import directly for testing purposes.<\/li>\n<\/ul>\n<p><strong>Post Options<\/strong><\/p>\n<ul>\n<li>Post [flickr] Import Widget? \u2013 Minimum role to enable for [flickr] Import wi<br \/>\ndget on posts and page edit screens.<\/li>\n<li>Enable for Pages<\/li>\n<li>Enable for Posts<\/li>\n<li>Enable for Media<\/li>\n<li>Enable for custom post types \u2013 if any<\/li>\n<\/ul>\n<p><strong>Flickr API<\/strong><\/p>\n<ul>\n<li>Flickr API Key \u2013 <a href=\"http:\/\/www.flickr.com\/services\/api\/\" rel=\"nofollow ugc\">Flickr API Documentation<\/a><\/li>\n<li>Flickr API Secret<\/li>\n<li>Flickr User ID \u2013 For Flickr Gallery plugin. Example: 90901451@N00<\/li>\n<li>Images Per Page \u2013 For Flickr Gallery plugin.<\/li>\n<\/ul>\n<p><strong>Reset<\/strong><\/p>\n<ul>\n<li>Reimport Flickr Source Images \u2013 Needed when changing the Flickr image import size from prior imports.<\/li>\n<li>Export Settings \u2013 These are your current settings in a serialized format. Copy the contents to make a backup of your settings.<\/li>\n<li>Import Settings \u2013 Paste new serialized settings here to overwrite your current configuration.<\/li>\n<li>Remove Plugin Data on Deletion? \u2013 Delete all Flickr Shortcode Importer data and options from database on plugin deletion<\/li>\n<li>Reset to Defaults? \u2013 Check this box to reset options to their defaults<\/li>\n<\/ul>\n<h3>Notes<\/h3>\n<ul>\n<li>Backup your database before importing. You can use revision to revert individual posts, but doing so in mass is a major PITA.<\/li>\n<li>During my own imports, a post with one [flickr] entry could take a minute. Then posts with many [flickr] entries, several Flickr-source\u2019d A\/IMG tags and [flickset] with 30 or so photos took over 10-minutes to import.<\/li>\n<li>During import, it might look like nothing is happening. The progress bar only moves after each import succeeds or fails.<\/li>\n<li>I recommend setting the limit in options to 1 and then testing your installation. That sure makes for easier recovery in case something goes wrong. If something doesn\u2019t work, report it, https:\/\/wordpress.org\/extend\/plugins\/flickr-shortcode-importer\/.<\/li>\n<li>It\u2019s strongly recommended to deactivate plugins like WordSocial, WP Smush.it and similar to prevent extended import times. You can always enable them and run them enmasse later.<\/li>\n<li>Make sure you have enough disk space. Figure on about 1 GB per 1,000 photos given your using Scissors-continued and have a maximum image size of 1280 x 1024. If your images can be larger, then you\u2019ll probably need 1 GB per 250 photos imported.<\/li>\n<li>Using your own Flickr API Key might be necessary. Test a single import and see the results before setting your own.<\/li>\n<\/ul>\n<h3>API<\/h3>\n<ul>\n<li>Read the <a href=\"https:\/\/github.com\/michael-cannon\/flickr-shortcode-importer\/blob\/master\/API.md\" rel=\"nofollow ugc\">Flickr Shortcode Importer API<\/a>.<\/li>\n<\/ul>\n<h3>Localization<\/h3>\n<p>You can translate this plugin into your own language if it\u2019s not done so already. The localization file <code>flickr-shortcode-importer.pot<\/code> can be found in the <code>languages<\/code> folder of this plugin. After translation, please <a href=\"https:\/\/axelerant.com\/contact-axelerant\/\" rel=\"nofollow ugc\">send the localized file<\/a> for plugin inclusion.<\/p>\n<p><strong><a href=\"https:\/\/nodedesk.zendesk.com\/hc\/en-us\/articles\/202294892\" rel=\"nofollow ugc\">How do I localize?<\/a><\/strong><\/p>\n<h3>Thank You<\/h3>\n<ul>\n<li>Thank you for tobylewis for his file_get_contents_curl and custom post types contributions.<\/li>\n<li>A big thank you to \u017deljko A\u0161\u010di\u0107 of http:\/\/www.touristplayground.com\/ for feedback and ideas.<\/li>\n<li>Initial code is modeled after Viper007Bond\u2019s class based Regenerate Thumbnails plugin. The AJAX status and single auto-submission operations were a big help.<\/li>\n<li>[flickr] shortcode handling code copied from Trent Gardner\u2019s very fine Flickr Manager plugin.<\/li>\n<li>Hat\u2019s off to Alison Barret for her Settings API tutorials and class My_Theme_Options.<\/li>\n<\/ul>\n<p>Current development by <a href=\"https:\/\/axelerant.com\/about-axelerant\/\" rel=\"nofollow ugc\">Axelerant<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Flickr Shortcode Importer imports [flickr], [flickrset], [flickr-gallery] shortcodes and Flickr-sourced media into the Media Library.<\/p>\n","protected":false},"author":65,"featured_media":279143,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Flickr Shortcode Importer - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Flickr Shortcode Importer imports [flickr], [flickrset], [flickr-gallery] shortcodes and Flickr-sourced media into the Media Library."},"footnotes":""},"categories":[1],"tags":[985,4267,223,730,243],"class_list":["post-72194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-featured-image","tag-flickr","tag-image","tag-import","tag-photo"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/72194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=72194"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/72194\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/279143"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=72194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=72194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=72194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}