Download the PHP package csabourin/meteocraft without Composer

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

Ottawa Weather Display Component

Simple, accessible weather display component for Ottawa, Ontario, using data from Environment and Climate Change Canada (ECCC). Built for Craft CMS 5 with PHP in Twig support.

Features

Requirements

Installation

1. Copy Files to Your Craft Project

Copy the files from this repository to your Craft installation:

2. Register Translations in Your Module

Add the translation category to your module's config/app.php:

Or if you prefer, add it directly in your module's init() method:

3. Import SCSS

Add to your main stylesheet:

Customize Colors

Define variables before importing:

Usage

Basic Usage

Include the template anywhere in your Twig files:

With Options

Example Integrations

In a Layout

In a Page Template

File Structure

Configuration

Cache Duration

Edit the PHP block in templates/_weather/display.twig:

Customizing Display

The template is fully editable. Modify templates/_weather/display.twig to:

Translations

Edit the translation files to customize any text:

Data Source

Accessibility

This component is WCAG 2.1 Level AA compliant:

See ACCESSIBILITY.md for details.

Troubleshooting

Template shows "Unable to load weather data"

  1. Verify server has internet connectivity
  2. Check cURL is enabled: php -m | grep curl
  3. Ensure PHP in Twig is enabled in your Craft config
  4. Check logs: storage/logs/web.log
  5. Clear cache: ./craft clear-caches/all

Translations not working

  1. Verify translations are registered in config/app.php or your module
  2. Check file paths match your module structure
  3. Clear cache: ./craft clear-caches/all
  4. Verify translation category is 'weather' (not 'meteocraft')

Styling not applied

  1. Verify SCSS file is imported in your main stylesheet
  2. Check file path is correct
  3. Rebuild your CSS: npm run build or your build command
  4. Clear browser cache

License

MIT License - see LICENSE file

Credits

Support

For issues or questions: GitHub Repository


Alternative: Using with Your Existing Controller

If you prefer to use your existing controller's actionFetchJson() method instead of the embedded PHP, you can modify the template to make an AJAX call:

However, note that your current controller only allows services2.arcgis.com in the allowlist, so you'd need to add api.weather.gc.ca to use it for weather data.


All versions of meteocraft with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
craftcms/cms Version ^4.0.0|^5.0.0
ext-curl Version *
ext-json Version *
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 csabourin/meteocraft contains the following files

Loading the files please wait ...