Download the PHP package linkrobins/shoutbox without Composer

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

Link Robins Shoutbox

A shoutbox for Flarum 2.0: a small live chat area your members can post short messages into. It can appear as a widget through fof/forum-widgets-core, as its own /shoutbox page, or both.

What it does

What it does NOT do

Settings

Found in Admin → Extensions → Link Robins Shoutbox.

Setting Default What it does
Display mode Page and widget Whether the shoutbox appears as a page, as a widget, or both. Also controls the sidebar link and the route.
Message order Oldest first Whether the newest message sits at the bottom (chat style) or the top.
Typing box position Next to the newest message Follows the message order by default, or pin it to the top or bottom.
Messages height (px) 320 Height of the scrollable message area. Accepts 100 to 1000.
Refresh interval (seconds) 30 How often an open shoutbox checks for new messages. Accepts 10 to 300.
Cooldown (seconds) 3 Minimum wait between one person's shouts. Set it to 0 to turn flood control off.
Maximum stored shouts 500 Older shouts beyond this count are pruned.

Ranges, for the numeric ones: height 100 to 1000, refresh interval 10 to 300, cooldown 0 to 3600, maximum stored shouts 1 to 100000.

Permissions

Set in Admin → Permissions.

Permission Who needs it
Post shouts Anyone you want to be able to write. Without it, the box is read only for them.
Delete others' shouts Moderators. Everyone can already delete their own shouts without this.

Reading the shoutbox is tied to Flarum's own View forum permission. If a group cannot view the forum, it gets no shouts at all rather than a partial list, so a private forum stays private.

How refreshing works

An open shoutbox asks the server for new messages every Refresh interval seconds. There is no WebSocket connection, which is what keeps it dependency free, and it is also why a message is not instant.

Three behaviours are worth knowing when you pick an interval:

Styling

The widget uses Flarum 2's CSS custom properties (var(--primary-color), var(--text-color) and friends), so it follows your theme without configuration.

The send button adapts to where it sits, detected from its parent:

To override anything, target .ShoutboxWidget and its modifier classes from your custom Less in Admin → Appearance.

Requirements

Troubleshooting

The widget is missing from the fof/forum-widgets-core config page. Run php flarum cache:clear and reload the admin page. If it is still missing, check the extension is enabled under Extensions, and that Display mode is not set to "Page only".

A 500 error on the homepage after enabling. Almost always a migration that has not run. Run php flarum migrate. If it persists, read storage/logs/flarum-YYYY-MM-DD.log for the real exception.

Shouts post, but take a while to appear for everyone else. That is the refresh interval doing its job, 30 seconds by default. Lower it in the settings if you want faster updates, keeping in mind that every open tab polls. If the delay is much longer than the interval, open the browser's network tab and look for failing GET /api/shoutbox requests, which will have triggered the back-off.

Someone cannot post. Check they have the Post shouts permission, and that they are not inside the cooldown window from their last shout.

Installation

Then enable Link Robins Shoutbox in Admin → Extensions. For the widget, open the fof/forum-widgets-core settings and place it where you want it.

License

MIT


All versions of shoutbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0
fof/forum-widgets-core Version ^2.0.0-beta.3
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 linkrobins/shoutbox contains the following files

Loading the files please wait ...