PHPackages                             netcommons/content-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. netcommons/content-comments

ActiveCakephp-plugin

netcommons/content-comments
===========================

ContentComments for NetCommons Plugin

3.3.7.0(2y ago)125.9k24LicenseRef-NetCommonsPHPCI passing

Since Aug 28Pushed 3mo ago12 watchersCompare

[ Source](https://github.com/NetCommons3/ContentComments)[ Packagist](https://packagist.org/packages/netcommons/content-comments)[ Docs](http://www.netcommons.org/)[ RSS](/packages/netcommons-content-comments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (4)

ContentComments
===============

[](#contentcomments)

[![Tests Status](https://github.com/NetCommons3/ContentComments/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/NetCommons3/ContentComments/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/2f02acc638723e90ef67b268bd34045740389c455b7ed7c3795c14dc0a1688d7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f4e6574436f6d6d6f6e73332f436f6e74656e74436f6d6d656e74732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/NetCommons3/ContentComments?branch=master)[![Stable Version](https://camo.githubusercontent.com/76c90a075e88fa007f970eacbe75867f508aac518b6c36cf03fc8ec4beed6ae5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6574636f6d6d6f6e732f636f6e74656e742d636f6d6d656e74732e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/netcommons/content-comments)

### [phpdoc](https://netcommons3.github.io/NetCommons3Docs/phpdoc/ContentComments/)

[](#phpdoc)

### 概要

[](#概要)

コンテンツの一覧にコメント数を表示する機能と、コンテンツの詳細でコメントを投稿する機能を提供します。
利用するプラグインはコメントの使用有無(use\_comment)、コメントの承認有無(use\_comment\_approval)を定義してください。

#### コンテンツの一覧にコメント数を表示

[](#コンテンツの一覧にコメント数を表示)

ContentCommentBehaviorとContentCommentHelperを使用します。
コメントと紐づくモデルにContentCommentBehavior、
コンテンツ一覧のコントローラーにContentCommentHelperを定義してください。

##### サンプルコード

[](#サンプルコード)

###### コントローラー

[](#コントローラー)

```
class VideosController extends VideosAppController {

	public $uses = array(
		'Videos.Video',
		'Videos.VideoSetting'
	);

	public $helpers = array(
		'ContentComments.ContentComment' => array(
			'viewVarsKey' => array(
				'contentKey' => 'video.Video.key',
				'contentTitleForMail' => 'video.Video.title',
				'useComment' => 'videoSetting.use_comment',
				'useCommentApproval' => 'videoSetting.use_comment_approval'
			)
		)
	);

	public function index() {
		$query = array(
			'conditions' => array(
				'VideoSetting.block_key' => Current::read('Block.key')
			)
		);
		$viewVars['videoSetting'] = $this->VideoSetting->find('first', $query);
		$viewVars['videos'] = $this->Video->find('all');

		$this->set($viewVars);
	}
}
```

###### モデル

[](#モデル)

```
class Video extends VideoAppModel {
	public $actsAs = array(
		'ContentComments.ContentComment'
	);
}
```

###### ビュー（ctpテンプレート）

[](#ビューctpテンプレート)

```

```

#### コンテンツの詳細でコメントを投稿する

[](#コンテンツの詳細でコメントを投稿する)

ContentCommentsComponentとContentCommentHelperを使用します。
コンテンツ詳細のコントローラーにContentCommentsComponentを定義してください。

##### サンプルコード

[](#サンプルコード-1)

###### コントローラー

[](#コントローラー-1)

```
class VideosController extends VideosAppController {

	public $uses = array(
		'Videos.Video',
		'Videos.VideoSetting'
	);

	public $components = array(
		'ContentComments.ContentComments' => array(
			'viewVarsKey' => array(
				'contentKey' => 'video.Video.key',
				'contentTitleForMail' => 'video.Video.title',
				'useComment' => 'videoSetting.use_comment'
				'useCommentApproval' => 'videoSetting.use_comment_approval'
			),
			'allow' => array('view')
		)
	)

	public function view($videoKey) {
		$query = array(
			'conditions' => array(
				'VideoSetting.block_key' => Current::read('Block.key')
			)
		);
		$viewVars['videoSetting'] = $this->VideoSetting->find('first', $query);

		$query = array(
			'conditions' => array(
				'Video.key' => $videoKey,
				'Video.language_id' => Current::read('Language.id')
			)
		);
		$viewVars['video'] = $this->Video->find('first', $query);

		$this->set($viewVars);
	}
}
```

###### ビュー（ctpテンプレート）

[](#ビューctpテンプレート-1)

```

```

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance55

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 78.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~173 days

Recently: every ~196 days

Total

16

Last Release

953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cec0c574ba55af6453ca29a0a8eae15b9ba191cc5361338f930204af915e009b?d=identicon)[NetCommons](/maintainers/NetCommons)

![](https://www.gravatar.com/avatar/3fac67e47e97c9b761aa7bea48a2a7d9f9e7514244224d87d55d664fb40416b5?d=identicon)[s-nakajima](/maintainers/s-nakajima)

![](https://www.gravatar.com/avatar/2542cca1ea23dae95476aa8a8049b7d80b4cd39a5d332b792dd998ac123f4141?d=identicon)[nagasheep](/maintainers/nagasheep)

---

Top Contributors

[![akagane99](https://avatars.githubusercontent.com/u/2756509?v=4)](https://github.com/akagane99 "akagane99 (291 commits)")[![s-nakajima](https://avatars.githubusercontent.com/u/4422735?v=4)](https://github.com/s-nakajima "s-nakajima (45 commits)")[![kteraguchi](https://avatars.githubusercontent.com/u/3079266?v=4)](https://github.com/kteraguchi "kteraguchi (26 commits)")[![RyujiAMANO](https://avatars.githubusercontent.com/u/1955236?v=4)](https://github.com/RyujiAMANO "RyujiAMANO (5 commits)")[![kazuno25](https://avatars.githubusercontent.com/u/208909611?v=4)](https://github.com/kazuno25 "kazuno25 (1 commits)")[![tmx-researchmap-team](https://avatars.githubusercontent.com/u/144095760?v=4)](https://github.com/tmx-researchmap-team "tmx-researchmap-team (1 commits)")

---

Tags

cakephpcontent-comments

### Embed Badge

![Health badge](/badges/netcommons-content-comments/health.svg)

```
[![Health](https://phpackages.com/badges/netcommons-content-comments/health.svg)](https://phpackages.com/packages/netcommons-content-comments)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
