You can change the view to your custom file. Example /components/OssnProfile/plugins/default/pages/profile to your custom file path. (This is similar to page:override and page:load but we supply fully path of view here)
Example is https://www.opensource-socialnetwork.org/component/view/3657/optimize-pre-loader
~~~
<?php
function remove_preloader_init() {
ossn_add_hook('halt', "view:themes/goblue/plugins/default/js/goblue", 'remove_preloader_js');
ossn_add_hook('halt', "view:themes/Awesome/plugins/default/js/goblue", 'remove_preloader_awesome_js');
}
function remove_preloader_awesome_js(){
return ossn_plugin_view('fastpreloader/awesome/js');
}
function remove_preloader_js(){
return ossn_plugin_view('fastpreloader/js');
}
ossn_register_callback('ossn', 'init', 'remove_preloader_init');
~~~