[WordPress] 外掛分享: Collapsing Links

前言介紹

  • 這款 WordPress 外掛「Collapsing Links」是 2008-08-24 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2015-08-12,距離現在已有 3553 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 2.8 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

robfelty |

外掛標籤

links | widget | sidebar |

內容簡介

這是一個非常簡單的插件,使用 Javascript 在側邊欄中形成一個可折疊的連結集合(blogroll)。每個連結對應到一個特定的連結類別將會被展開。

你可以使用多個 widget 的實例,每個都有自己的選項集。這樣,你可以在網頁的某個位置擁有某些類別的一組連結,而在其他地方使用不同的一組連結的 widget。

它基於Collapsing Categories和Collapsing Pages插件。

更新內容:

0.4 (2015.08.12)
與 WP 4.3 兼容

0.3.5 (2010.06.23)
修正 javascript 路徑錯誤
0.3.4 (2010.06.18)
修正當 target 是 blank 時的html驗證問題(thanks http://dropdeaddick.com)

0.3.3 (2010.01.28)
從 scriptaculous 轉換為 jquery。不再與使用 mootools 的插件(例如特色內容庫)發生衝突。
限制設置頁面的授權使用者。

選項:

可以透過設定面板來設置樣式選項。所有其他選項都可以從小部件面板中設置。如果你想要手動將代碼插入到你的主題中而不是使用 widget,你可以使用以下選項。這些選項可以作為數組或以查詢風格的方式給出,方式與 wp_list_links 函數相同,可以給 collapLink()函數使用。

$defaults=array(
'showLinkCount' => true ,
'catSort' => 'linkName' ,
'catSortOrder' => 'ASC' ,
'linkSort' => 'linkName' ,
'linkSortOrder' => 'ASC' ,
'inExclude' => 'exclude' ,
'inExcludeCats' => '' ,
'expand' => 0 ,
'customExpand' => '',
'customCollapse' => '',
'defaultExpand' => '',
'animate' => 0,
'nofollow' => true,
'debug' => false
);

showLinkCount

當為 true 時,顯示連結類別後面的括號中的連結數量

catSort

應根據什麼順序排序連結類別(link categories)。可能的值如下:

‘catName’連結類別的名稱(default)
‘catId’連結類別的ID
‘catSlug’ 連結類別的slug
‘catOrder’連結選項中指定的自定義順序
‘catCount’每個類別中連結的數量

linkSort

應該按照什麼順序排序鏈接類別。可能的值如下:

‘linkName’連結的名稱(default)
‘linkId’連結的ID
‘linkUrl’連結的網址
‘linkRating’分配給連結的評分

catSortOrder

連結類別應該按正常或相反順序排序。可能的值如下:

‘ASC’正常順序(a-z、0-9)(default)
‘DESC’相反順序(z-a、9-0)

linkSortOrder

連結應該按正常或相反順序排序。可能的值如下:

‘ASC’正常順序(a-z、0-9)(default)
‘DESC’相反順序(z-a、9-0)

inExclude

排除或只包括“在選定的類別中”(include/exlude)

inExcludeCats

用逗號分隔的帶有ID的類別清單,將只包括/排除這些類別中的連結。例如:1,5,3

expand

預設展開的分類 ID,多個使用逗號分隔。例如:4、5、6、7

customExpand

自定義展開圖示的 HTML 或 text 代碼。

customCollapse

自定義折疊圖示的 HTML 或 text 代碼。

defaultExpand

將此值設置為“all”,以使所有類別在頁面載入時都處於展開狀態。

animate

動畫(0/1)的速度,0為停用動畫,1為啟用動畫

nofollow

將所有鏈接添加 nofollow 屬性

debug

啟用調試模式

原文外掛簡介

This is a very simple plugin that uses Javascript to form a collapsable set of
links in the sidebar for the links (blogroll). Every link corresponding to a
given link category will be expanded.
You can use multiple instances of the widget, each with its own set of options. In this way you could have one set of links for certain categories one place on your page, and another widget with a different set of links somewhere else.
It is based off of the Collapsing Categories and Collapsing Pages plugins.
What’s new?

0.4 (2015.08.12)

Compatible with WP 4.3

0.3.5 (2010.06.23)

Fixed javascript path error

0.3.4 (2010.06.18)

Fixed html validation when target is blank (thanks http://dropdeaddick.com)

0.3.3 (2010.01.28)

Switched from scriptaculous to jquery. No longer conflicts with plugins
which use mootools (e.g. featured content gallery)
Restricted settings page to authorized users

Options
Style options can be set via the settings panel. All other options can be set
from the widget panel. If you wish to insert the code into your theme manually
instead of using a widget, you can use the following options. These options
can be given to the collapsLink() function either as an array or in query
style, in the same manner as the wp_list_links function.
$defaults=array(
'showLinkCount'=> true ,
'catSort'=> 'linkName' ,
'catSortOrder'=> 'ASC' ,
'linkSort'=> 'linkName' ,
'linkSortOrder'=> 'ASC' ,
'inExclude'=> 'exclude' ,
'inExcludeCats'=> '' ,
'expand'=> 0 ,
'customExpand' => '',
'customCollapse' => '',
'defaultExpand'=> '',
'animate' => 0,
'nofollow' => true,
'debug' => false
);

showLinkCount

When true, the number of links in the category will be shown in
parentheses following the name of the link category

catSort

The order in which link categories should be sorted. Possible values:

‘catName’ the name of the link category (default)
‘catId’ the id of the link category
‘catSlug’ the slug of the link category
‘catOrder’ custom order specified in the links options
‘catCount’ the number of links in each category

linkSort

The order in which link linkegories should be sorted. Possible values:

‘linkName’ the name of the link (default)
‘linkId’ the id of the link
‘linkUrl’ the url of the link
‘linkRating’ the rating assigned to the link

catSortOrder

Whether categories should be sorted in normal or reverse order. Possible
values:

‘ASC’ normal order (a-z, 0-9) (default)
‘DESC’ reverse order (z-a, 9-0)

linkSortOrder

Whether link should be sorted in normal or reverse order. Possible values:

‘ASC’ normal order (a-z, 0-9) (default)
‘DESC’ reverse order (z-a, 9-0)

inExclude

Whether to include or exclude certain categories

‘exclude’ (default)
‘include’

inExcludeCats

The link categories which should be included or excluded

expand

The symbols to be used to mark expanding and collapsing. Possible values:

‘0’ Triangles (default)
‘1’ + –
‘2’ [+] [-]
‘3’ images (you can upload your own if you wish)
‘4’ custom symbols

customExpand

If you have selected ‘4’ for the expand option, this character will be
used to mark expandable link categories

customCollapse

If you have selected ‘4’ for the expand option, this character will be
used to mark collapsible link categories

defaultExpand

A comma separated list of link category IDs or Slugs which should be
expanded by default

animate

When set to true, collapsing and expanding will be animated

nofollow

When set to true (default), rel=’nofollow’ tags will be added to links

debug

When set to true, extra debugging information will be displayed in the
underlying code of your page (but not visible from the browser). Use
this option if you are having problems

Examples
collapsLink('animate=true&nofollow=false&expand=3,inExcludeCats=blogroll,lousy-friends')

This will produce a list with:
* animation on
* no nofollow tags
* using images to mark collapsing and expanding
* exclude links in the categories blogroll and lousy-friends
Demo
You can see this on my test blog at http://robfelty.com/test
CAVEAT
Currently this plugin relies on Javascript to expand and collapse the links.
If a user’s browser doesn’t support javascript they won’t see the links to the
posts, but the links to the links will still work (which is the default
behavior in wordpress anyways)
The option to show the number of links currently uses the number stored in the
database, which includes both visible and invisible links. If you have
invisible links, this number will be wrong.

各版本下載點

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

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


0.1 | 0.2 | 0.4 | 0.1.2 | 0.1.3 | 0.1.4 | 0.2.1 | 0.2.2 | 0.2.3 | 0.2.4 | 0.2.6 | 0.2.7 | 0.3.1 | 0.3.2 | 0.3.3 | 0.3.4 | 0.3.5 | trunk | 0.3.beta | 0.3.alpha |

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

  • Widget Logic 》此外掛可在每個小工具中新增一個名為 "Widget logic" 的額外控制欄,讓您控制這個小工具會出現在哪些頁面上。文字欄位允許您使用 WP 的Conditional Tags或任...。
  • Fixed Widget and Sticky Elements for WordPress 》使用 Fixed Widget 外掛可以創建黏貼式的小部件、區塊和其他元素,當用戶向上或向下滾動頁面時,它們會保持在可見的屏幕區域內。, 相較於非固定小工具,黏貼...。
  • Image Widget 》Image Widget 是一個簡單的外掛程式,利用 WordPress 原生媒體管理員,為您的網站新增圖片小工具。, 需要新增幻燈片、燈箱或隨機圖像嗎?, 請查看 Image Widg...。
  • Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager 》使用 Custom Sidebars,一個靈活的小工具管理器,在您的網站上管理和替換側邊欄和其他小工具區。, 製作自訂側邊欄配置,能夠選擇在您網站的每個頁面或文章上...。
  • Widgets on Pages 》這是添加小工具到文章和/或頁面最簡單,也是評價最高的方法。您可以創建無限的動態側邊欄(小工具區域),把它們插入到 WordPress 文章或頁面中。, 從設置菜...。
  • Ocean Custom Sidebar 》這個 WordPress 外掛可以生成無限數量的側邊欄,您可以把它們放置在想要的任何頁面上。前往主題面板 > 側邊欄以創建自定義側邊欄。, 此外掛需要安裝 Ocean...。
  • Content Aware Sidebars – Fastest Widget Area Plugin 》CAS 是迄今最快、最強大的 WordPress 側邊欄外掛程式。您可以在幾秒鐘內建立量身定制的小工具區。, 通過在不同的條件下顯示不同的小工具區,您可以優化轉化率...。
  • Simple Image Widget 》Simple Image Widget就如其名般簡單易用,是在側邊欄中添加圖像的最簡單方法。您可以展示廣告、呼籲行動,甚至基於圖像小工具構建滑塊。, 儘管它很簡單,但Si...。
  • Meks Simple Flickr Widget 》這個 WordPress 外掛可以快速地將你的 Flickr 照片顯示於 Widget 中,且不需要進行授權(只需提供你的使用者 ID)。, 功能, , 無需授權(只需提供使用者 ID)...。
  • WP Page Post Widget Clone 》這個外掛只需要點擊一下,就能複製一篇文章或頁面。現在您無需從頭開始設計新的頁面或文章。, 這個外掛的主要功能包括:, , 創建頁面副本,保留所有內容和標...。
  • SMK Sidebar Generator 》這個外掛可以生成任意數量的側邊欄,然後讓你將它們放置在你想要的任何頁面。, , 特色:, , 無限數量的側邊欄。, 使用條件替換預設主題側邊欄,或全局替換只...。
  • Sidebar Login 》e links., sidebar_login_widget_end – Fired after the widget., , 這是一個 WordPress 的外掛,Sidebar Login 可以為您的 WordPress 博客添加一個有...。
  • Pojo Sidebars 》使用 Pojo Sidebars 您可以為任何頁面創建所需的多個側邊欄,特別是針對基於 Pojo Framework 的主題。, 您可以輕鬆地將您的網站分為區域,同時為每個單獨的...。
  • NewStatPress 》NewStatPress 是 StatPress 的新版本,是第一個能即時追蹤您的部落格訪問統計資訊的 WordPress 外掛。它能夠收集有關訪客、搜尋引擎爬蟲、搜尋關鍵字、訪客的...。
  • Newpost Catch 》在新文章設置小工具中的縮略圖設置。。

文章
Filter
Apply Filters
Mastodon