Technical question about rtMedia architecture


#1

How, exactly, is rtMedia adding fields / form from app/templates/upload/uploader.php ?
I’m seeing the form in upload/uploader.php but am not seeing how it is loaded into the form.

I’ve looked at index.php and noticed spl_autoload_register() but not seeing where that function was defined.

looked at $rtmedia = new RTMedia(); and see that rtMedia is an OOP plugin (yay for OOP btw, good choice) - looked at /app/main/RTMedia.php and still am not seeing where or how this plugin is adding the template fields into activity form.

Reason I ask, and this is critical, is because I need to add some custom fields into the activity form but I do not want to create an unwanted conflict with rtMedia or bp.

Please advise.


#2

Hi @Matt McFarland,

rtMedia uses the bp_after_activity_post_form buddpress hook to insert the fields into the buddypress activity form, you can find it in file controllers/activity/RTMediaBuddyPressActivity.php file.

The uploader template is located at controllers/upload/RTMediaUploadView.php file. And RTMediaUploadView.php file includes the uploader.php.


#3