This is an old revision of the document!


Tutorial: Copyrights plugin

In this tutorial you will learn more about the basics of plugin development for Piwigo. This tutorial is a follow up on Tutorial: Hello World!. The entire plugin can be installed from the extension gallery under the name 'Copyrights'.

Introduction

First of all, download the source code of the Skeleton plugin. We will use that as basis for this plugin.

Outline

With this plugin we want to achieve the following:

  1. Somewhere we want to manage our copyrights.
  2. Somehow copyrights must be added to photos.
  3. Somehow the copyright must be displayed when visitors view a photo.

Therefore, we will write code for:

  1. An administration panel, where the admin can create and edit plugins
  2. An extension to the Batch manager (using events) so that copyrights can be added to photos.
  3. Another event-hook that will display the copyright when a photo is viewed.

The admin panel

Extending the Batch manager

The Batch manager comes with two modes, so we will have to write extensions to both.

Batch Mode

Single Mode

Showing the copyrights to visitors

 
Back to top
dev/extensions/plugin_tutorial2.1308315955.txt.gz · Last modified: 2011/06/17 13:05 by j.commelin
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact