View Issue Details

IDProjectCategoryView StatusLast Update
0013236mantisbtplug-inspublic2014-12-08 00:33
Reporterray81 Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.6 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0013236: add event to print attachment
Description

I'm currently developing an attachment plugin, so that attachments can have an added view (like a player for music files).
I need an event to add things after the line of an attachment.

For example (player on next line):
[] test.mp3 [^] (121,589 bytes) 12-08-11, 12:02 [Delete]
[PLAYER]

or (added link on the same line):
[] test.pdf [^] (131,563 bytes) 12-08-11, 12:02 [Delete] [View Content] [ADDED_LINK]

Could a PRINT_ATTACHMENT event be added?

Additional Information

I added the event_signal at the end of the else of if ( !$t_attachment['exists'] ) of the function print_bug_attachments_list in /core/print_api.php. Currently on line 1769

Wow that sounds difficult. Here's an example:
function print_bug_attachments_list( $p_bug_id ) {
...
foreach ( $t_attachments as $t_attachment ) {
...
if ( !$t_attachment['exists'] ) {
...
} else {
...
#SIGNAL ADDED HERE
event_signal('PRINT_ATTACHMENT', array($t_attachment));
}
...
}
...
}

TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

rombert

rombert

2011-08-18 10:32

reporter   ~0029511

Thank you for the report and suggested fix. Would you consider submitting pull requests for this functionality? This would greatly increase the speed of including these changes in MantisBT.

Ideally you would submit pull requests for both the master and master-1.2.x branches at https://github.com/mantisbt/mantisbt .

ray81

ray81

2011-09-16 05:26

reporter   ~0029745

I haven't done anything in GIT yet, but if i will, i'll add a patch.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036236

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 3eb0430b

2012-09-21 03:27

dregad


Details Diff
Fix 0013236: Added event 'EVENT_VIEW_BUG_ATTACHMENT'

Allows printing HTML code after each attachment.

Moved the event definition with other bug-related events.
Affected Issues
0013236
mod - core/events_inc.php Diff File
mod - core/print_api.php Diff File
mod - docbook/Developers_Guide/en-US/Events_Reference_Output.xml Diff File