Download the PHP package biglotteryfund/preview-button without Composer

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

Note: this project is no longer maintained / usable beyond Craft CMS 3.2

Craft 3.2 saw the release of "headless preview" which effectively supersedes this plugin. Headless Preview is much more powerful than this plugin, and also makes it no longer work as draft entries are now dynamic (eg. use JavaScript to update the UI), which means our plain-ol' server-rendered button will no longer link to the right place. Our suggestion is to disable this plugin and modify your API calls to pass through the Craft preview tokens (which Just Work™) to your API – there's a good guide here: https://nystudio107.com/blog/headless-preview-in-craft-cms

Preview Button plugin for Craft CMS 3.x

Adds a preview button to the entry editor screen to allow previewing of draft/revision entries

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require biglotteryfund/preview-button
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Preview Button.

Preview Button Overview

Sites that make use of the Element API may not benefit from Craft's preview features if they're not making use of templating. This plugin adds a button to the Entry editing screen which links to a preview URL with ?draft=$id or ?version=$id parameters so your backend can look up content from the correct place.

It's your responsibility to write the backend code to fetch these revisions/drafts, but this plugin should allow you to give users a way to preview content directly from the editing screen.

Configuring Preview Button

There are three settings:

1. URL base

This will replace your siteUrl for the entry's URI (eg. you may wish to serve preview content on a subdomain or subfolder of your main site).

2. Version URL parameter (optional)

This will be appended to the preview URI along with the ID of the version, eg. ?version=$id.

3. Draft URL parameter (optional)

This will be appended to the preview URI along with the ID of the draft, eg. ?draft=$id.

Using Preview Button

Install the plugin, configure a URL base as a minimum, and edit an entry in draft/revision mode. You should see a button below the entry fields:

Preview Button Roadmap

Possibly supporting more advanced URL construction and configuring which entry types or user roles can see the preview button.

--

Brought to you by Big Lottery Fund


All versions of preview-button with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0-RC1
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 biglotteryfund/preview-button contains the following files

Loading the files please wait ....