[wordpress插件] DocumentCloud文档云

wordpress 插件 文章 2020-04-20 20:50 472 0 全屏看文

AI助手支持GPT4.0

评分
80
描述

DocumentCloud is a service that allows journalists to analyze, annotate and publish documents, hosted by Investigative Reporters & Editors

DocumentCloud 是一项服务,允许记者分析,注释和发布由调查记者和编辑者托管的文档。

.

Initial development of this plugin supported by NPR as part of the NPR 支持的该插件的初始开发是

org" rel="nofollow">StateImpact project.

org“ rel =” nofollow“> StateImpact 项目。

This plugin allows you to embed DocumentCloud resources using either the raw URL on its own line:

此插件可让您使用原始URL自己的行嵌入DocumentCloud资源:

Here's something you should really take a look at:

 这是您应该真正看一下的东西:

https://www.documentcloud.org/documents/282753-lefler-thesis.html

https://www.documentcloud.org/documents/282753-lefler-thesis.html

Isn't that interesting?

那不是很有趣吗?

Or a custom shortcode:

或自定义简码:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html"]

  [documentcloud url =“ https://www.documentcloud.org/documents/282753-lefler-thesis.html”]

When you save, WordPress fetches and stores the actual embed code HTML from the DocumentCloud servers using oEmbed.

保存时,WordPress使用oEmbed从DocumentCloud服务器获取并存储实际的嵌入代码HTML。

You can freely toggle between visual and HTML mode without mangling embed code, and your embed will always be up to date with the latest embed code.

您可以在视觉和HTML模式之间自由切换,而无需修改嵌入代码,并且嵌入将始终是最新的嵌入代码。

By default, documents will have a responsive width (it will narrow and widen as necessary to fill available content area) and use the theme’s default height.

默认情况下,文档将具有响应宽度(会根据需要缩小和扩大以填充可用的内容区域),并使用主题的默认高度。

If you want to override this, you can either set responsive="false" or explicitly set a width:

如果要覆盖此设置,可以设置 response =“ false” 或显式设置 width

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" width="600"]

  [documentcloud url =“ https://www.documentcloud.org/documents/282753-lefler-thesis.html” width =“ 600”]

You can set your own defaults in Settings > DocumentCloud, but default widths will be ignored unless responsive is disabled:

您可以在“设置”>“ DocumentCloud”中设置自己的默认值,但是默认宽度将被忽略,除非禁用了“ 响应

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html" responsive="false"]

  [documentcloud url =“ https://www.documentcloud.org/documents/282753-lefler-thesis.html”响应=“ false”]

To embed a single page, use any page-specific URL.

要嵌入单个页面,请使用任何页面特定的URL。

Pages ignore width/height and always act responsively:

页面忽略 width / height 并始终响应:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1"]

  [documentcloud url =“ https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1”]

To embed a note, use any note-specific URL.

要嵌入便笺,请使用任何便笺特定的URL。

Notes ignore width/height and always act responsively:

笔记会忽略 width / height 并始终做出响应:

[documentcloud url="https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1/a53674"]

  [documentcloud url =“ https://www.documentcloud.org/documents/282753-lefler-thesis.html#document/p1/a53674”]

Here’s the full list of embed options you can pass via shortcode attributes;

这是您可以通过简码属性传递的嵌入选项的完整列表;

some are specific to the type of resource you’re embedding.

一些特定于您要嵌入的资源类型。

All resources:

所有资源:

    • url (required, string): Full URL of the DocumentCloud resource.
    • url 必填,字符串):DocumentCloud资源的完整URL。

    • container (string): ID of element to insert the embed into;

    • container (字符串):要插入嵌入内容的元素的ID;

      if excluded, embedder will create its own container.

    • 如果排除,embedder将创建自己的容器。

    Documents only:

    仅文档:

      • height (integer): Height (in pixels) of the embed.
      • height (整数):嵌入的高度(以像素为单位)。

      • width (integer): Width (in pixels) of the embed.

      • width (整数):嵌入的宽度(以像素为单位)。

        If used, will implicitly set responsive="false".

      • 如果使用,将隐式设置 response =“ false”

      • responsive (boolean): Use responsive layout, which dynamically adjusts width to fill content area.

      • 响应(布尔值):使用响应布局,该布局可动态调整宽度以填充内容区域。

        Defaults true.

      • 默认值为 true

      • responsive_offset (integer): Distance (in pixels) to vertically offset the viewer for some responsive embeds.
      • response_offset (整数):对于某些响应嵌入,垂直偏移查看器的距离(以像素为单位)。

      • page (integer): Page number to have the document scroll to by default.
      • page (整数):默认情况下文档滚动到的页码。

      • note (integer): ID of the note that the document should highlight by default.
      • note (整数):默认情况下,文档应突出显示的注释的ID。

      • notes (boolean): Hide or show notes.
      • 便笺(布尔值):隐藏或显示便笺。

      • search (boolean): Hide or show search form.
      • search (布尔值):隐藏或显示搜索表单。

      • sidebar (boolean): Hide or show sidebar.
      • 侧边栏(布尔值):隐藏或显示侧边栏。

      • pdf (boolean): Hide or show link to download original PDF.
      • pdf (布尔值):隐藏或显示链接以下载原始PDF。

      • text (boolean): Hide or show text tab.
      • 文本(布尔值):隐藏或显示文本标签。

      • zoom (boolean): Hide or show zoom slider.
      • zoom (布尔值):隐藏或显示缩放滑块。

      • format (string): Indicate to the theme that this is a wide asset by setting this to wide.

      • format (字符串):通过将其设置为 wide 来表明主题是广泛的资产。

        Defaults normal.

      • 默认为 normal

      You can read more about publishing and embedding DocumentCloud resources on https://www.documentcloud.org/help/publishing.

      您可以在https://www.documentcloud.org/help/publishing上阅读有关发布和嵌入DocumentCloud资源的更多信息。

安装步骤

    1. Upload the contents of the plugin to wp-content/plugins/documentcloud
    2. 将插件的内容上传到 wp-content / plugins / documentcloud

    3. Activate the plugin through the “Plugins” menu
    4. 通过“插件”菜单激活插件

    5. In your posts, embed documents, pages, or notes using the DocumentCloud button or the [documentcloud] shortcode
    6. 使用DocumentCloud按钮或 [documentcloud] 简码在您的帖子中嵌入文档,页面或便笺

    7. Optional: Set a default width/height for all DocumentCloud embeds (which can be overridden on a per-embed basis with the height/width attributes) at Settings > DocumentCloud.

    8. 可选:在“设置”>“ DocumentCloud”中为所有DocumentCloud嵌入设置默认宽度/高度(可以使用 height / width 属性在每个嵌入的基础上对其进行覆盖)。

      (This default width will only be used if you set responsive="false" on an embed.)

    9. (仅当您在嵌入上设置 response =“ false” 时,才会使用此默认宽度。)

    Upgrading from Navis DocumentCloud: If you're currently using the Navis DocumentCloud plugin (from which this plugin was built), you'll want to deactivate or delete it before installing this plugin.

    从Navis DocumentCloud升级::如果您当前正在使用Navis DocumentCloud插件(此插件是从其构建的),则需要在安装此插件之前将其停用或删除。

    p>

    >

下载地址
https://downloads.wordpress.org/plugin/documentcloud.zip
-EOF-

AI助手支持GPT4.0