[WordPress] 外掛分享: DeadTrees

WordPress 外掛 DeadTrees 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「DeadTrees」是 2012-07-08 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2020-01-22,距離現在已有 1929 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.4 以上。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

johnnyb |

外掛標籤

book | books | library | reading |

內容簡介

DeadTrees 是一個 WordPress 外掛,可讓您與您的讀者分享正在閱讀的書籍。

它受到其他「我的圖書館」類型的外掛的輕微影響,例如 Now Reading/Reloaded/Redux 等系列的外掛,但這是一個完全使用 WordPress 的自訂文章類型功能重新編寫的外掛。

我寫了 Dead Trees 是因為我想在我的部落格上發布我讀書的狀況,但有時只想寫一些輕鬆的筆記,Dead Trees 讓我(和您!)可以這麼做。

版本 1.1 新增功能:多本書籍封面來源

在 1.1 版本中,書籍封面會從 OpenLibrary.org、LibraryThing 或亞馬遜取得,取決於設置以及所能取得的內容。

如果您已設置好亞馬遜的 API 憑證,您可以選擇首先或最後從亞馬遜查找封面:首先是給那些希望從亞馬遜建立聯盟收入並且擁有豐富的 API 永久配額的人,最後是給那些希望推廣獨立書籍來源或無法或不想使用亞馬遜服務的人。

對於非亞馬遜的書籍封面,首先檢查 OpenLibrary.org,因為它提供較大的圖像。如果 OpenLibrary.org 沒有某本書的封面,並且您已經設置了 LibraryThing API 金鑰,我們會嘗試在 LibraryThing 上找到該書的封面。

OpenLibrary.org 不需要任何 API 憑證或特殊配置。

如何運作

要發佈您閱讀的書籍,您需要在管理員介面中選擇「Books」並輸入書名、作者名稱、ISBN、亞馬遜的 ASIN(可能是 ISBN),如果您希望可以寫一些關於書的內容,但如果您不想寫,可以不寫。

點擊「Publish」後,DeadTrees 將會從 Open Library 或亞馬遜獲取封面並發布書籍。

您也可以像發佈文章一樣標記書籍。標記池在文章和書籍之間共用。

開發在 GitHub 上進行:https://github.com/jbeales/DeadTrees

報告問題:https://github.com/jbeales/DeadTrees/issues

查看公開面的功能,使用自定義範本:https://johnbeales.com/books/

感謝

感謝 OpenLibrary.org 和 LibraryThing 提供的開放書籍封面數據。這些分享信息的 API 讓獨立網頁成為可能並令人愉快。

疑難排解

如果您在查看第一篇書籍文章時出現 404 錯誤,請到管理員介面上的永久連結頁面(設定 > 永久連結)並在 https://github.com/jbeales/DeadTrees/issues/13 上留言或在 wordpress.org 的支援論壇發布問題。

範本
範本標籤

Dead Trees 為您創建了一些範本標籤。以下是一些重要的標籤。如果您想查看不那麼重要的標籤,請查看 template_tags.php,在那裡可以找到所有標籤:

dt_bookbox()

顯示一個包含書籍封面和連結到 Amazon.com、Amazon.ca 和 Amazon.co.uk 購買的方塊。

在 loop 中調用 dt_bookbox() 或傳遞書籍文章的 post ID 給它。

您可以通過在主題中創建名為 deadtree-bookbox.php 的文件來完全自定義 dt_bookbox() 的輸出。您可能需要從 deadtrees/template/deadtree-bookbox.php 開始。

dt_get_amazon_url($domain='amazon.com', $post_id=0)

原文外掛簡介

DeadTrees is a WordPress plugin that allows you to share the books you’ve been reading with your readers.
It’s slightly influenced by other “My Library” type of plugins, such as the whole Now Reading/Reloaded/Redux group of plugins, but is a complete re-write using WordPress’s Custom Post Type features.
I wrote Dead Trees because I want to post on my blog when I read a book, but only sometimes want to write about the book. Dead Trees lets me, (and you!), do that.
New in Version 1.1: Multiple Book Cover Sources
In version 1.1 book covers will be fetched from OpenLibrary.org, LibraryThing, or Amazon, depending on the settings, and what’s available where.
If you have set your Amazon API credentials, you can choose to look for a cover at Amazon either first or last: first for people who are working on building affiliate income from Amazon, and have plenty of API quota, or last for people who prefer to promote independent book sources or can’t or don’t want to use Amazon’s services.
For non-Amazon book covers, OpenLibrary.org is checked first as it provides larger images than other options. If OpenLibrary.org doesn’t have a cover for a book and you have set a LibraryThing API key we will fall back to looking for a cover at LibraryThing.
OpenLibrary.org does not require any API credentials or any special configuration.
How it works
To post a book that you read, you’ll go to the admin of your site and choose “Books” from the main menu. You can then enter the title of the book, the author’s name(s), ISBN, Amazon’s ASIN, (likely the ISBN), and, if you wish, you may write about the book, but you don’t have to if you don’t want to.
Hit publish and the DeadTrees will grab the cover art from Open Library or Amazon and publish your book.
You can also tag the book, just like a post. The pool of tags is shared between posts & books.
Development is on GitHub at https://github.com/jbeales/DeadTrees
Report issues at https://github.com/jbeales/DeadTrees/issues
See the public side in action, with some custom templating: https://johnbeales.com/books/
Thanks
Thanks to OpenLibrary.org and LibraryThing for providing open book cover data. APIs like these that share information make the independent web possible and fun.
Troubleshooting
If you get a 404 error when trying to view your first book post, visit the Permalinks page in the admin, (Settings > Permalinks), and please leave a comment on Github issue #13 or post in the support forums on wordpress.org to let me know that the problem isn’t fixed yet.
Templating
Template Tags
Dead Trees creates some template tags for you. Here are the important ones. If you want to see the not-so-important ones look in template_tags.php, they’re all there:
dt_bookbox()
Displays a box with the book’s cover art and links to buy it from Amazon.com, Amazon.ca, and Amazon.co.uk.
Call dt_bookbox() inside the loop or pass it the post ID of a book.
You can completely customize the output of dt_bookbox() by creating a file called deadtree-bookbox.php in your theme. You might want to copy deadtrees/template/deadtree-bookbox.php as a starting point.
dt_get_amazon_url($domain=’amazon.com’, $post_id=0)
Gets the Amazon affiliate URL for a book.
Choose which site to link to with the first argument, (can be ‘amazon.com’ ‘amazon.ca’ or ‘amazon.co.uk’, defaults to ‘amazon.com’). If called in the loop the second argument is not required, but if you want to call this outside of the loop provide the post ID of a book as the second argument.
dt_get_bookbox_image($post_id=0)
Gets the cover art for a book. If called in the loop this function can, (and should), be called with no arguments. Uses wp_get_attachment_image() to get the image.
dt_get_bookbox_comment($post_id=0)
Gets an extra comment to display in the bookbox. You enter this in the admin in the box that you put the ASIN into. This should be called with no arguments in the loop, or passed the post ID of a book outside of the loop.
Template Files
Dead Trees introduces a new post type: dt_book, and a new taxonomy: dt_writer. This means that you can put a file into your theme called type-dt_book.php and it’ll be used in place of single.php, and you can add taxonomy-dt_writer.php and it’ll be used in place of tag.php. This way you can make your reading list look like a real library!
On Caching Plugins
If you use WP Super Cache, you’ll need to clear your cache, or turn off caching, when updating the design of the bookbox, (updating deadtree-bookbox.php), and when updating your Amazon Affiliate IDs. Once your changes are made just make sure the cache is clear and turn caching back on.
I’m not sure about other caching plugins, but I suspect they’ll behave in a similar manner.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「DeadTrees」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.1.1 | 1.1.2 | trunk |

