內容簡介
his area will display the XML code from the feed.
The XML code can be edited, but be careful not to break the format or structure.
這個外掛是一個易於使用的 XML 資料匯入工具,具有將匯入項目對映到(自訂)文章和它們的元數據欄的能力。
使用說明
訂閱源像正常文章一樣被管理(新增 / 編輯 / 刪除)。
要匯入新的訂閱源,必須先儲存標題和網址字段至少填寫了一個。
因為匯入程式會下載訂閱的副本並與該副本一起運作。
如果在保存訂閱源之前嘗試進行匯入,則匯入程式還沒有副本可用於操作。
表單說明
匯入
這是表單中的第一個欄位,但是最後的步驟。
沒有取消按鈕,一旦點擊「匯入」按鈕,只能重新整理(或離開)頁面以取消匯入。
匯入是進行10個訂閱項目的一次匯入,進度顯示在匯入按鈕下方。
匯入傳送 Ajax 請求,直到完成匯入,此時旋轉指示器停止旋轉並顯示進度訊息「n個文章已匯入」。
URL
訂閱源網址
必填欄位(可選)
以逗號分隔的(自訂)文章欄位列表
如果此列表中的欄位沒有對映,則匯入將失敗。
如果此列表中的欄位對映結果為空,則相應的訂閱項目將被跳過。
唯一欄位(選用)
以逗號分隔的(自訂)文章欄位列表
唯一欄位不是必須的
如果具有此值的欄位已經存在,則跳過訂閱項目。
CSV 分隔符(選用)
如果此欄位為空,插件會假設 URL 鏈接至 XML 文件
如果此欄位為非空,插件會假設 URL 鏈接至 CSV 文件,分隔符為所給值
CSV 文件將轉換為 XML,因此插件的進一步使用方式保持不變。
選擇根路徑
選擇應對映的項目的路徑
例如,您想將產品匯入您的 Woocommerce 安裝中。
XML:<product></product> … <product></product>
那麼根路徑應該是 /products/product
您可以使用加號和減號按鈕向上或向下移動一個級別。
下拉選單顯示了特定級別的可能路徑。
單擊「選擇」按鈕以確認根目錄。
XML 區域應填滿與根路徑匹配的第一個項目。
選擇文章欄位
第一個下拉選單顯示已註冊的文章類型和分類。
第二個下拉選單顯示相應的欄位。(像 ID 這樣的列,您應該不手動設置)
許多欄位始終相同,對應於數據庫中的 wp_posts 表格中的列,但元數據欄可能不同。
插件需要至少一個現有的選定文章類型對象才能找到這些元數據欄。
元數據欄基於它找到的所選文章類型的第一篇文章。
對映
這顯示當前的對映
如果您選擇了對映,可以使用右側的「x」刪除它
如果對映符合您的需求,請點擊「儲存對映」。
XML
選擇根路徑後,此區域將顯示訂閱源的 XML 代碼。
XML 代碼可以編輯,但要小心不要破壞格式或結構。
外掛標籤
開發者團隊
原文外掛簡介
Easy to use XML feed importer with the ability to map feed items onto (custom) posts and their meta fields.
Usage Notes
The feeds are managed (added / edited / deleted) like normal posts.
To import a new feed, you must first save the post with at least the title and URL fields filled in.
This is because the importer downloads a copy of the feed and works with that copy.
If you try to import before the feed is saved, the importer has no copy to work with yet.
Form explanation
Import
It’s the first field in the form, but the last step.
There is no cancel button, so once you click the ‘import’ button, you can only refresh (or move away from) the page to cancel the import.
The import is done 10 feed items at a time, the progress is shown under the import button.
The import sends ajax requests until the import is done at which point the spinner stops spinning and the progress message shows ‘n posts imported’
URL
the feed url
Required Fields (optional)
comma separated list of (custom) post fields
if a field in this list has no mapping, than the import will fail
if the mapping of a field in this list turns out to be empty, than the corresponding feed item is skipped.
Unique Fields (optional)
comma separated list of (custom) post fields
unique fields are not implicitly required
skips a feed item if a field with this value already exists.
CSV delimiter (optional)
if this field is empty, the plugin assumes the URL links to a XML file
if this field is non-empty, the plugin assumes the URL links to a CSV file, with the given value as the delimiter
a CSV file will be converted to XML, so the further usage of the plugin remains the same.
Select root
select the path to the items that should be mapped
i.e. you want to import products into your woocommerce installation
xml :
you can use the plus and minus buttons to go a level up or down
the select boxes show the possible paths for a given level
Click the ‘Select’ button to confirm the root
The XML area should fill up with the first item that matches root.
Select post field
the first select box shows the registered post types and Taxonomies.
the second select box shows the corresponding fields. (Even columns like ID which you probably shouldn’t set manually)
many of the fields are always the same and correspond to the columns in the wp_posts table in the database, but the meta fields can differ.
the plugin needs at least one existing object of the selected post type to find these meta fields.
the meta fields are based on the first post of the selected post type it finds.
Map
this shows the current mapping
if you have selected a mapping, it can be removed with the ‘x’ at the right hand side
if you are satisfied with the mappings, click ‘Save map’
XML
once you have selected a root, the first xml item at this path will be shown here.
click anywhere on the XML to get the corresponding paths
the selected path will appear above the colourful XML
if the path contains attributes, they will appear as selectboxes
if the desired path depends on a sibling in the XML, follow these instruction:
some XML looks like this ..
in this case, click on the value tag in the XML and the corresponding path appears: ‘Assign path: …/parent/value’
now click on ‘parent’ in the path and 2 new selectboxes appear and an ‘Add to attribute list’ button
in our example you would select ‘key’ in the first selectbox and ‘name’ in the second
click ‘Add to attribute list’ and the path changes accordingly
once you see the path you want, click the ‘Add to map’ button.
The Map will now reflect that the path you chose is mapped om the selected post field.
WARNING
This plugin is new and requires more testing. If you decide to use the plugin, please make a backup of your database first.
Once you click the import link, there is no cancel button, you can refresh (or move away from) the page to cancel the import.
On your first go, try a smaller feed to make sure you mapped it right.
TODO
add row actions
define type of imported value (now images only work with _thumbnail_id meta value)
