PHP code example of pessek / pessek_attachments

1. Go to this page and download the library: Download pessek/pessek_attachments library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pessek / pessek_attachments example snippets


elgg_register_plugin_hook_handler('allow_attachments', 'object:my_subtype', '\Elgg\Values::getTrue');

echo elgg_view('input/attachments');

echo elgg_view('input/attachments', [
	'name' => 'comment_attachments',
		]);

echo elgg_view('input/attachments', [
		'name' => 'message_attachments',
	]);

hypeapps_attach_uploaded_files($entity, 'upload', [
   'access_id' => $entity->access_id, // change the access level of uploaded files
]);

hypeapps_attach($entity, $attachment);