[WordPress] 外掛分享: Random Image Selector

首頁外掛目錄 › Random Image Selector
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
200+
安裝啟用
尚無評分
5773 天前
最後更新
問題解決
WordPress 1.5+ v1.5.6 上架:2007-07-24

內容簡介

這個外掛會從指定的資料夾中隨機選取一個圖片,並產生一個<img>標籤。

設置說明

將randomImage.php檔案提取到wp-content/plugins資料夾(或其子資料夾)中
在WordPress中啟用該外掛
在選項螢幕上,選擇“隨機圖片”選單
填寫您的物理路徑和http路徑的值
選擇可選的縮放選項
在您想要顯示圖片的任何頁面中添加一些程式碼。 這是自定義WordPress安裝的標題圖片的絕佳方法。外掛將在該資料夾中查找並隨機選擇一個標題圖片進行顯示。

示例程式碼

通過在標頭中放置像以下這樣的程式碼,它將基於指定資料夾中的圖像為您創建一個圖像標籤。

<?php
if (function_exists ('generateRandomImgTag'))
{
generateRandomImgTag();
}
?>

<!–
上面的列是HTML文檔(線上)

–>

這段程式碼將確保該函數存在(即該外掛處於啟用狀態),並在正常工作時調用它。如果該函數缺失或已刪除,則將忽略調用,並且不會產生任何錯誤。

回饋

kdmurray.at.kdmurray.dot.net

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Random Image Selector」→ 直接安裝(推薦)

原文外掛簡介

This plugin will generate an tag for a random image selected from a specified folder.
Setup Instructions

Extract randomImage.php into your wp-content/plugins folder (or a subfolder)
Activate the plugin in WordPress
On the options screen, select the “Random Image” menu
Fill in the values for your physical and http paths
Select scaling options (optional)
Add some code to whatever page you want to display the image. This is a great way to
customize the header image for your wordpress installation. The plugin will look in
the folder and randomly select a header image to display.

Sample Code
By placing code like the following in your header, it will create an image tag for you
based on the images in the specified folder.


This code will ensure that the function exists (ie the plugin is active and working) and
call it if it’s working correctly. If the function is missing, or the plugin has been
removed then the call will be ignored, and no errors will result.
Feedback
kdmurray.at.kdmurray.dot.net

延伸相關外掛

文章
Filter
Apply Filters
Mastodon