Changes between Version 6 and Version 7 of AddStaticResourcesPlugin


Ignore:
Timestamp:
Dec 23, 2016, 8:50:08 AM (4 years ago)
Author:
figaro
Comment:

Further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • AddStaticResourcesPlugin

    v6 v7  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Add Static Resources Plugin
     3= Add Static Resources to wiki pages
    44
    55== Description
    66
    7 A plugin that maps static resources into urls of your choice. Thus if you wish to add a stylesheet or a javascript to an existing trac page, you can specify in the trac ini a regex that matches the urls of the pages and insert the resources. Just add your static resources to the plugins htdocs folder and install then fill out the trac.ini configuration values to enable your static resources on each page you wish. '''Regular expressions are case insensitive by default'''.
     7A plugin that maps static resources into urls of your choice. Thus if you wish to add a stylesheet or a javascript to an existing Trac page, you can specify in the `trac.ini` file a regular expression that matches the urls of the pages and insert the resources. Just add your static resources to the plugins htdocs folder and install, then fill out the `trac.ini` configuration values to enable your static resources on each page you wish. '''Regular expressions are case insensitive by default'''.
    88
    99{{{#!ini
     
    1212}}}
    1313
     14For example, this will cause the helloworld alert message to appear on the ticket and newticket pages:
     15
     16{{{#!ini
     17[static_resources]
     18/(new)?ticket = helloworld.js
     19}}}
     20
    1421There is also a patch listed below to provide case sensitivity.
    1522
    16 '''Note''': This plugin is trying to accomplish much of what TracTweakUiPlugin is, however with the following additional goals:
    17  * Simple, I want to simply map a url to a javascript/stylesheet that should be included.
    18  * Affect all tracs at once
    19   * I have many tracs so specifying this once in the shared conf file is much nicer than once in each database
    20   * Deployment of files should be simple and preferably in the egg we are already installing, rather than in a static location I need to keep track of and separately manage for each trac.
     23'''Note''': This plugin shares much functionality of TracTweakUiPlugin, however with the following additional goals:
     24 * I want to simply map a url to a javascript or stylesheet that should be included.
     25 * Affect all Tracs at once:
     26  * I have many Tracs, so specifying this once in the shared conf file is much nicer than once in each database.
     27  * Deployment of files should be simple and preferably in the egg we are already installing, rather than in a static location I need to keep track of and separately manage for each Trac.
    2128
    2229== Bugs/Feature Requests
     
    2734If you have any issues, create a
    2835[/newticket?component=AddStaticResourcesPlugin new ticket].
    29 
    30 '''Note:''' The Trac 0.11 branch seems to work fine in Trac 0.12. If you experience any issues, then please [/newticket?component=AddStaticResourcesPlugin report them].
    3136
    3237[[TicketQuery(component=AddStaticResourcesPlugin&group=type,format=progress)]]
     
    4550
    4651 1. Insert your static files into the 'addstaticresourcesplugin/htdocs' folder of the plugin before installation.
    47  1. Install the plugin either for a single project or globally. See the details on how to install a trac plugin at [trac:TracPlugins].
    48  1. Enable the plugin. Add "addstaticresourcesplugin.* = enabled" to your `trac.ini` file in the [components] subheading. Alternatively, this can be enabled in the Web Admin section of the website as well.
     52 1. Install the plugin either for a single project or globally. See the details on how to install a Trac plugin at [trac:TracPlugins].
     53 1. Enable the plugin in your `trac.ini` file:
     54{{{#!ini
     55[components]
     56addstaticresourcesplugin.* = enabled
     57}}}
     58 Alternatively, this can be enabled in the Web Admin section of the website as well.
    4959 1. Reload/restart your HTTPD / other webserver / Tracd.
    50 
    51 == Example
    52 
    53 This will cause the helloworld alert message to appear on the ticket and newticket pages.
    54 {{{#!ini
    55 [static_resources]
    56 /(new)?ticket = helloworld.js
    57 }}}
    5860
    5961== Recent Changes