[WordPress] 外掛分享: Carousel-of-post-images

首頁外掛目錄 › Carousel-of-post-images
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
60+
安裝啟用
☆☆☆☆
1/5 分(1 則評價)
4536 天前
最後更新
問題解決
WordPress 2.0+ v1.07 上架:2011-06-10

內容簡介

「文章輪播」外掛可讓您輕鬆快速地使用短代碼在頁面或文章中加入一或多個圖庫。圖庫中的圖片可以從所有已連結文章的圖片或特定文章所連結的圖片中選擇。

預設選擇隨機從所有文章中選擇 10 張圖片。

重要連結:

說明文件

特色

使用 JCarousel
與其他圖庫整合(例如 NextGen)以重複使用 jcarousel 及 jQuery 而不會有衝突
許多可設定的選項
體積小巧
使用 WordPress 內建的縮圖尺寸設定圖片大小

使用方式

使用短代碼顯示您站台上文章中隨機選擇的圖片。

CSS 用於設定輪播區域的大小。

範例:
顯示帶有 2 張圖片的輪播圖庫
[carousel-of-post-images imagesize=small visible=2 count=15]

定義可見項目的數量

有些人對如何定義可見項目感到困惑,因為沒有像他們期望的那樣提供可見項目的選項(是的,有一個名為 visible 的選項,我們稍後討論這個選項)。

您只需在外觀樣式表(skin stylesheet)中使用 .jcarousel-clip 類別(或更具體的 .jcarousel-clip-horizontal 和 .jcarousel-clip-vertical 類別)定義寬度(或高度)即可定義可見項目的數量。

這提供了很大的彈性,因為您可以為固定的輪播定義像素寬度,也可以為靈活的輪播定義百分比寬度(此範例顯示帶有百分比剪輯寬度的輪播,在調整瀏覽器大小時可見效果)。

那麼,為什麼會有可見選項呢?如果您設定可見選項,jCarousel 就會設定可見項目的寬度,使得這些項目都能可見。開啟此範例,調整瀏覽器視窗大小以查看效果。

選項

.=--------------------------------------------------------------------=.
| 屬性 | 型別 | 預設值 | 描述 |
|-====================================================================-|
| skin | | tango | 使用的外觀樣式 (skin) |
|=----------*---------*---------------*-------------------------------=|
| imagesize| | medium | 選擇的圖片大小。不影響顯示 |
| | | | 而是選擇從文章中顯示的圖片 |
| | | | small,medium,large,full |
|=----------*---------*---------------*-------------------------------=|
| orderby | | rand | 顯示順序,可能的選項參見 |
| | | | WordPress WP_Query Orderby 參數|
|=----------*---------*---------------*-------------------------------=|
| postid | | all | 要從中選擇圖片的文章 ID。不指|
| | | | 定則選擇所有文章。也可使用 |
| | | | 逗號分隔的文章列表 |
|=----------*---------*---------------*-------------------------------=|
| count | | 10 | 要選擇的圖片數量 |
'=----------*---------*---------------*-------------------------------='

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.07) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Carousel-of-post-images」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Carousel of Post allows you to quickly and easily put one or more galleries on a page/post using shortcodes. The images in the gallery will be selected from either all images attached to posts, or from images attached to a specific post.
The default is to select 10 random images from all posts.
Important Links:

Documentation

Features

Uses JCarousel
Integrates with other galleries (such as NextGen) to reuse the jcarousel and jquery without clashes.
Many configurable options
Small
Uses the builtin wordpress thumbnail sizes for images

