Patches to enhance TracPastePlugin
|Reported by:||otaku42||Owned by:||otaku42|
|Cc:||dclark@…, rjollos||Trac Release:||0.11|
Description (last modified by otaku42)
Attached is a series of patches that improve TracPastePlugin and/or implement new features.
- Default number of recent pastes that get displayed on the "main" pastebin page can be configured in trac.ini, section [pastebin], option default_recent (default: 10).
- Allow to fetch list of recent pastes as RSS feed. This allows for example to let a Supybot announce new pastes in IRC channels. Similar to the timeline RSS feed, the number of items that get displayed in the feed can be adjusted using the max query parameter. The maximum amount of items that may be requested this way can be limited in trac.ini, section [pastebin], option max_recent (default: 30).
- The Download in other formats functionality can be disabled in trac.ini, section [pastebin], option enable_other_formats (default: enabled). For example, this might help a little to prevent search engine spiders from getting HTML-ized spam pastes and using them to boost page rank of spamvertized sites.
- Allows finer-grained control over which pastes may be downloaded in other formats. Download is disabled if the MIME-type of a paste matches one of the filters defined in trac.ini, section [pastebin], option filter_other_formats. * may be used as wildcard.
- When replying to a paste, the formatter that was used in the paste that is replied to will be pre-selected for the reply.
- Show additional information (Content-Type and formatter/highlighter) when viewing a paste.
- Rename permission PASTEBIN_USE to PASTEBIN_VIEW. Introduce new permission PASTEBIN_ADMIN.
- Implement fine-grained permissions for creating new pastes (PASTEBIN_CREATE) and replying to existing ones (PASTEBIN_REPLY). PASTEBIN_CREATE and PASTEBIN_REPLY both include the PASTEBIN_VIEW permission.
- Introduce new permission PASTEBIN_DELETE; users with this permission are allowed to delete pastes.
- Implements a simple turing test that might help against spambots. A new field is added to the form that's used for creating pastes. Pastes will not be accepted if anything is filled into this field; the idea behind it is that many spambots will fill each field of a form, and thus can be identified this way. The field is hidden with CSS, and for cases where CSS is not supported a clear warning is displayed along with the field. This feature can be disabled in trac.ini, section [pastebin], option turing_test. It's enabled by default.
I have some more patches in my queue which I will add to this ticket over time. Comments and suggestions welcome.
Change History (24)
comment:5 in reply to: ↑ description Changed 5 years ago by otaku42
- Owner changed from mitsuhiko to otaku42