Download the PHP package mango-chutney/craft-raisely-donation-forms without Composer

On this page you can find all versions of the php package mango-chutney/craft-raisely-donation-forms. 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 craft-raisely-donation-forms

Raisely Donation Forms

A field plugin to fetch Raisely donation data and embed forms in your Craft CMS content.

Installation

This plugin requires Craft CMS 4.4.15 or later, and PHP 8.0.2 or later.

  1. To install, visit the plugin store from your Craft project, or using

  2. In the Control Panel, go to SettingsPlugins and click the “Install” button for Raisely Donation Forms, or run:

Usage

Field

  1. Add your Raisely API key in your CMS settings or create a create a config/raisely-donation-forms.php file with the following:

Your API key can be found by going to Settings > API & Webhooks in a campaigns side navigation. Any campaign API key can be used for your whole Raisely account

  1. Create a Raisely Donation Form field and select a form

Use the Refresh Campaigns button if the campaigns listed in the dropdown don't match those in your Raisely account

  1. Embed a form in your template using {{ entry.yourField.renderForm() }}

By default Raisely forms are rendered with an initial height of 800px which can lead to unwanted layout shift. To fix this you can pass a height variable {{ entry.yourField.renderForm(400) }}.

Use {{ entry.yourField.isEmpty() }} to check if the field is populated

or fetch campaign donations with {{ entry.yourField.getDonations() }}, this will return an array that you can loop through to display donations with something like

The amount of donations fetched is limited to 10 by default, but you can change this with a donationLimit setting in your config/raisely-donation-forms.php file, or by passing a limit variable entry.yourField.getDonations(5) - there is currently no pagination so results will be limited to the first page of results from the API.

The sort order of donations fetched can be changed using sort and order variables, for example entry.yourField.getDonations(10, 'date', 'asc') would return the 10 oldest donations, or entry.yourField.getDonations(5, 'amount', 'desc') would return the 5 top donations.

A reference of available data can be found in the Raisely API docs. NOTE: Private data is not fetched

Variables

If you prefer, the renderForm() and getDonations() variables can be used directly in your template using a Raisely campaign path without the need for a field, and without an API key if you aren't using getDonations().

Both functions work the same as their field counterparts.

Caching

Forms and donations are cached for 1 week and 6 hours respectively to avoid making too many API calls, and for a better user experience - without donation caching, a call would be made every time the template is loaded leading to longer page load times.

If you need to adjust cache times you can use the following settings in your config/raisely-donation-forms.php file

You can clear the cache in the Craft Control Panel by going to UtilitiesClear Caches, or using

and


All versions of craft-raisely-donation-forms with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.2
craftcms/cms Version ^4.4.15
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 mango-chutney/craft-raisely-donation-forms contains the following files

Loading the files please wait ....