Forums | Mahara Community

Developers /
Adding a button to the files section in MyGroups


Mark  Melia's profile picture
Posts: 8

08 November 2010, 6:10 AM

Hi,

I am trying to add a new button to the files section of MyGroups. I have successfully added a button. When I press the button I am not sure how the pieform is form is processed.  I can see that when I press the update button with the name "files_filebrowser_update[118]" the function pieform_element_filebrowser_update is called in artefact/file/form/elements/filebrowser.php. My new button has a name files_filebrowser_change[118] and I have included a function pieform_element_filebrowser_change in filebrowser.php but the new function is never called.

Does anyone know how to do this? Is there any documentation?

Thanks,

Mark

Stacey Walker's profile picture
Posts: 39

08 November 2010, 9:23 AM

Hi Mark,

The connection you might be missing is in pieform_element_filebrowser_doupdate(...) in artefact/file/form/elements/filebrowser.php. Take a look at the way that the pieform_element_filebrowser_delete(...) is called there and that might help.

There is some documentation on Pieforms here http://pieforms.sourceforge.net/doc/html/user/usage.html, but unfortunately I can't find anything on the filebrowser code specifically as it is one of the elements that has been developed within the Mahara project and not Pieforms itself.

However, because it is still a Pieform object, a lot of the functions within filebrowser.php are called in some way or another from the Pieform class in lib/pieforms/pieform.php and there is a bit more documentation to the functions there that might help with understanding how the filebrowser works a little easier. A bit of poking around with most filebrowser functions should take you somewhere back in that vicinity eventually. :)

Stacey

2 results