Download the PHP package datlechin/flarum-link-preview without Composer

On this page you can find all versions of the php package datlechin/flarum-link-preview. 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 flarum-link-preview

Link Preview

A Flarum extension. Shows a preview card for links in posts, with the page's title, description and image. Your forum fetches the page itself, so links are not sent to a third-party service.

Features

Installation

Requires Flarum 2.0 and PHP 8.3 or later.

Updating

Configuration

Setting Default Description
Open links in a new tab On Opens links to other sites in a new tab.
Fall back to Google for site icons Off Uses Google's favicon service when a site has no icon.
Preview links to this forum On Previews discussions, users, tags and other forum pages from the database.
Skip links to media files Off Does not preview links to image, audio and video files.
Previews per post 5 The maximum number of previews in one post.
Fetch previews in batches On Requests the previews on a page together instead of one request per link.
Cache duration (minutes) 60 How long a preview is cached. 0 disables caching.
Allowed sites Empty If set, only these sites are previewed.
Blocked sites Empty These sites are never previewed.

Allowed and blocked sites

Enter one site per line, or separate them with commas.

Entry Matches
example.com example.com and its subdomains
example.com/news example.com/news and the pages under it
*.example.com subdomains of example.com, but not example.com itself

Entries match the whole host name, so example.com does not match notexample.com.

Which links are previewed

Security

Anyone who can read a post can make your server fetch a URL, so the extension limits what it fetches:

For developers

Adding a card for your pages

Register a card for a forum route name. The route is matched by Flarum's router.

Previewing links in your own content

Posts and private messages are handled already. To preview links in content that your own component renders, register the component and a selector for the elements that hold the content:

Changing the HTTP client

Pages are fetched with the client bound as datlechin-link-preview.transport in the container. To add options, such as a proxy, extend it in a service provider:

The private network check is always applied on top of this client.

Links


All versions of flarum-link-preview with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0.0-rc.7
symfony/http-client Version ^7.4
symfony/http-foundation Version ^7.4
ext-dom Version *
ext-mbstring Version *
ext-json Version *
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 datlechin/flarum-link-preview contains the following files

Loading the files please wait ...