impresscms/composer-addon-installer-plugin

此插件允许通过 composer 安装 ImpressCMS 扩展

v1.0.6 2023-01-02 12:29 UTC

This package is auto-updated.

Last update: 2024-09-21 22:20:13 UTC


README

License Packagist PHP Version Support GitHub release (latest by date) Packagist Downloads

Composer 扩展安装插件(适用于 ImpressCMS

Composer 插件,用于正确地将模块、主题和翻译安装到 ImpressCMS 所需的位置。

如何使用?

通常,此包只需由 ImpressCMS 本身要求。所以,基本上这意味着如果你想使用此包提供的功能,不需要安装 CMS。

处理的包类型

目前,此插件处理 impresscms-moduleimpresscms-themeimpresscms-translation composer 包类型。

以下是支持的 composer.json 文件示例/描述。

impresscms-module 格式

{
   "name": "MODULE/NAME",
   "description": "HERE CAN BE WRITTEN SOME TEXT",
   "authors": [ // this becomes teammembers internaly
          {
              "name": "Someones Name",
              "email": "someones@email.lt",
              "homepage": "https://www.someone-website.be",
              "role": "Developer"
          }
    ],
    "license": "package-license",
    "extra": {
      "credits": "Anything that you would like to know about creator in module admin",
      "author": "somebody", // if you want specify first person or company who created this module write it here
      "help": "",
      "icon": {
        "small": "file_in_module_directory_to_be_shown_as_small_image_for_module.png",
        "big": "file_in_module_directory_to_be_shown_as_big_image_for_module.png",
      },
      "warning": "if you want to put any warning about release, you can but it here",
      "website_url": "https://website_for_project.com",
      "email": "email@for_project.us",
      "people": [], // array with involved people data
      "autotasks": [], // array to describe autotasks that will be installed with this module
      "manual": "",
      "admin": { // if module doesn't have admin do not specify this key
        "index": "if specified must be url to admin page",
        "menu": [], // describes admin menu
      },
      "object_items": [], // if module use IPF objects here you can specify names list that would be automatically processed
      "search": { // if module doesn't have search do not specify this key
          "file": "php file for gathering search results",
          "func": "function name in that file"
      },
      "comments": {}, // if module uses build in comments configuration is specified here, otherwise don't specify this key
      "templates": [], // specify templates that must be registered to be used by this module
      "has_main": true, // if specified and has value true ImpressCMS thinks that this module has old-school main page
      "events": {
        "update": {}, // if specified update callback function is invoked when module is updated
      },
      "blocks": [], // if module uses blocks here you must specify blocks configuration
      "menu": [], // if module has submenu, here is possible to specify menu items
      "config": [], // specified options that can be configurated in module settings
      "notification": [], // describes notifications that is provided by this module,
      "assets": [], // if module needs to copy non automatically copied assets files to public directory, all these assets must be specified here
    }
}

impresscms-theme 格式

{
   "name": "THEME/NAME",
   "description": "HERE CAN BE WRITTEN SOME TEXT",
   "type": "impresscms-theme",
   "license": "", // see composer.json docs 
   "extra": {
       "screenshots": {
          "user": "", // url with user side theme screenshot, if this specified icms thinks that theme supports user side
          "admin": "" // same as user but for admin side
        },
       "name": "THEME NAME TO USE IN LIST" // if specified this value will be used in all theme names lists
    }
}

impresscms-translation 格式

{
   "name": "TRANSLATION/NAME",
   "description": "HERE CAN BE WRITTEN SOME TEXT",
   "type": "impresscms-translation",
   "license": "", // see composer.json docs 
}

注意:此格式仅适用于核心翻译,所有其他内容都必须来自模块

如何贡献?

如果你想添加一些功能或修复错误,你可以 fork、更改并创建 pull request。如果你不确定如何操作,可以尝试 交互式 GitHub 教程

如果你发现了任何错误或有一些问题,请使用 问题标签 并在那里写下你的问题。