Im trying to build a small block that shows an image as icon just before the title.
I want to use the filemanager to upload the image.
Im using this code in my edit_form.php file:
$maxbytes = 12222;
$mform->addElement('filemanager', 'config_attachments', get_string('attachment', 'block_webbog'), null,
array('subdirs' => 0, 'maxbytes' => $maxbytes, 'maxfiles' => 50,
'accepted_types' => array('.png', '.jpg'), 'return_types'=> FILE_INTERNAL | FILE_EXTERNAL));
in my block_name.php file i have made a print_r on the $this->config and it shows
stdClass Object ( [title] => header [text] => Array ( [text] => text [format] => 1 ) [attachments] => 612502805 )
So i guess this is my image encoded ?
[attachments] => 612502805
But how do i show / use the image in the block content?
Its suppose to be used as a icon for the block along with the title - like this http://screencast.com/t/Ewg0mURG5PMw in navigation.
I have tried reading the file API
Please help