wiki:ImageTracPlugin

Version 4 (modified by k0s, 5 years ago) (diff)

--

include a displayed image with a ticket upon ticket creation

Description

The ImageTracPlugin allows uploading of images to tickets upon ticket creation. The image is displayed beside the ticket using the TicketSidebarProviderPlugin. This is useful when one wants to associate images with tickets. Additional work, such as displaying a thumbnail next to query results, may be done as time permits.

Included below is the README:

= ImageTracPlugin =
The ImageTracPlugin allows images to be attached to Trac tickets and displayed.
== Components ==
Several
[http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture components]
are included in the ImageTrac plugin:
 * [#ImageTrac ImageTrac]
 * [#DefaultTicketImage DefaultTicketImage]
 * [#Galleria Galleria]
 * [#ImageFormFilter ImageFormFilter]
 * [#SidebarImage SidebarImage]
 * [#TicketImageHandler TicketImageHandler]
=== !ImageTrac ===
!ImageTrac is the core of the ImageTracPlugin.  This plugin processes
 uploaded attachments and, if they are images, will create images of
 the appropriate size as dictated by the `[ticket-image]` section of
 the [http://trac.edgewall.org/wiki/TracIni trac.ini] configuration.
Two sizes are included by default, thumbnails and a default size, but
an arbitrary number of sizes can be used.  Configuration is given for
the default case as follows
{{{
[ticket-image]
size.thumbnail = 32x32
size.default = 488x
}}}
This specifies a thumbnail of 32 by 32 pixels and a default size of
488 pixels in width with a height taken from the aspect ratio of the
uploaded image.  Currently, images are not scaled up.  Scaling is done
with the
[http://www.pythonware.com/products/pil/ Python Imaging Library] and a
front-end function packaged in
[http://pypi.python.org/pypi/cropresize cropresize].
!ImageTrac can also enforce image uploading on ticket creation and
 includes the ticket images in the data passed to the `ticket.html`
 template.
=== !DefaultTicketImage ===
The !DefaultTicketImage component allows the setting of a default
image for a ticket.  It maintains a database table, `default_image`,
which stores which image is the default
=== Galleria ===
The Galleria component adds the
[http://devkick.com/lab/galleria/ galleria] javascript image gallery
and accompanying CSS to allow the display of images in a gallery
format.
=== !ImageFormFilter ===
The !ImageFormFilter component adds a form on the ticket page that
allows uploading of an image on ticket creation or ticket editing.
Images so uploaded should become the default image (NOTE: there is
currently a bug whereby this is not the case).
=== !SidebarImage ===
The !SidebarImage component displays the images in an unordered list
in the ticket sidebar using the
[http://trac-hacks.org/wiki/TicketSidebarProviderPlugin TicketSidebarProviderPlugin].
=== !TicketImageHandler ===
The !TicketImageHandler component serves the images at
`/ticket/<ticket id>/image/<size>`.  For example, the thumbnail of
ticket 67 would be displayed at `/ticket/67/image/thumbnail`.
== Usage ==
It is recommended that you enable all of the components of the
ImageTracPlugin.

Bugs/Feature Requests

Existing bugs and feature requests for ImageTracPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out ImageTracPlugin from here using Subversion, or browse the source with Trac.

Example

See screenshot for example

screenshot of the ImageTracPlugin

Recent Changes

[13934] by rjollos on 2014-05-21 00:57:31
Fixed checking for table existence in Trac 1.0 and later. Refs #11754.
[13933] by rjollos on 2014-05-21 00:37:24
Fixed indentation and removed unused imports.
[12984] by rjollos on 2013-04-19 18:30:50
Refs #7262: Point setup,py link to TracSqlHelperScript 0.11 directory rather than anyrelease directory.

Author/Contributors

Originally developed at The Open Planning Project

Author: k0s
Contributors:

Attachments (1)

Download all attachments as: .zip