se7enxweb/powercontent
Composer 安装命令:
composer require se7enxweb/powercontent
包简介
Power Content Provides for Publishing any type of content dynamically without needing to first visit content/edit view to input content durring creation (POST) Actions. Great for advanced developers!
关键字:
README 文档
README
Copyright
Copyright (C) 2006-2007 SCK-CEN
Written by Kristof Coomans ( kristof[dot]coomans[at]telenet[dot]be )
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Features
The Power content module allows one-click publishing or pre-filling of attributes, similar to the Object Creator extension (http://ez.no/community/contribs/hacks/object_creator). However, it uses content/edit for the final processing.
This module has one big advantage: it can deal with any type of attribute, even new custom ones.
Installation instructions
-
Enable the extension (in site.ini.append or by using the admin interface)
-
Add a policy for this module to the desired roles.
How to use in your template ?
The main idea is to add new attributes that are going to contain the values you want instead of the default ones on ez publish. This module associate these new fields with standard fields that exist when editing with the default edit template. Therefore, you have to understand how ez names these fields so you can add the values you want.
A typical naming scheme for the input fields of an attribute is:
ContentObjectAttribute_[some attribute specific name]_[contentobjectattribute id]
For instance the name for the fields of an articles are (do a view source of the page when you're editing an article):
- title: ContentObjectAttribute_ezstring_data_text_1105
- into: ContentObjectAttribute_data_text_1108 (1105 and 1108 are contentobjectattribute identifier numbers that are going to be different on your installation.)
You will have to to change these names to:
powercontent_[contentclassattribute identifier]ContentObjectAttribute[some attribute specific name]_pcattributeid
For the article, it would be: -title: powercontent_title_ContentObjectAttribute_ezstring_data_text_pcattributeid -intro: powercontent_intro_ContentObjectAttribute_data_text_pcattributeid
When the Power Content module processes this kind of post variables, it will take their content and put them into the proper fields as if the user would have inputed it (it will inject fake post variables where the string "pcattributeid" will be replaced by the expected contentobjectattribute id).
On the top of the parameters you want to "prefill", you have to provide a few additionnal ones:
- NodeID: The nodeid of the parent object you want to create (as an option, you can put "UserNode", that will put create it under the usernode of the currently logged in user)
- ClassIdentifier: The class identifier of the object you want to create (you can provide either the class identifier or the class id, no need for both)
- CreateButton: a submit button You have more optional parameters, see the examples for details
- RedirectToMainNodeAfterPublish : if set, it will redirect to the full view of the newly created node
- RedirectURIAfterPublish : the url to display after the publication of the node.
Examples code
- Example code for the "article" content class. This will prefill the title and intro of the article:
- Example code for the "File" content class:
<div>
<label>File:</label>
<input class="box" name="powercontent_file_ContentObjectAttribute_data_binaryfilename_pcattributeid" type="file" />
</div>
<div>
<label>Title:</label>
<input type="text" name="powercontent_name_ContentObjectAttribute_ezstring_data_text_pcattributeid" value="" />
</div>
<div>
<input class="button" type="submit" name="CreateButton" value="Create" />
</div>
Enjoy these stable features and take it eZ in all things throughout life!
se7enxweb/powercontent 适用场景与选型建议
se7enxweb/powercontent 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 01 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「node」 「content」 「creation」 「ez publish」 「object creation」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 se7enxweb/powercontent 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 se7enxweb/powercontent 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 se7enxweb/powercontent 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A block that displays featured content - large image, title, description and link.
A custom URL rule class for Yii 2 which allows to create translated URL rules
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
UI Kit 3 Extension for Yii2
Adds more BBCode
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-01-01