延伸相關外掛(你可能也想知道)

  • Reading progressbar 》使用進度條作為閱讀位置指示器,將其顯示在頂部、底部或自定義位置的不同樣板或文章類型中。, 非常輕量級,它使用 HTML5 元素和幾行javascr...。
  • For the visually impaired 》For the visually impaired 外掛, 此外掛包含以下功能:, , 打開或關閉圖像顯示,若關閉則會顯示圖像標題或替代文字,黑白圖片模式;, 選擇字型(兩種模式)...。
  • Worth The Read 》一個非常低調且輕量級的閱讀進度條插件,可向使用者顯示他們在當前文章或頁面中滾動到哪個部分。您可以控制進度條的位置和顏色,並可以選擇是否包括主要內容...。
  • WP Reading Progress 》阅读进度条是长篇文章中非常棒的用户体验。特别是当它准确地反映了文章文本的阅读进度,而没有其他内容。这在单个博客文章上是标准的,并且默认情况下启用。,...。
  • Comfortable Reading 》Comfortable Reading-這個外掛程式可以為視力不佳的使用者創建一個網站版本。 這個外掛程式允許使用者更改網站的顏色方案和字體大小。, 請注意,此免費版本的...。
  • Catch Scroll Progress Bar 》Catch Scroll Progress Bar是一個簡單而實用的WordPress外掛,可提供博客文章剩餘的視覺化呈現,並且是完全免費的。當讀者滾動網頁時,進度條開始填充,表示...。
  • GR Progress Widget 》這是一個 "設定後即可忘記" 的小工具,可以讓您顯示來自 Goodreads 個人檔案的書架和閱讀進度。您可以添加多個小工具並個別配置以顯示多個書架。, 一些配置選...。
  • Reading Time 》閱讀時間外掛會顯示文章的預估閱讀時間,以秒或分鐘為單位。, 此預估是自動計算的;也可以使用自訂欄位名稱 “readingtime”,為單獨的文章插入自...。
  • Author Recommended Posts 》簡單作者推薦文章外掛, 作者推薦文章可讓您輕鬆搜尋並選擇想要與文章或頁面相關聯的特定文章、頁面和自訂文章類型。您可以透過簡單的拖放介面新增、重新排序...。
  • Currently Reading 》當您提供一個ISBN(選擇性地再加上書名),這個外掛將會使用 Google Books API 呈現相關書籍的封面並提供一個連到該書籍在Google書籍的頁面連結。, 通過這個小...。
  • Infinite Post Transporter 》此外,這個外掛除了一般無限捲動的行為外,還可以在單篇文章頁面上添加無限捲動。當讀者閱讀一篇文章時,當讀者滾動到頁面底部時,下一篇文章會自動加載。類...。
  • Good Shelf 》Goodshelf 可以將您的 Goodreads 书架显示为小工具。可选择链接列表或封面图像。, , , 显示您 Goodreads 帐户中的书架, , , 选择文字链接或书籍封面, , , 配...。
  • Posts Page: Use Page Template 》當在 WordPress 的「閱讀」設定中將「文章頁面」設定為自訂頁面時,預設會忽略該頁面所設定的模板。, 「文章頁面 - 在下拉選單中選擇要包含文章的頁面的名稱....。
  • Dyslexic Fonts 》在使用者資料畫面上新增一個核取方塊,讓已登入的使用者可以將網站上的字型更改為適合誦讀障礙者使用的字型。。
  • bookTuner 》bookTuner 從 Goodreads.com 中將書籍資訊匯入你的書架。透過 WordPress 的可設定功能和簡單標籤,你可以顯示書名、作者、封面圖片及書評摘要在你的網站上。...。

文章
Filter
Apply Filters
Mastodon