Usage
Use the shortcode to display a random selection of images from the posts on your site.
CSS is used to set the sizing of the Carousel areas.
Example:
Shows a carousel with 2 images visible
[carousel-of-post-images imagesize=small visible=2 count=15]
Defining the number of visible items
Sometimes people are confused how to define the number of visible items because there is no option for this as they expect (Yes, there is an option visible, we discuss this later).
You simply define the number of visible items by defining the width (or height) with the class .jcarousel-clip (or the more distinct .jcarousel-clip-horizontal and .jcarousel-clip-vertical classes) in your skin stylesheet.
This offers a lot of flexibility, because you can define the width in pixel for a fixed carousel or in percent for a flexible carousel (This example shows a carousel with a clip width in percent, resize the browser to see it in effect).
So, why there is an option visible? If you set the option visible, jCarousel sets the width of the visible items to always make this number of items visible. Open this example and resize your browser window to see it in effect.
Options

.=--------------------------------------------------------------------=.
| Property | Type | Default | Description |
|-====================================================================-|
| skin | | tango | Skin to use |
|=----------*---------*---------------*-------------------------------=|
| imagesize | | medium | Size of images to select. Does |
| | | | not affect the display just |
| | | | the images that are selected |
| | | | from the posts |
| | | | small,medium,large,full |
|=----------*---------*---------------*-------------------------------=|
| orderby | | rand | Display order, possible |
| | | | options see Wordress WP_Query |
| | | | Orderby parameters |
|=----------*---------*---------------*-------------------------------=|
| postid | | all | The ID of the post to select |
| | | | images from. If omitted will |
| | | | select from all posts.May |
| | | | contain a comma delimited list |
| | | | of posts to include |
|=----------*---------*---------------*-------------------------------=|
| count | | 10 | Number of images to select |
|=----------*---------*---------------*-------------------------------=|
| div | | post-carousel | ID of the list for the images. |
| | | | Only necessary to set when |
| | | | using more than one post |
| | | | carousel in a page/post |
|=----------*---------*---------------*-------------------------------=|
| vertical | bool | false | Specifies wether the carousel |
| | | | appears in horizontal or |
| | | | vertical orientation. Changes |
| | | | the carousel from a left/right |
| | | | style to a up/down style |
| | | | carousel. |
|=----------*---------*---------------*-------------------------------=|
| rtl | bool | false | Specifies wether the carousel |
| | | | appears in RTL (Right-To-Left) |
| | | | mode. |
|=----------*---------*---------------*-------------------------------=|
| start | integer | 1 | The index of the item to start |
| | | | with. |
|=----------*---------*---------------*-------------------------------=|
| offset | integer | 1 | The index of the first |
| | | | available item at |
| | | | initialisation. |
|=----------*---------*---------------*-------------------------------=|
| scroll | integer | 3 | The number of items to scroll |
| | | | by. |
|=----------*---------*---------------*-------------------------------=|
| visible | integer | null | If passed, the width/height of |
| | | | the items will be calculated |
| | | | and set depending on the |
| | | | width/height of the clipping, |
| | | | so that exactly that number of |
| | | | items will be visible. |
|=----------*---------*---------------*-------------------------------=|
| animation | mixed | fast | The speed of the scroll |
| | | | animation as string in jQuery |
| | | | terms (slow or fast) or |
| | | | milliseconds as integer (See |
| | | | jQuery Documentation). If set |
| | | | to 0, animation is turned off. |
|=----------*---------*---------------*-------------------------------=|
| easing | string | null | The name of the easing effect |
| | | | that you want to use (See |
| | | | jQuery Documentation). |
|=----------*---------*---------------*-------------------------------=|
| auto | integer | 0 | Specifies how many seconds to |
| | | | periodically autoscroll the |
| | | | content. If set to 0 (default) |
| | | | then autoscrolling is turned |
| | | | off. |
|=----------*---------*---------------*-------------------------------=|
| wrap | string | null | Specifies whether to wrap at |
| | | | the first/last item (or both) |
| | | | and jump back to the |
| | | | start/end. Options are first, |
| | | | last, both or circular as |
| | | | string. If set to null, |
| | | | wrapping is turned off |
| | | | (default). |
'=--------------------------------------------------------------------='

延伸相關外掛

文章
Filter
Apply Filters
Mastodon