Changes between Version 14 and Version 15 of ScreenshotsPlugin


Ignore:
Timestamp:
Jan 24, 2008 8:34:11 AM (7 years ago)
Author:
Blackhex
Comment:

Updated according to new implementation.

Legend:

Unmodified
Added
Removed
Modified
  • ScreenshotsPlugin

    v14 v15  
    33== Description == 
    44 
    5 Provides components and versions related screenshots storage and viewing system for Trac. With SCREENSHOTS_ADMIN permission you can append or delete screenshots to appropriate component and version defined with trac-admin command-line tool or via WebAdminPlugin. With SCREENSHOTS_VIEW premission main navigation bar button for ScreenshotsPlugin is displayed and provides link to screenshots gallery view. 
     5Provides screenshots upload and viewing subsystem for Trac. Uploaded screenshots can be described with short name, longer description and custom tags (if TracTags plugin is installed) and assigned to any number of components and versions registered in Trac. Screenshot uploads can be listed in timeline and screenshots can be referenced or embender in wiki pages. Plugin internally defines few interfaces for further extension. 
    66 
    77== Bugs/Feature Requests ==  
     
    2121You can check out ScreenshotsPlugin from [http://trac-hacks.org/svn/screenshotsplugin here] using Subversion, or [source:screenshotsplugin browse the source] with Trac. 
    2222 
     23== Dependencies == 
     24 
     25You need to have [http://www.pythonware.com/products/pil/ PIL] library installed to get plugin working. Plugin optionally depends on TracTags plugin for screenshot tagging support. 
     26 
    2327== Installation == 
    2428 
    25 Install plugin's egg and set path and title variable in trac.ini configuration file. component and version config variables can set default component and version viewed when Screenshots main navigation menu button clicked. show_name config variable could be used to disable or enable display of screenshot name and author at the top. Default value is true. 
     29Install plugin's egg and set variables in trac.ini configuration file according to your needs. Following list shows all of them with their default values: 
    2630 
    2731{{{ 
    2832[screenshots] 
    2933title = Screenshots 
    30 path = <path_to_screenshots> 
    31 component = <component_name> 
    32 version = <version_name> 
    33 show_name = true/false 
     34path = /var/lib/trac/screenshots 
     35ext = jpg png 
     36formats = raw html jpg png 
     37default_format = html 
     38default_components = 
     39default_versions = 
    3440}}} 
     41 
     42Value of {{{title}}} variable sets caption of item in Trac's main navigation menu, {{{path}}} is location of directory where plugin should store uploaded and generated images and {{{ext}}} is list of allowed file extension which can be uploaded. Using {{{formats}}} option you can set in wich formats can be images downloaded and {{{default_format}}} is format which will be returned if no format is specified in request. It must be one of formats supported by your PIL library installation. There are two meta formats: {{{raw}}} denotes original format of uploaded image and {{{html}}} is image embended in HTML page. {{{default_components}}} and {{{default_versions}}} options sets default values for component and version filter. Set these variables according your Trac setup, otherwise, you would't see any screenshots with default filter. 
    3543 
    3644If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines: 
     
    3846{{{ 
    3947[components] 
    40 tracscreenshots.init.screenshotsinit = enabled 
    41 tracscreenshots.core.screenshotscore = enabled 
    42 tracscreenshots.api.screenshotsapi = enabled 
    43 tracscreenshots.wiki.screenshotswiki = enabled 
    44 tracscreenshots.tags.screenshotstags = enabled 
     48TracScreenshots.init.ScreenshotsInit = enabled 
     49TracScreenshots.core.ScreenshotsCore = enabled 
     50TracScreenshots.api.ScreenshotsApi = enabled 
     51TracScreenshots.wiki.ScreenshotsWiki = enabled 
     52TracScreenshots.timeline.ScreenshotsTimeline = enabled # For 0.11 branch. 
     53TracScreenshots.tags.ScreenshotsTags = enabled 
    4554}}} 
    4655 
     
    5059}}} 
    5160 
    52 The next step is to upgrade your environment: 
     61Create directory you have specified with {{{path}}} config option and make sure it is accessible by Trac server. The next step is to upgrade your environment: 
    5362 
    5463{{{ 
     
    5665}}} 
    5766 
    58 == Important == 
    5967 
    60 For running this plugin you have to have [http://www.imagemagick.org ImageMagick] tools and Python Image Language (PIL) installed on your system. 
     68== Permissions == 
     69 
     70Screenshots plugin defines three permissions. With SCREENSHOTS_VIEW permission you can browse screenshots and see screenshot uploads in timeline. SCREENSHOTS_ADMIN adds you rights to uplad screenshots and SCREENSHOTS_FILTER allows you to modify component and version filter. You can add these permissions by typing following commands from commandline or you can use WebAdminPlugin to do it for you: 
     71 
     72{{{ 
     73# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_VIEW 
     74# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_ADMIN 
     75# trac-admin <path_to_environment> permission add <user> SCREENSHOTS_FILTER 
     76}}} 
    6177 
    6278== Macros == 
    6379 
    64 There are macro ![screenshot:<screenshot_id>] for screenshots referencing. Expample of usage is here: 
     80There are a macro ![screenshot:<screenshot_id>] for screenshots referencing and embending. Expamples of usage is here: 
    6581 
    6682{{{ 
    67 [screenshot:1] 
    68 [screenshot:1 screenshot] 
     83See fig [screenshot:1]. 
     84Take a look at [screenshot:1 screenshot]. 
     85Screenshot of main window is: [screenshot:1,width=640,height=480]. 
    6986}}} 
    7087 
    71 == Note == 
     88Possible attributes are: 
    7289 
    73 There is wrong display of plugin's content in Internet Explorer because of missing implementation of "display: table-cell" CSS style so please use standard browsers or tell me how to fix it :-). 
    74  
    75 == Screenshot == 
    76  
    77 If you properly install ScreenshotsPlugin you could see something like this: 
    78  
    79 [[Image(tracscreenshots-0.1.jpg)]] 
     90 * {{{align}}} - Specifies image alignment in wiki page. 
     91 * {{{border}}} - Sets image border of specified size. 
     92 * {{{width}}} - Width of image, embeds image if specified. Set to 0 if you want original image width. 
     93 * {{{height}}} - Height of image, embeds image if specified. Set to 0 if you want original image height. 
     94 * {{{alt}}} - Alternative description of image. 
     95 * {{{title}}} - Title of image. 
     96 * {{{longdesc}}} - Detailed description of image. 
     97 * {{{class}}} - Class of image for CSS styling. 
     98 * {{{id}}} - ID of image for CSS styling. 
     99 * {{{usemap}}} - Image map for clickable images. 
     100 * {{{format}}} - Format of returned image or screenshot behind link. 
    80101 
    81102== Feedback ==