Page 1 of 1

How to use Custom Functions?

Posted: 05 Jul 2005, 15:45
by logan
Hi,
I would like to adapt Mantis for my use, so I want to change the code!
i did not really understand how the custom functions work:
for example I want to change the display of the array in the file manage_user_page.php
i need to override print_manage_user_sort_link(...)
Is it right that I have to put :
helper_call_custom_function( 'print_manage_user_sort_link', array( 'manage_user_page.php', lang_get( 'username' ), 'username', $c_dir, $c_sort, $c_hide ))
and then override the function in custom_functions_inc.php?

Thanks for your help

Posted: 05 Jul 2005, 19:10
by thraxisp

Posted: 06 Jul 2005, 07:17
by logan
Thanks for this answer but I don't understand what it is written in the manual!

What I said, is it right or false?

Posted: 10 Jul 2005, 18:12
by thraxisp
False.

Custom functions are specific hooks placed in the code, not a generic way to change any function. In your case, you would need to edit the print_manage_user_sort_link() function directly.

Please post a bug at http://bugs.mantisbt.org with your changes and the reason for them, and we'll look at incorporating it in the regular release.

logan

Posted: 12 Jul 2005, 12:10
by logan
Thanks, so now I have to add a new paramater in the function:
custom_field_set_sequence( $f_field_id, $f_project_id, $f_sequence );
In this case, Do I have to do a custom functions?
Thanks in advance