內容目錄
前言介紹
- 這款 WordPress 外掛「wpckan」是 2015-01-25 上架。 目前已經下架不再更新,不建議安裝使用。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2015-07-17,距離現在已有 3579 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 論壇上目前有 1 個提問,問題解答率 0%
外掛協作開發者
acorbi |
外掛標籤
api | ckan | datasets | open data |
內容簡介
ode can be embedded in a post would be:
php
Related datasets:
[wpckan_related_datasets limit="5"]
Feature 2: Archive content into CKAN
This plugin provides two mechanisms for automatically archiving WordPress-generated content into a CKAN instance.
One is a feature for dynamically pushing content to CKAN while a post is being published.
The other one is a CRON-like system to archive all generated content every X time.
The CRON task can be executed with WP-CLI with this command: wp wpckan cron-archive. This will archive all generated WordPress content into CKAN.
Note on server requirements:
PHP version 5.3 or greater is required to run this plugin.
Contributors: @ConAntonakos, @estebanz01
Support: https://github.com/opendatatrentino/wpckan/issues
License: MIT
原文外掛簡介
wpckan is a wordpress plugin that exposes a series of functionalities to bring content stored in CKAN to WordPress’ UI and also provide mechanisms for archiving content generated on WordPress into a CKAN instance.
Features
Feature 1: Add related CKAN datasets to posts.
Plugin presents a metabox while users are editing posts with an autocompletion input field that
allows the user to add related CKAN datasets. Suggestions for related datasets and its metadata (title, description, and resources) are shown to the user while typing in the input field. Users can add a certain number of datasets that will get stored along the post’s metadata.
In order to use this information, this plugin exposes the [wpckan_related_datasets] shortcode for embedding information about related datasets on the content of the post.
The shortcode has following parameters:
include_fields_dataset: (Optional) Comma-separated.
Per default, this shortcode shows only title and notes of the CKAN dataset (See http://demo.ckan.org/api/3/action/package_search?q=spending). A list of attributes can be specified to present more information. Possible values: “title”, “notes”, “url”, “license”, “license_url” “metadata_created”, “metadata_modified”, “author” , “author_email”
include_fields_resources: (Optional) Comma-separated.
Per default, this shortcode shows only name, description and format of the resources (See http://demo.ckan.org/api/3/action/package_search?q=spending). A list of attributes can be specified to present more information. Possible values: “name”, “description”, “revision_timestamp”, “format”, “created”
limit: (Optional) Number.
Limits the amount of datasets shown by the shortcode.
Pagination
page: (Optional) Number.
When used together with limit, returned datasets will get paginated. In case of possible pagination, this parameter specifies which page is returned. If there are not enough related datasets to paginate, this parameter will be ignored.
Example: if there are 8 related datasets, limit = 2, page = 2, then datasets 2 and 3 will be returned. Mind that order begins on 1.
prev_page_link: (Optional) String.
If provided, and as long limit and page are also given parameters, shows a link to this URL. The default text is “Previous”
prev_page_title: (Optional) String.
Replaces “Previous” (Standard text) with the specified text.
next_page_link: (Optional) String.
If provided, and as long limit and page are also given parameters, shows a link to this URL. The default text is “Next”
next_page_title: (Optional) String.
Replaces “Next” (Standard text) with the specified text.
Examples:
php
[wpckan_related_datasets]
[wpckan_related_datasets limit="3"]
[wpckan_related_datasets limit="3" page="2"]
[wpckan_related_datasets limit="3" page="2" prev_page_link="http://test?prev_page" next_page_link="http://test?next_page"]
[wpckan_related_datasets include_fields_dataset="title,description,author"]
[wpckan_related_datasets include_fields_dataset="title,description,author" include_fields_resources="name,description,created"]
An example showing how the information returned by this shortcode will be structured:
`html
Title
Notes
License
Author
/*…. other fields ….*/
Name
Description
/*…. other fields ….*/
/*…. other resources ….*/
/*…. other dataset
….*/
Previous
Next
`
Also, the plugin exposes the [wpckan_number_of_related_datasets] shortcode for returning the number of related datasets assigned to the post as a customizable link so a summary can be presented on the wordpress side.
The shortcode has following parameters:
group: (Optional)
Specify the name (Not title) of a group available on the target CKAN instance in order to filter the related datasets to ONLY those assigned to it.
organization: (Optional)
Specify the name (Not title) of an organization available on the target CKAN instance in order to filter the related datasets to ONLY those assigned to it.
Note: If both group and organization parameters are specified then the dataset has to be asssigned to both in order to be returned by the shortcode.
limit: (Optional) Number.
Limits the amount of datasets shown by the shortcode.
link_url: (Optional)
Specify the URL to link the produced output with some other resource (i.e: in the CKAN instance)
prefix: (Optional)
Prepends a string before the number.
suffix: (Optional)
Appends a string after the number.
Examples:
php
[wpckan_number_of_related_datasets]
[wpckan_number_of_related_datasets link_url="http://link_to_more"]
[wpckan_number_of_related_datasets group="news"]
[wpckan_number_of_related_datasets group="news" limit="1"]
[wpckan_number_of_related_datasets group="news" suffix=" datasets found in the news."]
[wpckan_number_of_related_datasets group="news" prefix="Number of datasets: (" suffix=")" link_url="http://link_to_more"]
An example (corresponding to the last example above) showing how the information returned by this shortcode will be structured:
`html
Number of datasets: (5)
`
Feature 2: Query lists of CKAN datasets
Plugin exposes a function which returns a list of CKAN datasets resulting after querying
CKAN’s API. Resulting datasets can be filtered by organization, group and/or specifying a textual
search.
The results of this function can be shown anywhere on a WordPress instance (Posts,
Pages, etc..) by calling the [wpckan_query_datasets query=”QUERY”] shortcode. Per default, this shortcode shows only title and description of the dataset.
The shortcode has following parameters:
query: (Mandatory) Term to query the database.
organization: (Optional) Filter dataset results by showing only those belonging to a certain organization.
group: (Optional) Filter dataset results by showing only those belonging to a certain group.
include_fields_dataset: (Optional) Comma-separated.
Per default, this shortcode shows only title (with link to the dataset’s URL) and notes of the CKAN dataset (See http://demo.ckan.org/api/3/action/package_search?q=spending). A list of attributes can be specified to present more information. Possible values: “title”, “notes”, “url”, “license”, “license_url” “metadata_created”, “metadata_modified”, “author” , “author_email”
include_fields_resources: (Optional) Comma-separated.
Per default, this shortcode shows only name (with link to the resources’s URL), description and format of the resources (See http://demo.ckan.org/api/3/action/package_search?q=spending). A list of attributes can be specified to present more information. Possible values: “name”, “description”, “revision_timestamp”, “format”, “created”
limit: (Optional) Number.
Limits the amount of datasets shown by the shortcode.
Pagination
page: (Optional) Number.
When used together with limit, returned datasets will get paginated. In case of possible pagination, this parameter specifies which page is returned. If there are not enough related datasets to paginate, this parameter will be ignored.
Example: if there are 8 related datasets, limit = 2, page = 2, then datasets 2 and 3 will be returned. Mind that order begins on 1.
prev_page_link: (Optional) String.
If provided, and as long limit and page are also given parameters, shows a link to this URL. The default text is “Previous”
prev_page_title: (Optional) String.
Replaces “Previous” (Standard text) with the specified text.
next_page_link: (Optional) String.
If provided, and as long limit and page are also given parameters, shows a link to this URL. The default text is “Next”
next_page_title: (Optional) String.
Replaces “Next” (Standard text) with the specified text.
Examples:
php
[wpckan_query_datasets query="coal"]
[wpckan_query_datasets query="corruption" limit="5"]
[wpckan_query_datasets query="corruption" limit="5" page="1"]
[wpckan_query_datasets query="politics" limit="3" page="2" prev_page_link="http://test?prev_page" next_page_link="http://test?next_page"]
[wpckan_query_datasets query="forestry" organization="odmcambodia" group="news"]
[wpckan_query_datasets query="elections" include_fields_dataset="title,notes,license" include_fields_resources="name,description,created"]
`html
Title
Notes
License
Author
/*…. other fields ….*/
Name
Description
/*…. other fields ….*/
/*…. other resources ….*/
/*…. other dataset
….*/
Previous
Next
`
Feature 3: Archiving WP Posts in CKAN
The plugin presents a metabox while users are editing posts. It allows users to specify if the post should be archived as a CKAN dataset. The plugin polls the CKAN instance and retrieves the list of available organizations and groups in order for users to be able to determine to which organization or group the dataset will be assign to. Also, when that particular post will be archived (on save or on publish).
Arbitrary section
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「wpckan」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.9.9 | 1.0.0beta1 | 1.0.0beta4 |
延伸相關外掛(你可能也想知道)
wp-sparql 》wpsparql 是一款 WordPress 外掛,它通过一系列功能将 SPARQL 端点公开的内容带入 WordPress 的用户界面中。, 自定义部分。