內容簡介
這個外掛可以在文章和頁面中創建指向 Subversion 或 Git 存儲庫的 zip 下載鏈接。每次調用時,可以設置 Subversion 版本號 / Git 標籤、鏈接文字、CSS 名稱和下載名稱,這樣每個鏈接都指向不同的存儲庫部分。
功能
遠程訪問 Git 或 Subversion 庫
本地緩存庫數據
自動更新到最新版本
僅當有訪問時才需要擴展訪問權限
自由配置tag、branches、trunk以及版本/提交訪問權限
要求
WordPress 3.2 或更高版本
PHP 5.3.0 或更高版本
PHP Zip 擴展
對於 SVN 訪問
* PHP SVN 擴展
對於 Git 訪問
* Git 客戶端
* PHP 必須執行 shell 命令 (不能是 safe mode)
短碼
SVN 訪問的快捷鍵
[svnzip url="url-to-your-svn"]
SVN tag 使用了三個可選標誌(默認值在插件設置中設置):
“trunkdir” 主幹目錄的名稱
“branchdir” 分支目錄的名稱
“tagdir” 標籤目錄的名稱
Git 訪問的快捷方式
[gitzip url="url-to-your-svn"]
兩個命令的參數如下(所有參數都是可選的):
“version” 定義要使用的特殊版本(SVN) / 提交(Git)。如果未設置該參數,則使用最新版本(head)
“downloadtext” 下載文件的文件名(如果未設定,則使用鏈接文字)
“linktext” 鏈接文字(默認設置在插件設置中)
“cssclass” 設置連結的 CSS 類(默認設置在插件設置中)
“type” 枚舉值 trunk | branch | tag,用於設置庫部分(默認為trunk,在Git中也使用trunk並套用於主分支中)
“name” tag 或 branch 名稱的值(在 trunk 上它被忽略/為空)
外掛標籤
開發者團隊
原文外掛簡介
The plugin creates zip download links within articles and pages of a subversion or git repository. On each call the subversion revision number / git tag, link text, css name and download
name can be set, so that each link points to different repositority parts.
Features
remote access to Git or Subversion repository
local caching for the repository data
automatic update to the head revision
extension access only need on access
free configuration of tags, branches, trunk and revision / commit access
Requirements
WordPress 3.2 or newer
PHP 5.3.0 or newer
PHP Zip extension
for SVN access
* PHP SVN extension
for Git access
* Git client
* PHP must execute shell commands (no safe mode)
Shortcode
Shotcut for SVN access
[svnzip url="url-to-your-svn"]
The SVN tag uses three optional flags (the default values are set within the plugin settings):
“trunkdir” the name of the trunk directory
“branchdir” the name of the branch directory
“tagdir” the name of the tag directory
Shotcut for Git access
[gitzip url="url-to-your-svn"]
Parameters for both commands are (all parameters are optional):
“version” defines a special revision (SVN) / commit (Git), which is used. If the parameter is not set, the latest revision (head) is used
“downloadtext” filename for the downloaded file (if not is set, the linktext is used)
“linktext” text of the link (default is set within the plugin settings)
“cssclass” sets the CSS class of the link (default is set within the plugin settings)
“type” enum value trunk | branch | tag for setting the repository part (default is trunk, for Git trunk is also used and it is applied to the master)
“name” the value for tag- or branchname (on trunk it is ignored / empty)
