[wordpress插件] dbviewdbview

wordpress 插件 文章 2020-04-13 12:00 554 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Presents the results a database SQL query in a table.

将结果呈现在表中的数据库SQL查询中。

The query can be saved as a

该查询可以另存为

named view which can then be embedded as a table in any post using the shortcode

命名视图,然后可以使用短代码将其作为表格嵌入到任何帖子中

[dbview name=name-of-view].

[dbview名称=视图名称]。

Views can be created and edited in the dashboard.

可以在仪表板中创建和编辑视图。

Shortcode examples

简码示例

Show the ‘world cities’ view with a page size of 50 rows.
    

以50行的页面大小显示“世界城市”视图。
    

[dbview name=’world cities’ pagesize=50]

[dbview name =“世界城市”的页面大小= 50]

Show the ‘world cities’ view initially sorted by column ‘city’ in ascending order.
    

显示最初按“城市”列升序排列的“世界城市”视图。
    

[dbview name=’world cities’ sort=city order=asc]

[dbview name =“世界城市” sort = city order = asc]

Show the ‘world cities’ view initially sorted by column ‘population’ in descending order.
    

显示“世界城市”视图,该视图最初按“人口”列降序排列。
    

[dbview name=’world cities’ sort=population order=desc]

[dbview名称=“世界城市”的sort =填充顺序= desc]

Show the ‘world cities’ view without any pagination.
    

无需分页即可显示“世界城市”视图。
    

[dbview name=’world cities’]

[dbview name =“世界城市”]

Show the ‘world cities’ in the US with a population of greater than 5 million.

显示人口超过500万的美国“世界城市”。

See FAQ on passing arguments.
    

请参阅有关传递参数的常见问题解答。
    

[dbview name=’world cities in country’ sort=city order=asc pagesize=10
     

[dbview名称=“国家/地区中的世界城市” sort = city order = asc pagesize = 10
     

arg1=’United States’ arg2=5000000]

arg1 =“美国” arg2 = 5000000]

End User Features

最终用户功能

    • Column sorting on table header.

    • 表标题上的列排序。

      Columns are enabled on each column.

    • 每列上都启用了列。

    • Page navigation is on the table footer (from 0.5.3).

    • 页面导航位于表格页脚上(从0.5.3开始)。

    • Tables are loaded using AJAX.
    • 使用AJAX加载表。

    Management Features

    管理功能

      • Each view can be created/edited/deleted and tested under dbview/Settings in the dashboard.
      • 可以在仪表板的dbview / Settings下创建/编辑/删除每个视图并对其进行测试。

      • Easy view consists of one SQL statement plus an optional PHP snippet associated wthe each column.
      • 轻松视图由一个SQL语句以及与每列相关联的可选PHP代码段组成。

      • Sorting on each column can be enabled and disabled.
      • 可以在每个列上启用和禁用排序。

      • Each column can be manipulated using a PHP snippet.

      • 每个列都可以使用PHP代码段进行操作。

        This functionality allows the introduction of permalinks, images and other customisations.

        此功能允许引入永久链接,图像和其他自定义设置。

      • Each view is stored in a single serialized object in the wp_options table.
      • 每个视图都存储在wp_options表的单个序列化对象中。

      Limitations

      限制

        • Tables are not styled;

        • 表未设置样式;

          this is left to the theme.

          这留给主题。

        • The data in the results table(s) cannot be edited.
        • 结果表中的数据无法编辑。

        Security

        安全性

        When the plugin is activated, administrators are given the capability to ‘manage DB views’.

        激活插件后,将为管理员提供“管理数据库视图”的功能。

        Any other wp user with a different role that needs to create/edit views must be granted that capability.

        必须授予具有其他角色的其他wp用户(需要创建/编辑视图)

        />

        />

        Only a view that is explicitly checked as public will be visible to non administrators and the public.

        非管理员和公众只能看到显式检查为公共的视图。

安装步骤

    1. Follow the standard installation procedure for WordPress plugins.
    2. 遵循 WordPress插件的标准安装过程

    3. Refresh (F5) any existing pages in browser so latest javascript loaded.
    4. 刷新(F5)浏览器中的所有现有页面,以便加载最新的JavaScript。

    5. Manually decativate and reactivate if any predefined views are missing.
    6. 如果缺少任何预定义的视图,请手动删除并重新激活。

    There are no configurable options.

    没有可配置的选项。

    Ten or more predefined views that navigate wp_posts, wp_postmeta, wp_options,

    可导航wp_posts,wp_postmeta,wp_options,
    的十个或更多预定义视图

    wp_users and wp_usermeta are loaded and reloaded each time the plugin is activated.

    每次激活插件时,都会加载并重新加载wp_users和wp_usermeta。

    These views can be modified and deleted.

    这些视图可以修改和删除。

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

AI助手支持GPT4.0