Hi all.
I'm working to develop an extension to the attachment module: I have to display some extra information about the uploaded file, namely what type of file it is, with which player or program you can open it, and who uploaded it.
I managed to add these information to the MySQL table (which I called attachment_ext).
The problem is that I cannot retrieve those data: it does not display those information.
Can anybody help me, please? I don't have a clue how to do that.
If it could help, I'll paste here my code for the module (which is basically just an extension of the original attachment module):
<?php
// $Id: attachment.module,v 1.15.2.2 2006/09/28 09:53:13 robertDouglass Exp $
define(ATTACHMENT_EXTENSION_WHITELIST, variable_get('attachment_text_rename_whitelist', 'jpg jpeg gif png tiff txt html doc xls pdf ppt pps odt mp3 ogg wav wmv mpg'));
function attachment_form_alter($form_id, &$form) {
$type = $form['type']['#value'];
switch ($form_id) {
// node edit form
case $type .'_node_form':
if (user_access('add attachments') && (variable_get('attachment_node_'. $type, 0) == 1)) {
$node = $form['#node'];
if (!isset($node->attachments)) {
$ret = attachment_load($node);
$node->attachments = $ret['attachments'];
}