function _mee_load_ressources in Scald: Media Management made easy 6
1 call to _mee_load_ressources()
- mee_field in mee/
mee.module - Implementation of hook_field().
File
- mee/
mee.module, line 610 - Defines a special textarea, with drag and drop media driven by Scald and dnd.module when rich text editing is enabled on the textarea via the WYSIWYG API.
Code
function _mee_load_ressources($node, $field, &$item) {
$results = db_query("\n SELECT atom_sid, weight\n FROM {mee_ressources}\n WHERE content_nid=%d AND field='%s'", array(
':nid' => $node->nid,
':field' => $field['field_name'],
));
$item['ressource_manager'] = array();
while ($r = db_fetch_object($results)) {
$item['ressource_manager'][$r->atom_sid] = array(
'weight' => $r->weight,
);
}
$item['ressource_manager'][0] = array(
'weight' => 0,
);
}