內容簡介
這個外掛是基於 Prasanna SP Tiny URL 外掛的程式碼並加以修改所開發出來。
這個外掛可以在你每篇文章的內文後方(前端頁面)顯示短網址。短網址可以方便你分享文章到博客網站,例如Twitter、identi.ca等等。此外掛將當前文章或頁面的網址傳送至 V.gd 或 TinyURL.com 來取得短網址,然後在文章內容後方顯示該短網址。你可以選擇哪些使用者可以看到短網址文字方塊:「所有使用者」、「註冊使用者」或「註冊使用者可以編輯文章/頁面」。使用者可以點擊方塊選取網址,或點擊複製按鈕將短網址複製到剪貼簿。你也可以在外掛設定頁面上選擇在頁面上顯示短網址的選項。
注意:在啟用外掛之前,請先閱讀 V.gd 的使用條款。啟用外掛後,你必須遵守這些規定。
注意:在啟用外掛之前,請先閱讀 TinyURL 的使用條款。啟用外掛後,你必須遵守這些規定。TinyURL 是 TinyURL, LLC 的商標。
如何設計外掛輸出的樣式?
你可以在 Short URL FE 外掛的選項頁面上為文字方塊加入一個類別,也可以為按鈕加入一個類別。
外掛輸出的內容被包裝在一個帶有類別 short-url-fe 的 p 標籤中。使用此類別,並選擇性地使用你的類別來設計樣式。
例如:
/* 調整外掛顯示區域的背景顏色 */
.short-url-fe {
background-color: #ccc;
padding: 4px;
border-radius: 4px;
}
/* 假設你為文字方塊新增了一個 mytextbox 類別,這樣就可以調整文字方塊的樣式 */
.short-url-fe .mytextbox {
width: min(20rem, 70%);
box-shadow: 2px 2px 4px 1px #ccc inset;
padding: .5rem 4px;
}
/* 假設你為按鈕新增了一個 mycopybutton 類別,這樣可以調整按鈕的樣式 */
.short-url-fe .mycopybutton {
background-color: lightblue;
color: darkblue;
}
外掛標籤
開發者團隊
原文外掛簡介
This plugin is based on Prasanna SP Tiny URL plugin and uses some of its code.
This plugin shows a short URL for each of your blog posts after post content (in FrontEnd). Short URLs are great for sharing your posts on micro-blogging sites like twitter, identi.ca etc., This plugin sends current post or page URL to v.gd or TinyURL.com and gets a short URL for the same. Then it shows that Short URL after post content. You can select which users can see short URL textbox: “All users”, “Regitered users” or “Registered users that can edit the post/page”. User can just click on the box to select URL, or click on a Copy button to Copy the Short URL to clipboard. You can also show Short URLs for pages by selecting Show Short URL FE on pages option in plugin settings page.
Note: Please read V.gd terms of use before activating the plugin. You must abide by them after activating the plugin.
Note: Please read TinyURL’s terms of use before activating the plugin. You must abide by them after activating the plugin. TinyURL is a trademark of TinyURL, LLC
How to style the output?
You can add a class for textbox and a class for button on Short URL FE plugin options page.
The output of this plugin is wrapped in a
tag with class short-url-fe. Use this class and, optionally, your classes to style them.
Example,
/* this change background color for area where plugin is shown */
.short-url-fe {
background-color: #ccc;
padding: 4px;
border-radius: 4px;
}
/* Assuming you added a class 'mytextbox' for textbox, this adjusts textbox style */
.short-url-fe .mytextbox {
width: min(20rem, 70%);
box-shadow: 2px 2px 4px 1px #ccc inset;
padding: .5rem 4px;
}
/* and assuming you added a class 'mycopybutton' for button, this adjusts button style */
.short-url-fe .mycopybutton {
background-color: lightblue;
color: darkblue;
}
