2017 © Pedro Peláez
 

package charity-package

UK Charity Package

image

ddauria1/charity-package

UK Charity Package

  • Friday, March 23, 2018
  • by ddauria1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

UK Charity Package

PHP package that allows to create a tailored made charity widget. The widget will contains the following possibilities:, (*1)

  • Pick a cause between: . Save the Children . Crisis.co.uk . Age UK . or Add your own one, (*2)

  • Personalize: Colors, Format Widget, Position,Font-family and Size, (*3)

  • Allow to make payment through PayPal Fundraiser, (*4)

Usage

You can look at tests/index.php file to see an usage example., (*5)

There are two types of widget format:, (*6)

  • Aside
  • Footer

First Step install the package by:, (*7)

composer require ddauria1/charity-package

Start Using it

$charity = new Charity\Base();

This will create a charity object using the Default Cause 0 - "Save the Children" If you wish to change it with something else you will need to pass the CauseID in the constructor as shown:, (*8)

$charity = new Charity\Base(1); // 1 - Age UK

if you also don't want to display charity logo, (*9)

$charity = new Charity\Base(0,false);

In case you don't want add charity website link on the title, (*10)

$charity = new Charity\Base(0,false,false);

to display the widget just execute this:, (*11)

$charity->display();

You can change the layout of the Widget by choosing one of the option:, (*12)

$charity->changeViewToAside();

$charity->changeViewToFooter();

To change the widget style modify the following constants in Base.php: POS_ASIDE_CSS or/and POS_FOOTER_CSS, (*13)

To add another cause, change the array, $this->availableCauses, in Base.php constructor., (*14)

The Versions

23/03 2018

dev-master

9999999-dev

UK Charity Package

  Sources   Download

MIT

The Requires

  • php ^7.1.3