Lombiq / Orchard-Scripting-Extensions

Core module for running scripts inside Orchard.
Other
4 stars 4 forks source link
orchard orchard-cms orchard-module scripting

Orchard Scripting Extensions

About

Core module for running scripts inside Orchard.

Documentation

This module depends on Helpful Libraries. Please install it first!

WARNING: This module is only compatible with Orchard 1.6 or greater!

Scripting Extensions enhances Orchard's scripting capabilities by adding numerous new features for scripting support. Together with PHP Scripting Extensions you can use it to run PHP scripts inside Orchard for example.

Note: this module only contains common services but no scripting runtime. Check out the following engines and install one or more of them:

Module overview

This module consists of two features:

Core feature

This feature adds basic services for script management and also adds a scripting testbed to the dashboard.

Generic services

Orchard Scripting Extensions include multiple generic services (described below) that automatically use every scripting engine existing and enabled in the Orchard instance. By implementing the simple IScriptingRuntime interface you can extend the set of scripting engines with your own.
To use scripting engines from your own code, use IScriptingManager.

Script content types

Scripts are regular content items. There are two script content types:

Scripts' editors are syntax-highlighted thanks to the ACE editor.

Testbed

The testbed is a script editor that you can access from under the "Scripting" menu on the admin site. You can just write a script there or select an existing script and run it for testing purposes.
The testbed uses dynamic pages from Helpful Libraries. This makes pages like the testbed fully extensible and customizable like content items.

Scripting Rules

This feature adds scripting-related extensions to the Rules engine.

Script Execution Action

This action can be used to run an arbitrary script when an event fires. You can e.g. hook into the content item life cycle and run a script when a content item is published.

Adding your own scripting engine

By implementing the simple IScriptingRuntime interface you can write your own interface that can then used with all the common scripting features. Take a look at PHP Scripting Extensions for an example.

Contributing and support

Bug reports, feature requests, comments, questions, code contributions, and love letters are warmly welcome, please do so via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.