Opened 15 years ago

Last modified 11 years ago

#4029 closed enhancement

Patches to enhance TracPastePlugin — at Initial Version

Reported by: Michael Renzmann Owned by: mitsuhiko
Priority: normal Component: TracPastePlugin
Severity: normal Keywords:
Cc: dclark@…, Ryan J Ollos Trac Release: 0.11

Description

Attached is a series of patches that improve TracPastePlugin and/or implement new features.

01_recent_pastes_configurable.patch
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).
02_recent_pastes_rss_feed.patch
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).
03_other_formats_configurable.patch
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.
04_other_formats_filter.patch
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.
05_use_same_formatter_in_reply.patch
When replying to a paste, the formatter that was used in the paste that is replied to will be pre-selected for the reply.
06_show_metadata.patch
Show additional information (Content-Type and formatter/highlighter) when viewing a paste.
07_rename_permission.patch
Rename permission PASTEBIN_USE to PASTEBIN_VIEW. Introduce new permission PASTEBIN_ADMIN.
08_finegrained_permission.patch
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.
09_delete_pastes.patch
Introduce new permission PASTEBIN_DELETE; users with this permission are allowed to delete pastes.
10_turing_test.patch
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 (10)

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Attachment: 06_show_metadata.patch added

Changed 15 years ago by Michael Renzmann

Attachment: 07_rename_permission.patch added

Changed 15 years ago by Michael Renzmann

Changed 15 years ago by Michael Renzmann

Attachment: 09_delete_pastes.patch added

Changed 15 years ago by Michael Renzmann

Attachment: 10_turing_test.patch added
Note: See TracTickets for help on using tickets.