[WordPress] 外掛分享: Simple Ebook Viewer

WordPress 外掛 Simple Ebook Viewer 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Simple Ebook Viewer」是 2025-05-26 上架。
  • 目前有 300 個安裝啟用數。
  • 上一次更新是 2025-12-06,距離現在已有 82 天。
  • 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 有 3 人給過評分。
  • 論壇上目前有 2 個提問,問題解答率 0%

外掛協作開發者

wrcisco |

外掛標籤

azw3 | epub | ebook | reader | viewer |

內容簡介

<!DOCTYPE html>
<html>
<body>

<h2>總結:</h2>
<p>此外掛安裝後,您可以將各種電子書格式上傳為正常媒體檔案,並使用簡碼在您的網站上顯示它們。</p>

<h2>問題與答案:</h2>

<ul>
<li>
<h4>哪些電子書格式被支援?</h4>
<p>epub, mobi, azw, azw3, fb2, fbz, cbz</p>
</li>

<li>
<h4>如何在文章中插入電子書簡碼?</h4>
<p>在文章中插入 [simebv_viewer book="MY_EBOOK_SLUG_HERE"]</p>
</li>

<li>
<h4>使用者如何自訂電子書檢視器的外觀設置?</h4>
<p>使用者可以在檢視器菜單中開啟設置,選擇適當的項目來設定外觀。此外掛設定了一些合理的默認設置,但如果你不滿意,可以在簡碼中添加相應的屬性來更改。</p>
</li>

<li>
<h4>如何設置電子書顏色濾鏡?</h4>
<p>設置 activate-color-filter 為 "true" 以啟用所有其他濾鏡,設置 bg-transparent-filter 為 false 以啟用 bg-color-filter。</p>
</li>
</ul>

</body>
</html>

原文外掛簡介

After installing this plugin, you will be able to upload various ebook formats as normal media files and to display them in your site using a shortcode.
Every ebook uploaded in your site will have an “ebook slug” (by default it will be the ebook name) that you can view and edit in the Edit Media page of the Admin Panel.
The full source code of the plugin is hosted on GitHub.
Supported formats
At the moment, the plugin will let you upload and display the following file types, provided that they are DRM-free:

epub
mobi
azw
azw3
fb2
fbz
cbz

Usage
Insert the shortcode [simebv_viewer book="MY_EBOOK_SLUG_HERE"] in any one of your posts.
Styling
You can add css styles and classes for the viewer container by adding these attributes to the shortcode:

height
width
max-height
max-width
border
style
class

Height, width, max-height, max-width and border accept any valid CSS value for those property.
Style and class accept any valid value for the respective HTML attributes.
Some examples:
[simebv_viewer book="MY_EBOOK_SLUG_HERE" style="height:30em;border:2px inset black"]

[simebv_viewer book="MY_EBOOK_SLUG_HERE" max-height="100vh" height="40em"]

[simebv_viewer book="MY_EBOOK_SLUG_HERE" class="my-container-class my-container-second-class"]

Settings
The users of your site will be able to set their preferences about the appearance of the ebook in the Viewer by opening the Viewer menu (the cog icon on the top right) and by selecting the appropriate entries.
The plugin sets some reasonable defaults for these preferences, but if you’re not happy with those defaults, you can change them by adding one or more of the following attributes to the shortcode, with the appropriate values:

layout

accepted values: “paginated” or “scrolled” (default: paginated)

max-pages

accepted values: 1, 2, 3 or 4 (default: 2)

default-font-size

accepted values: “small“, “medium“, “large“, “x-large” (default: medium)

page-margins

accepted values: “small“, “medium“, “large” (default: medium)

zoom

accepted values: “fit-page“, “fit-width” or a number in the range 10 – 400 (default: fit-page)

color-scheme

accepted values: “auto“, “sepia“, “light“, “dark” (default: auto)

Layout, max-pages, default-font-size and page-margins are only available for reflowable ebooks, while zoom is only available for fixed layout ones.
Max-pages is the maximum number of pages (in the “paginated” layout) that the user will be able to see in a single view (if there is enough screen space).
Color-scheme: “auto” means that the Viewer will adapt to the preferred color-scheme set by the user in their device or browser (light or dark).
For most ebooks these preferences should be enough, but sometimes there are ebooks with style rules that don’t play well with the styles set by the Viewer, so the users have also the option to apply some filters to the Viewer’s colors (with the menu entry “Color filter…”).
You can set the default values for these filters with the following shortcode’s attributes:

activate-color-filter

accepted values: “true“, “false” (default: false)

invert-color-filter

accepted values: a number in the range 0 – 1 (default: 0)

rotate-color-filter

accepted values: a number in the range 0 – 360 (default: 0)

bg-transparent-filter

accepted values: “true“, “false” (default: true)

bg-color-filter

accepted values: a valid CSS hex color code (default: #FFFFFF)

Set activate-color-filter to “true” is necessary to enable all the other filters, and set bg-transparent-filter to false is necessary to enable bg-color-filter.
Bg-transparent-filter and bg-color-filter are available for reflowable ebooks only.
Invert-color-filter inverts the lightness of the colors. With a value of 0 it has no effect, with a value of 1, the white will become black and the black will become white.
Rotate-color-filter rotates the hues of all the colors in the ebook, like in a Color Wheel (so, no effect on black and white).
Warning
Ebooks can contain scripted content that might be executed on your webpage. The plugin does its best to forbid script execution from inside the loaded content, but it can’t guarantee 100% safety. Don’t display ebooks from untrusted sources and/or check your ebooks before uploading and displaying them. If you can, provide a strict Content Security Policy for your site.

各版本下載點

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

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


0.4.1 | trunk |

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

暫無相關外掛推薦。

文章
Filter
Mastodon