內容目錄
前言介紹
- 這款 WordPress 外掛「Twitter Image Host」是 2010-01-08 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2011-08-07,距離現在已有 5019 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
內容簡介
n allows you to host Twitter images on your own site, instead of using third-party hosting services. With this plugin, you can resize and thumbnail images, and display them in your WordPress template. You can even post status updates to Twitter while submitting images. The plugin provides a widget and shortcode to display uploaded images, with options for filtering by Twitter account, styling with CSS, and using Lightbox/Thickbox.
To use the widget, simply drag the "Twitter Images" widget into a sidebar and configure it. Shortcodes can also be inserted into pages and posts using the "twitter-images" shortcode, with options for displaying a specific number of items, image thumbnail view, custom thumbnail sizes, and more. You can also use the template tags to display uploaded images in a custom template.
This plugin uses Twitter's authentication and allows for a list of authorized accounts, so you can let others use your image host. It also provides an API modeled on that of img.ly, which is compatible with Tweetie (for iPhone) and other Twitter clients that speak this protocol and offer configuration of custom image hosting services.
原文外掛簡介
Keep your traffic in the family! Host Twitter images on your own site, with support for comments and trackbacks, image
resizing and thumbnailing with Lightbox.
Twitter doesn’t yet come with its own inline image support, so we tend to be limited to using image hosting services,
and linking to them with short URLs. So, services like Twitpic host the image, and we direct traffic to them in return.
Better to take advantage of that traffic, and host images on your own site. This way, viewers come to your site, instead
of someone else’s!
Posted images are displayed in your normal WordPress template, with support for comments and trackbacks, without any
setup required. Most themes should work with this, but if not, or if a different layout is required, a custom theme template
can also be provided (see ‘Creating a Template’).
Provides an HTML form for posting image content, as well as an API modelled on that of img.ly,
compatible with Tweetie (for iPhone) and any other Twitter clients that speak this protocol and offer configuration of
custom image hosting services.
Uses Twitter’s authentication and a list of authorised accounts, so you can let others use your image host too. You can even
post status updates to Twitter while submitting images.
Provides a widget and shortcode to display uploaded images. This supports filtering by Twitter account, styling with CSS,
and Lightbox/Thickbox.
Widget
To use the widget, simply visit the Widgets page and drag the “Twitter Images” widget into a sidebar and configure it.
Shortcode
Shortcodes are snippets of text that can be inserted into pages and posts. These snippets are replaced by various generated content.
Twitter Image Host provides a ‘twitter-images’ shortcode to display images you have uploaded within a page/post.
Available parameters:
count Number of items to display
id Single ID (eg 'abcde') of one image to display, or multiple IDs separated by commas (abcde,fghij)
view Image thumbnail view: squares, proportional, large or custom
custom_thumbnail_width Custom width for thumbnails, when 'view' is 'custom'
custom_thumbnail_height Custom width for thumbnails, when 'view' is 'custom'
custom_thumbnail_crop Whether to crop custom thumbnails
author Comma-separated list of Twitter account names to limit results to
columns Number of columns of images to display
lightbox 'true' to use Lightbox/Thickbox
Example:
[twitter-images columns=4 lightbox="true"]
PHP function
As well as the shortcode, you can also use call twitter_image_host_images() from within a template to
produce the same output. Pass the same arguments as the shortcode as associative array values:
Recently submitted images
'ATastyPixel', 'columns' => 6, 'lightbox' => true)); ?>
Tip: Use this in the twitter-image-host.php template (see ‘Creating a Single Template’, below) to display
other posted images when viewing an image. Use the_twitter_image_author() to filter the list, to show
only other submissions by the same Twitter account as the one of the currently displayed image.
Template Tags
This plugin provides several template tags, for use both in displaying single posts (see ‘Creating a Single Template’), and for custom pages which display
many posts in a loop (see ‘Using Template Tags in a Loop’).
The available template tags are:
Single Entry Tags
the_twitter_image_permalink
Returns the URL to the view page
the_twitter_image_url
Returns the full URL to the image, or the image thumbnail if the original image was large
the_twitter_full_image_url
Returns the URL to the full-sized image, if one exists, or false otherwise
the_twitter_image_title
The title of the image
the_twitter_image_date
The date (timestamp) of the image – use date() to configure the display
the_twitter_image_author
The associated Twitter account
the_twitter_image
Returns HTML to display the image and a link to the full-sized image if it exists, with Lightbox rel tags.
Loop Tags
query_twitter_images
Search for Twitter images
Available parameters (passed as associative array):
count Number of items to display
id Single ID (eg 'abcde') of one image to display, or multiple IDs separated by commas (abcde,fghij)
author Comma-separated list of Twitter account names to limit results to
has_twitter_images
Use with loop: Determine if there are more images
next_twitter_image
Use with loop: Get the next image
Creating a Single Template
By default, this plugin will use the standard post template (‘single.php’). However, if you wish, you can create a
custom template to display hosted images. The template should be called ‘twitter-image-host.php’, located within your
current theme directory.
Creating a template to use this information is fairly straightforward if you have just a little knowledge of HTML or PHP:
On your server (via an FTP program, etc.), navigate to your current theme. This will live within wp-content/themes.
Copy an existing template – single.php is usually a good candidate – and call it twitter-image-host.php.
Open up twitter-image-host.php, and delete everything that looks post-related: This usually includes everything between
the have_posts call and the matching endif, and may include some other surrounding content like an ‘Edit this post’ link.
Replace that which you have just deleted with something that uses the ‘single entry’ template tags above, like the following:
Save the file, add some content (see the ‘Posting Images’ section), and see how it looks.
Using Template Tags in a Loop
Just like the WordPress Loop template tags, the template tags provided by this plugin can be used to display multiple posted entries.
This can be used to create a custom page template that lists all submitted entries, with more flexibility than that offered by the shortcode.
Use begins with a call to query_twitter_images(), possibly with an argument to configure the search. If the result is true, then the loop begins,
conditional upon has_twitter_images(), and starting with next_twitter_image() to load the next entry. The single template tags can then be used
to customise the display of each entry.
Here is an example of use:
There are no Twitter images.
Posting Images
To start posting from your WordPress blog, select the “Twitter Image Host” menu item from the “Posts” administration section.
Enter a title for your image, select your image file, hit Submit, and you will be given the URL for the image. If you wish
to tweet straight from this facility, you will need to follow the instructions from that page to set up the plugin.
To access this facility from an application, use the access point displayed on the Twitter Image Host options page under “Settings”.
The API is more-or-less the same as that of TweetPic, img.ly, etc.
To post from Twitter (Tweetie 2) for iPhone, visit Twitter/Tweetie’s settings, and within Services, Image Service, select ‘Custom’, then
enter the API URL as listed on the options page.
Making the URL even shorter
If you run WordPress from a sub-directory (for example, http://your-site.com/blog), then the short URLs generated by this plugin will
look like http://your-site/blog/xxxxx. You can remove that ‘blog’ component via a little .htaccess trickery.
Here’s how:
Create and open a new file in your site’s webroot called “.htaccess”. If there’s one already there, just open that up and prepare to edit at the bottom.
Add the following, replacing ‘blog’ with the real subdirectory under which WordPress is installed:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/twitter-image-host-content/%1.jpg -f [OR]
RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/twitter-image-host-content/%1.png -f [OR]
RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/twitter-image-host-content/%1.jpeg -f
RewriteRule (.*) /blog/$1 [L]
This will take any requests that:
Are located in the web-root (start with a slash, followed by anything but a slash until the end)
Have a corresponding file within Twitter Image Host’s content directory
Then, it’ll rewrite the request silently to the real Twitter Image Host URL, without the viewer seeing.
In Twitter Image Host settings, set the ‘Override URL Prefix’ option to ‘http://your-site.com/’
Credits
German Translation: Walter Güldenberg
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Twitter Image Host」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.4.1 | 0.4.2 | 0.4.3 | 0.4.4 | 0.5.1 | 0.5.2 | 0.5.3 | 0.5.4 | 0.5.5 | 0.5.6 | 0.5.7 | 0.6.1 | 0.6.2 | trunk |
延伸相關外掛(你可能也想知道)
Nextend Social Login and Register 》ge and registration form, link the social accounts to the existing WordPress user accounts or create new users if necessary, enable users to link t...。
Custom Twitter Feeds – A Tweets Widget or X Feed Widget 》在您的網站上顯示可完全自訂、響應式且可被搜尋引擎爬取的 Twitter 動態資訊。 Custom Twitter Feeds 外掛將顯示完全符合您網站外觀和風格的推文,並提供大量...。
Recent Tweets Widget 》查看最新的 WordPress 外掛優惠。, 使用快取的 Twitter API v1.1 最新的 Recent Tweets Widget (最近的 Tweet 外掛)。它使用新版 Twitter API v1.1,並將 Twe...。
oAuth Twitter Feed for Developers 》一個符合 Twitter API 1.1 規範的 WordPress 外掛,為主題開發人員提供從 Twitter 使用者時間線取得物件陣列的功能。, 新的 Twitter API 需要您進行 oAuth 認...。
WP Social Bookmarking Light 》此外掛可將社交分享連結插入每篇文章的頂部或底部。, 對於主題開發人員,社交分享連結可以透過 PHP 代碼或使用短碼添加。請參閱相關文檔以獲得更多資訊。, 此...。
Social Media Widget 》快來查看適用於您網站的 WordPress 最新優惠。, 社交媒體小工具是一個簡單的側邊欄小工具,允許用戶輸入他們的社交媒體網站個人資料網址和其他訂閱選項,顯示...。
Professional Social Sharing Buttons, Icons & Related Posts – Shareaholic 》g your social share counts again with our Share Count Recovery tool. If you switch to HTTPS, change your domain name, or update your Permalinks, yo...。
Genesis Simple Share 》Genesis Simple Share是專為Genesis子佈景主題而設計的簡單易用的外掛程式。我們致力於讓預設選項和初始設定變得非常簡單實用。, 預設設定應該會自動啟用文章...。
Twitter 》此外掛提供嵌入 Twitter 內容、改善在 Twitter 上分享、轉換您的網站觀眾為 Twitter 或 Periscope 訂閱者,並輕鬆追蹤從 Twitter 广告來訪的訪問次數。, 要求...。
Tagembed: Embed Twitter Feed, Google Reviews, YouTube Videos, TikTok, RSS Feed & More Social Media Feeds 》Tagembed 是領先的社交媒體聚合工具,讓使用者聚合、整理和嵌入 Instagram Feed、Twitter Feed、Facebook Feed、YouTube Video、Google Reviews、RSS Feed、L...。
Simple Twitter Tweets 》一個簡單的 Twitter 儀表板外掛,使用 Twitter OAth 和 API v1.1,並備份以確保始終顯示您的 Tweets。, 為什麼要使用這個外掛?, 我們的客戶,尤其是共享主機...。
Easy Twitter Feed Widget Plugin 》Easy Twitter Feed Widget 外掛使用 Twitter Widget,不需建立 API 即可在 WordPress 網站上顯示推文,不需要建立 Twitter 應用程式。該外掛提供方便的介面,...。
WP TFeed 》文件 | 支援 | 範例 | 進階版, WP TFeed 是 WordPress 的免費 Twitter 外掛。您可以使用這個外掛透過 shortcode 或小工具,在網站上任何位置顯示即時的 Twitt...。
AccessPress Social Login Lite – Social Login WordPress Plugin 》文件 | 支援 | 示範 | 高級版, AccessPress Social Login Lite是一個完美的免費WordPress外掛程式,可讓您的網站使用者使用其喜愛的社交網站帳戶之一註冊/登...。
Rotating Tweets (Twitter widget and shortcode) 》, 取代 捷徑,例如 [rotatingtweets screen_name='your_twitter'],或小工具,並旋轉顯示您最新的推文。, 支援新的更長推文格式, 支援280字符, 節省空間 – ...。