Actually, no installation is required. Just unzip the ZIP archive and you're ready to go. But if you still need a tutorial, here it is.
Via Composer Create-Project
Scriptor is available from Packagist and can also be installed by entering the composer command:
composer create-project bigins/scriptor your-scriptor-project
Via Composer Require
If you prefer, you can add Scriptor to an existing project inside the vendor/
directory:
composer require bigins/scriptor
Git Clone
git clone git@github.com:bigin/Scriptor.git
Download & Install
– Unpack the archive and rename the Scriptor-master
folder as you like.
– Rename the file /data/settings/_custom.scriptor-config.php
to custom.scriptor-config.php
(remove _
prefix/underscore).
– Upload the contents of the folder to your server, or upload the folder if you want to run the application in a subfolder.
Note also that there is a
.htaccess
file in the root directory.
For some hosts, RewriteBase
must be set. So, if you set up Scriptor in a subfolder, you may need to comment out this line for the RewriteBase in your .htaccess file:
# RewriteBase /
Use Scriptor as a library
To use Scriptor library in your own project, just include the boot.php
file:
require './your-scriptor-project/boot.php';
or use composer autoload:
require '../vendor/autoload.php';
Now you can just use Scriptor library in your own projects:
<?php // /public/index.php
use Scriptor\Core\Scriptor;
require dirname(__DIR__) . '/vendor/autoload.php';
$site = Scriptor::getSite();
$page = $site->pages()->getPage('slug=scriptors-demo-page');
Use Scriptor as a project
Place all Scriptor files in your root directory:
composer create-project bigins/scriptor public
How to upgrade from Scriptor 1.4.4- to 1.5.0+:
Backup any files you replace or delete!
- Replace
/editor/
with the new version - Replace
/imanager/
with the new version - Replace
/index.php
with the new version - Replace
/imanager.php
with the new version - Replace
/data/datasets/buffers/fields/1.fields.php
with the new version - Replace
/data/settings/scriptor-config.php
with the new version
Your Scriptor is now upgraded, test that everything works.