Download the PHP package thelia/diaporamas-module without Composer

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

Diaporamas module v0.1.6

Author: Romain Ducher

  1. Usage

This module enables you to insert diaporamas into descriptions. It currently works for products, categories, folders, contents and brands.

Diaporamas are identified with short codes. Diaporama shortcodes are strings containing letters (lowercase and uppercase), numbers, underscores and hyphens. A shortcode has to contain between 1 and 32 characters.

To insert a diaporama into a description, insert the "[£ shortcode £]" tag, where shortcode is your diaporama shortcode. For example, writing "[£ foo £]" will insert in the description the diaporama whose shortcode is "foo". Do not forget spaces around the shortcode or the diaporama tag will not be interpreted as a diaporama in your description.

To manage your diaporamas, log in into Thelia's back office and go to Tools > Diaporamas in Thelia's menu. There is a list summing up existing diaporamas. For each diaporama, the ID in the database, the title and the shortcode are displayed. In an upcoming release, you will be able to see the diaporama by clicking on its shortcode or by clicking on the opened eye in diaporama actions.

If you want to create diaporamas, click on the '+' sign in the top-right corener of the Diaporama list. Write its title in the lang precised by the flag in the title field and then write its shortcode in the corresponding field. If the shortcode has been already used by an existing diaporama, the diaporama creation will fail. It will create an empty diaporama, without images.

To edit a diaporama, go to the diaporamas list and click on its database ID, its title or the edit button in the diaporama actions. Here you can manage your diaporama just like you want. There are two tabs for this:

To delete diaporamas, go to the diaporama list and click on the Trash Icon of the diaporama you want to delete.

The module uses the SmartyFilter module to change shortcodes into diaporamas. For this, the Smarty filter whose code is diaporamas.filter.shortcodes has to be activated. The filter is activated automatically while activating the Diaporamas module.

  1. API

The module provides some entities for using Diaporamas in Thelia.

2.1. Loops

The module provides two loops.

2.1.1. Diaporama

It deals with diaporamas in general, with their general information.

Inputs:

Argument Description
id The diaporama IDs in the database, separated by commas
title The diaporama title
shortcode The diaporama shortcode
order How to order diaporamas. Values can be id, id-reverse (order by id), title, title-reverse (order by title), or shortcode and shortcode-reverse (order by shortcode).

Outputs:

Variable Description
$ID Diaporama ID
$TITLE Diaporama title
$SHORTCODE Diaporama shortcode

2.1.2. DiaporamaImage

This loops deals with diaporama images. It almost works like Thelia's Image Loop, whose reference is here. The difference is that you do not have to give a source argument. If you give it, it will be ignored. Do not provide category, product, folder, content or brand arguments too. You are dealing with diaporama images, not images for those sources. Those arguments will be ignored if you give them too. To give a diaporama ID to the loop, write it in the source_id argument.

2.2 Models

There are classes for diaporama and diaporama images.

Diaporamas are represented by the \Diaporamas\Model\Diaporama class. They contain general information for diaporamas, i.e. the database ID, the shortcode and the (i18n) title.

Diaporama images are represented by the \Diaporamas\Model\DiaporamaImage class. They work just like classic Thelia images whose source would be "diaporama".

2.3. Forms

There are forms to create, update and delete diaporamas and to update diaporama images. See the config.xml file to have information about them.

2.4. Services and events

Event to dispatch (namespace \Diaporamas\Event\) Event type (namespace \Diaporamas\Event\) Description
DiaporamaEvents::CREATE DiaporamaEvent Creating a diaporama
DiaporamaEvents::UPDATE DiaporamaEvent Updating a diaporama
DiaporamaEvents::DELETE DiaporamaEvent Deleting a diaporama
DiaporamaEvents::DIAPORAMA_HTML DiaporamaHtmlEvent While retrieving diaporama's HTML in the back office
DiaporamaEvents::DIAPORAMA_PARSE DiaporamaHtmlEvent While parsing descriptions to insert diaporama's HTML in the back office
DiaporamaEvents::DIAPORAMA_HTML_FRONT DiaporamaHtmlEvent Same as DiaporamaEvents::DIAPORAMA_HTML but for front office
DiaporamaEvents::DIAPORAMA_PARSE_FRONT DiaporamaHtmlEvent Same as DiaporamaEvents::DIAPORAMA_PARSE but for front office
DiaporamaImageEvents::CREATE DiaporamaImageEvent Creating a diaporama image
DiaporamaImageEvents::UPDATE DiaporamaImageEvent Updating a diaporama image
DiaporamaImageEvents::DELETE DiaporamaImageEvent Deleting a diaporama image
DiaporamaImageEvents::UPDATE_POSITION DiaporamaImageEvent Updating the image position in the diaporama
DiaporamaImageEvents::TOGGLE_VISIBILITY DiaporamaImageEvent Changing image visibility in the diaporama

2.5. Useful endpoints

Endpoint Description
GET /admin/module/Diaporamas/diaporama/{shortcode}/html HTML code for the [£ shortcode £] diaporama. For the back office.
GET /admin/module/Diaporamas/diaporama/{shortcode}/data Data for the [£ shortcode £] diaporama. It returns general data for the diaporama and information about diaporama images too. For the back office.
GET /diaporama/{shortcode}/html Same as "GET /admin/module/Diaporamas/diaporama/{shortcode}/html" but for the front office.
GET /diaporama/{shortcode}/data Same as "GET /admin/module/Diaporamas/diaporama/{shortcode}/data" but for the front office.
  1. Installation

The Diaporamas module requires the SmartyFilter module. It is used to replace shortcodes with their corresponding HTML codes. Install it and activate it before activating the Diaporamas module.

Install it as a Thelia module by downloading the zip archive and extracting it in or by uploading it with the backoffice (at ), or by requiring it with Composer:

Note: The module will create a thelia/local/media/images/diaporama folder to store diaporama images.


All versions of diaporamas-module with dependencies

PHP Build Version
Package Version
Requires thelia/installer Version ~1.1
thelia/smarty-filter-module Version ~1.3
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 thelia/diaporamas-module contains the following files

Loading the files please wait ....