Download the PHP package askancy/laravel-shortcode-plus without Composer

On this page you can find all versions of the php package askancy/laravel-shortcode-plus. 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 laravel-shortcode-plus

Logo Laravel Shortcode Plus

Latest Version on Packagist GitHub Tests Action Status GitHub PHPStan GitHub Code Style Action Status Maintainability Test Coverage License Mit Total Downloads


Why Shortcode+?

This package allows you to use shortcodes in your application, like a Wordpress / BBS style websites.

In our days, shortcodes are a great way to preserve the integrity of the data within the content published on our site (such as a blog or forum) without risking having to rewrite the format each time.

With Laravel Shortcode+ we have the ability to turn a standard shortcode into a dynamic asset that can update over time (new HTML standards, cookie consent, AMP versions, and more)!

Warning: this is a very opinionated package and it's not intended to be multi-purpose.

How it Works

For example, you can use the following shortcode to embed a Youtube video:

This will be rendered as:

As you can see, we don't just generate an iframe but make it accessible, performant and in line with the best SEO practices around.


Installation

You can install the package via composer:

You can use shortcodes CSS publishing the assets:

You can publish and run the migrations with:

You can publish the config file with:

If you want to upgrade every time your assets, add in your composer.json:

Optionally, you can publish the views using

Usage

Laravel Shortcode Plus is shipped with a default CSS and JS for a better user experience. You can add on resources/css/app.css the CSS files:

and in resources/js/app.js the JS files:

Now you can parse your source as follows:

Parsers

Here is the list of the available parsers:

Shortcode Description Parameters Example
[twitter] Get a Twitter card url [twitter url="https://twitter.com/elonmusk/status/1585841080431321088"]
[youtube] Get a Youtube (light) player url [youtube url="https://www.youtube.com/watch?v=9bZkp7q19f0"]
[spotify] Get a Spotify player url or uri [spotify url="https://open.spotify.com/track/2TpxZ7JUBn3uw46aR7qd6V"]
[faq] Create a <details> tag with embedded content title [faq title="What is the answer to the ultimate question?"]42[/faq]
[spoiler] Create a <details> tag with embedded content title [spoiler title="Spoiler"]This is hidden content[/spoiler]
[facebook] Get a Facebook card url [facebook url="https://www.facebook.com/elonmusk/posts/10157744420210129"]
[instagram] Get a Instagram card url [instagram url="https://www.instagram.com/p/CApQfIjBGxC/"]
[image] Create an image with Image::class model id, caption (optional) [image id="123"]
[gallery] Create a gallery image with Image::class model title, images Single or multiple images: [gallery title="Gallery title here" images="1"] or [gallery title="Gallery title here" images="1,2,3"]
[photo] Create a gallery image with [Nova Media Hub](https://github.com/outl1ne/nova-media-hub) model didascalia effect(optional) Single or multiple images: [photo didascalia="Gallery title here" id="1,2,3"] Effect [photo id="1,2,3" effect="carousel
[leggianche] Create a Read more div, based on Article or Post model id [leggianche id="1"]
[distico] Create a side text block, based on Article or Post model id [distico id="1"]
[button] Create a button that links to an URL link, label, level (optional) [button link="https://www.google.com" label="Google" level="primary/secondary"]
[tmdb] Create a TMDB card type, id [tmdb type="movie/tv" id="123"]
[widgetbay] Create a Widgetbay iframe id (optional), link (optional) [widgetbay id="1"] [widgetbay link="https://www.amazon.it/product?tag="41515&subtag="5151"..."]

Note for Facebook

Please remember to call the SDK before </body>:

Note for Twitter

Please remember to call the SDK before </body>:

Note for Reddit

Please remember to call the SDK before </body>:

Note for Justwatch

Please remember to call the SDK before </body>:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-shortcode-plus with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
ext-curl Version *
guzzlehttp/guzzle Version ^7.7
illuminate/contracts Version ^9.0|^10.0
spatie/laravel-package-tools Version ^1.13.0
webwizo/laravel-shortcodes Version 1.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 askancy/laravel-shortcode-plus contains the following files

Loading the files please wait ....