定制 pessek/pessek_attachments 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pessek/pessek_attachments

Composer 安装命令:

composer require pessek/pessek_attachments

包简介

File attachments for Elgg

README 文档

README

Elgg 4.0

Features

  • API and UI for attaching files and other entities
  • Form input for uploading file attachments
  • Views for displaying attachments

Usage

Magic

If you add your entity subtype to a list of entities supporting attachments, the plugin will attempt to create all of the UI, necessary to upload and display attachments:

elgg_register_plugin_hook_handler('allow_attachments', 'object:my_subtype', '\Elgg\Values::getTrue');

Note that this generic approach might not work with all plugins, and may require additional customizations on your side.

Display an attachment input

echo elgg_view('input/attachments');

To add an attachments input to your comment and discussion replies forms, use the following code. You will not need to add any code to your save action.

echo elgg_view('input/attachments', [
	'name' => 'comment_attachments',
		]);

To add an attachments input to your personal messages and replies forms, use the following code. You will not need to add any code to your save action.

echo elgg_view('input/attachments', [
		'name' => 'message_attachments',
	]);

Note that if you are not using hypeDropzone, your form must have it's encoding set to multipart/form-data.

Attach uploaded files in an action

hypeapps_attach_uploaded_files($entity, 'upload', [
   'access_id' => $entity->access_id, // change the access level of uploaded files
]);

Attach an object

hypeapps_attach($entity, $attachment);

Display attachments

```php
echo elgg_view('output/attachments', [
	'entity' => $entity,
]);

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2021-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固