添加用于编辑自定义每个主题字段的用户界面

Heyah,

while working on the topic permalinks plugin, I realised that there is no way for the Administrator to add, configure or edit our new awesome custom-fields other than going into the Shell or Database and do it manually. Which makes it a quite hidden feature.

I’d propose to build a general-purpose modal-dialog similar to the administration interface listing all existing custom_fields and allowing them to be edited (and maybe other fields added) by administrators. Here is an example sketch for what this could look like for a topic:

I’d propose to make this accessible through the topic wrench per topic, the administrator-wrench per post, make it part of the category-edit page and add a button for it on the user-profile-admin-page.

What do you think?

7 个赞

I like this feature, but it gets a bit tricky.

Ideally you only show it if you actually have custom fields so the backend needs to be a bit smarter and it may add some cost to querying posts.

I am not sure if I want this for V1 though.

2 个赞

Which we could do, if we make the usage of fields (at least through the editor) something plugins half-way officially register. This would also easier allow us to learn about and warn for clashes, and if we know the fields, we can do the serialisation automatically and the plugins don’t have to do the same monkey patching all the time.

I am thinking of something similar to the settings.yml, like a custom_fields.yml, which then simply would have top level sections for the models that have custom-fields support. Something along the lines of

topic:
   permalink:
      default: ''
      client: true
   template:
     <<
      - article
      - blog-post

user:
   author_bio:
     default: ""
     client: true
  author_picture:
     default: ""
     client: true
     type: url

是否有人已经创建了某种前端锻炼来编辑主题的自定义字段?

我三个月前才为一位客户做了一个定制化解决方案(之前也做过好几次)。

地点、主题列表预览和活动都有其特定的用户界面。

如果您有需要完成的项目并且有预算,我很乐意看看。

您能详细说明一下需求吗?