Download the PHP package thelia/comment-module without Composer

On this page you can find all versions of the php package thelia/comment-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package comment-module

Comment

Lets customers post comments on products and on content pages. A comment has a title, a message and a rating, and it belongs to a customer when the visitor is signed in.

Version 2.0 is a rewrite for Thelia 3. The front office is a Symfony UX LiveComponent rendered in Twig, the back office runs on the default-twig theme, and the Smarty templates, the comment loop and the front controller are gone.

Requirements

Thelia 3.0 or greater, PHP 8.3.

Installation

With composer, from the Thelia root:

Manually, copy the module into <thelia_root>/local/modules/ under the name Comment, then activate it in the back office.

Configuration

The configuration page is on the module list. It has seven settings:

Setting Effect
Activated Turns comments on for the whole shop
Moderate New comments stay pending until an administrator accepts them
Allowed references Which element types accept comments, product,content by default
Only customers Only signed-in customers may post
Only verified Only customers who bought the product may comment on it
Request delay Days after an order before a customer is asked for a comment, 15 by default
Notify administrators Sends an email to the shop managers when a comment is posted

The rating scale has no field on that page. It is the comment_max_rating configuration variable, 5 by default.

Front office

The module answers the product.bottom theme hook, so a theme that calls that hook shows the comment block with no further work. The block disappears on its own when comments are off for the shop or for the product.

To place it somewhere else, render the component directly:

ref is the element type and refId its id. The component reads the module settings itself, so it renders the form only to a visitor who is allowed to post, and shows the reason otherwise. It brings no stylesheet of its own, so add the module's own one next to it:

Back office

A comment management page sits in the tools menu. Comments are listed with a count per status, filtered by status or by the element they belong to, and can be accepted, refused, edited, deleted or written by hand. The same page carries the button that sends the comment requests to customers who ordered more than the configured delay ago.

Emails

Two messages, both editable in the back office:

Their templates are in templates/email/default/, and the strings they use are translated in I18n/email/default/.

Ratings

The average rating of an element is stored in the meta_data table under the key COMMENT_RATING. It is recomputed when a comment is posted, when its status changes and when it is deleted. Inside the comment block the component exposes it as this.averageRating. Elsewhere, read it back:


All versions of comment-module with dependencies

PHP Build Version
Package Version
Requires thelia/core Version ^3.2
thelia/installer Version ~1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thelia/comment-module contains the following files

Loading the files please wait ...