Download the PHP package justinholtweb/craft-stars without Composer

On this page you can find all versions of the php package justinholtweb/craft-stars. 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 craft-stars

Stars — Reviews & Comments for Craft CMS 5

A structured reviews and comments system for Craft CMS: star ratings, threaded comments, four-state moderation, pros/cons, admin responses, a submitter blocklist, pluggable captcha, spam protection, and schema.org JSON-LD markup.

Requirements

Installation

Features

Usage

Frontend Form

With Pros & Cons

AJAX Submission

Displaying Reviews

Rating Distribution

Schema.org Markup

Place in your <head> to output valid JSON-LD for Google Rich Results:

Twig API Reference

Method Returns Description
craft.reviews.forEntry(entry) ReviewQuery Approved reviews for an entry, newest first
craft.reviews.averageRating(entry) float Average rating (approved only)
craft.reviews.count(entry) int Count of approved reviews
craft.reviews.distribution(entry) array {1: n, 2: n, ...} rating histogram
craft.reviews.schemaOrg(entry) string JSON-LD <script> tag

All methods accept an Entry object or an entry ID integer.

Comments

Stars also provides a threaded comment system on entries, with the same moderation, spam protection, and login-gating as reviews.

Comment Form

Displaying Comments

The simplest way to render a full nested thread is the bundled recursive macro, fed by craft.comments.tree(entry):

Or build it yourself — each comment in the tree exposes its replies via .children:

Reply nesting is capped by the Max Comment Depth setting; deeper replies are automatically attached at the deepest allowed level.

craft.comments API

Method Returns Description
craft.comments.tree(entry) Comment[] Approved comments as a nested tree (replies on .children)
craft.comments.forEntry(entry) CommentQuery Approved comments for an entry, oldest first
craft.comments.topLevel(entry) CommentQuery Approved top-level comments (no replies)
craft.comments.replies(comment) array Approved replies to a comment
craft.comments.count(entry) int Count of approved comments

Configuration

All settings are available in the CP under Stars > Settings. You can also override them in config/stars.php:

Permissions

Permission Description
stars:viewReviews View the Reviews section in the CP
stars:manageReviews Create and edit reviews
stars:moderateReviews Approve, reject, and mark as spam
stars:respondToReviews Add admin responses
stars:deleteReviews Delete reviews

Admin users have all permissions by default.

Events

The plugin uses standard Craft element events. You can listen for review saves, deletes, etc.:

Development

The plugin ships with a test suite built on Codeception and Craft's test framework. DDEV provides PHP and a database (no local PHP install required):

The suite boots a real Craft application, installs the plugin (running its migration), and exercises the services against a live database.

Roadmap


All versions of craft-stars with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0
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 justinholtweb/craft-stars contains the following files

Loading the files please wait ...