前言介紹
- 這款 WordPress 外掛「SimpleTwit」是 2013-07-10 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2014-10-17,距離現在已有 3852 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.3 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
simple | widget | designer | developer | twitter feed |
內容簡介
一個專為開發人員和設計師設置 WP_Cron 的外掛,利用OAuth和Twitter v1.1 REST API拉取並緩存使用者的動態。對於想在網站上添加Twitter動態的開發人員,這個外掛提供了一切必要的工具和OAuth處理、緩存避免過快請求和易於格式化推文的工具(無需預定義樣式)。 對於設計師,這個外掛為他們創建了一個小工具,可以輕鬆地在主題中顯示和設置推文樣式。
功能特色
為設計人員和開發人員提供查看使用者推文的方法
創建小工具方便在主題的側邊欄中顯示最新推文,可以自定義顯示推文數量和訊息內容(如內容、時間、作者、來源)
明確標記Retweets和Replies方便設置和操作
輕鬆設置用戶名和OAuth認證
緩存推文以避免超過請求速率的問題
使用WP_Cron輕鬆安裝並自動調用API
使用OAuth和v1.1 Twitter REST API
用法
有兩種主要方法可以訪問推文,一種面向開發人員,另一種面向設計師。
對於設計師
這個外掛創建了一個小工具,允許在主題的任何側邊欄中顯示最新推文。當添加小工具時,您可以自定義顯示推文數量和信息內容,可選擇內容、時間、作者和來源。小工具輸出HTML5,並帶有自定義樣式的每個元素,包括將推文標註為Retweets和Replies。您可以設置此小工具,使其完全符合您的需要。
對於開發人員
對於那些想做些特別事情並願意親自下手的開發人員,這個外掛可以提供對推文資料庫的強大訪問。可以透過模板標籤獲取推文,並提供一個特殊的物件(它包含了很多功能):STF_Tweet。它將返回一個包含這些物件的陣列(而不是返回WP_Post物件),或者通過將推文的post ID傳遞給物件構造函數,創建一個物件。
當處理推文時,該物件提供了一些有用的方法。該物件有以下可訪問的屬性:
is_retweet - 如果這是一個Retweet,則該布爾值為true
is_reply - 如果這是對其他推文的回覆,則該布爾值為true
content - 推文的內容,這會自動格式化,以便鏈接其他提到的Twitter用戶、標籤和內嵌鏈接
time - 推文的時間戳,已調整時區為WordPress安裝,格式為Y-m-d H:i:s
time_gmt - 推文的時間戳,已調整時區為GMT,格式為Y-m-d H:i:s
time_str - 字符串,表示自發推文以來的時間。這是Twitter通常會給推文日期分類,對國際間的觀眾來說很適用,因為它不受時區的限制
物件有以下方法:
get_source() - 返回以推特狀態更新的裝置的字符串表示
get_raw_tweet() - 返回以緩存格式保留的推文API的未經處理的響應,這應該很少被使用,因為幾乎可以在不載入此物件的情況下訪問推文的所有信息
get_author_link() - 返回字符串,即連結到Tweet作者的Twitter頁面的鏈接
get_retweet_info() - 返回關於Retweet的原始推文的信息(如果推文不是一個Retweet,則返回false)。返回的物件包含:
retweeted_status_id - 其中該Retweet原始推文的post ID
retweeted_status_url - 用於構造原始推文的URL
retweeted_screen_name - 重新發表原始推文的屏幕名稱
retweeted_name - 重新發表原始Tweet作者的名字
原文外掛簡介
A plugin for developers and designers that sets up a WP_Cron to pull in and cache a user’s stream using OAuth and the Twitter v1.1 REST API. It’s all that a developer needs to incorporate a Twitter feed on their site, the OAuth handling, caching to avoid rate limiting, and utilities to easily format Tweets correctly without predefined styles to work around. For designers, the plugin creates a widget that can be used to easily display and style Tweets in your theme.
Features
Provides access to a user’s Tweets for both designers and developers
Creates a widget for easy display of the latest Tweets in your theme’s sidebar
Clearly designates Retweets and Replies to allow easy styling and manipulation
Easily set Username and OAuth credentials
Caches Tweets to prevent rate limiting problems
Hooks into WP_Cron for easy installation and automatic API calls
Uses OAuth and the v1.1 Twitter REST API
Usage
There are two main ways to access the Tweets, one aimed at developers and one aimed at designers.
For Designers
This plugin creates a widget that allows display of the most recent Tweets in any sidebar in your theme. When adding the widget you can customize how many Tweets and what information is displayed, choosing from content, time, author, and source. The widget outputs HTML5 which with classes to style on every element, including flagging Tweets as Retweets and Replies. You will be able to style this widget to look exactly as you need it it to.
For Developers
For those with something special in mind and willing to get their hands dirty, this plugin provides powerful access to the DB of Tweets. Tweets can be grabbed through a template tag and are provided in a special object jam packed with features:
STF_Tweet
An array of these objects is returned by the template tag instead of the WP_Post object, or an individual can be constructed by passing the post ID of the Tweet to the object constructor.
The object provides a number of useful methods when working with Tweets. This object has the following accessible properties:
is_retweet – This boolean will be true when the Tweet is a Retweet
is_reply – This boolean will be true when the Tweet is a Reply to another Tweet
content – The content of the Tweet, this will be automatically formatted to link other referenced Twitter users, hashtags, and inline links
time – A timestamp of the Tweet, timezoned to the WP install, in Y-m-d H:i:s format
time_gmt – A timestamp of the Tweet, timezoned to GMT, in Y-m-d H:i:s format
time_str – The string that represents how long it’s been since the Tweet, in the way that Twitter usually dates its Tweets, good for an international audience since this isn’t timezone specicific
The object has the following methods:
get_source() – Returns the string representing the device used to Tweet this status
get_raw_tweet() – Returns the cached raw response from the API as an object, this should rarely be used as almost all information on the Tweet is accessible without loading this object
get_author_link() – Returns a string that is the link to the Tweet’s author’s page on Twitter
get_retweet_info() – Returns the info on the original Tweet of a Retweet, or false if the Tweet is not a Retweet, the object returned contains:
username – The Twitter username of the original Tweet
screenname – The Twitter screenname of the original Tweet
content – The unformatted content of the original Tweet
time_gmt – The GMT time of the Retweet
url – A direct link to the original Tweet
user_url – A direct link to the profile of the original Twitter user
get_reply_info() – Returns the info on the original status that this Tweet is replying to, the info is as follows:
url – The direct link to the original status
in_reply_to_name – The screenname of the original Twitter user
in_reply_to_user_url – The direct link to the original Twitter user’s profile
get_author_info() – Gets the raw object response from the Twitter API scrape, there are a lot of variables in the raw object, but here’s the main attributes:
id_str – The id of the user
name – The nice name of the author account
screen_name – The username of the author account
description – The self-provided description of the author on Twitter
created_at – The creation date of the Twitter author account
profile_image_url – Link to the profile image of the Twitter author account
profile_image_url_https – Secure link to the profile image of the Twitter author account
stf_get_tweets($args)
This will be the main function used to get Tweets from the DB. This function takes an array of parameters as follows:
$args['num'] – This tells us how many Tweets to get from the DB, defaults to 5
$args['offset'] – This tells us how many Tweets to skip over when selecting our Tweets, defaults to 0
$args['retweets'] – This tells us whether or not to get Retweets, defaults to true
$args['replies'] – This tells us whether or not to get Replies, defaults to true
This function returns an array of STF_Tweet objects, the use of these objects is described above
Contributors
George Yates III
alexsomeoddpilot
Future Development
Database Functions (Delete, Rescrape)
Multiple Twitter Streams
Define the interval between feed scrapes
Allow users to Retweet and Reply with their own accounts right from your site
Add in shortcode support for recent Tweet display
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「SimpleTwit」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.3 | 1.1.1 | 1.2.0 | 1.2.1 | 1.2.2 | trunk |
延伸相關外掛(你可能也想知道)
WP Live CSS Editor 》這是一個 CSS 即時編輯器,可以讓您預覽 CSS 的即時變化並保存它的變更。, 它會保存每次儲存的日期備份,因此如果它破壞了網站,您可以回到先前的版本。您也...。
WordPress Theme Demo Bar 》WordPress Theme Demo Bar 是 WordPress 的外掛,它能讓使用者在不啟用主題的情況下預覽主題。Demo bar 將顯示在頁面頂部,讓用戶預覽其他主題。Demo bar 在...。
Restore Post Id 》這個外掛可以恢復連結、文章和頁面 ID 欄位在其各自的管理介面中的顯示。這個外掛可供設計師在製作需要特定連結、文章或頁面 ID 知識的複雜佈景主題時使用。。
MyStyle Custom Product Designer 》您可以使用MyStyle自訂產品設計器在WooCommerce中啟用任何產品的個性化/自訂。這使得任何使用者都可以設計自己的圖形,並使用逼真的實時產品預覽,生成符合高...。
WP Designer 》WP Designer 可以使用最佳自訂實踐方式,以符合標準的方式為您的網站添加額外的功能,讓您將站點的功能保持在主題之外,使其不依賴主題。這在各種情況下都非...。
Shirt Product Designer for WooCommerce 》讓您可以將產品自定義/設計者整合到您的 WooCommerce 商店中。, 非常容易使用。, 免費版功能, , , 添加 5 種變異色彩, 您可以為每個產品定義 5 種變異/色彩,...。
Smart Customizer for WooCommerce 》總結文案:, - Smart Customizer是一個網路印刷產品定制解決方案,允許客戶通過添加自定義文本、向量圖形和圖像來創建自己的設計。, - 賦予客戶輕松個性化產...。
Ribbon Maker 》一款用於創建絲帶/角落裝飾的 WordPress 外掛,可讓你為每個角落生成自己的絲帶,或者上傳自己的圖像。, 功能, , 所有靜態角落絲帶的功能, 設置消息, 設置鏈...。
OpenBadges.me Open Badges designer 》開放徽章(Open Badges)是一種新的線上標準,用於認可和驗證學習:在線上和離線上學習技能後獲得徽章,為你教授的技能授予認可,展示你的徽章在重要場所。此...。
Web To PrintQ – Product Designer 》專業版, , Pro, , Web To PrintQ 是一個 WooCommerce 擴充功能,允許您的客戶個性化任何類型的印刷產品:從名片、手冊、傳單、信封、明信片到婚禮卡、包裝、...。
Printeers Print & Ship Zakeke Extension 》Zakeke 擴充功能將 Zakeke 功能添加到 Printeers Print & Ship 外掛。若要使用此擴充功能,必須事先安裝 Printeers Print & Ship 和 Zakeke 外掛,否...。
Riaxe Product Customizer 》- Riaxe產品自定義器擁有簡單直觀的用戶界面,適應最終用戶的設備。- 設計器工作室的語言、外觀和感覺可以進行自定義,以實現與您的網站無縫集成。- 它解決了...。
Landera – Ultimate Page Builder 》Landera 是一個拖放式頁面建構工具,使您能夠即時設計您想像中的任何佈局。此外,它提供了先進的網格系統和外觀自定器,讓您可以在頁面上建立專業佈局。還提...。
Titan Elements 》簡要描述, WP Titan Elements是為了成為更好、更高效的視覺化設計師而創建的。Titan的革命性設計來自於它允許100%的自由。它使初學者擁有很好的體驗,但同時...。
RainyShots 》這個外掛為 WordPress 新增一個函式 rs_shots(),可以回傳一個包含指定球員最新 15 個 Dribbble 圖片的陣列。函式回傳的型別為JSON 格式,可在 PHP 中直接使...。