Commit dce6a5a3 authored by Arthur Foelsche's avatar Arthur Foelsche

first commit of the new code into the media module

parent f829fce0
; $Id$
name = Media API Module
description = Provides core media api
package = "Media"
core = 6.x
<?php
// $Id$
// $Id$
/**
* @file
* This file handles the JS for Media Module functions
*/
$(document).ready( function () {
// get the list of form elements that need to be hidden
});
\ No newline at end of file
This diff is collapsed.
<?php
// $Id$
/**
* This function builds the form elements for the file formater based
* on the node type and field for settings and the file extension to get the formaters
* @param string $node_type
* the kind of node
* @param string $field
* the machine name of the field being operated on
* @param string $uri
* the uri to the item, or file://path if it is being uploaded
* @param string $file_extension
* the kind of file that will be operated on
*/
function media_ajax_formater_load($node_type, $field, $uri = 'file://', $file_extension) {
// we need to check the adminstrative settings for this
// node tyi
}
; $Id$
name = Media - Embeded Media Module
description = Provides integration with Embeded Media Field
package = "Media"
core = 6.x
<?php
// $Id$
/**
* @file
* This module provides integration with Emfield and RiMeg
*/
\ No newline at end of file
<?php
// $Id$
/**
* @info
* This file provides all the theming functions for the Media module
*/
/**
* Display the media form when the tabs module is not present
* @param array $tabs
* @return string
* formated html
*/
function theme_media_no_tabs_display ($tabs) {
return "it would be a good idea to install tabs, huh.";
}
/**
* controler function for displaying tabs
* @param array $tabs
* array of tab id => array(title => tab name, content => $content, attributes => array(attributes))
* @param array $container_attributes
* array of attributes for the tabs container
* @return string
*/
function theme_media_tabs_display($tabs, $container_attributes = null) {
// add the right JS file in
drupal_add_js(path_to_theme() .'/scripts/jquery.tabs.pack.js');
// we always add the tabs_container to the class definition
$container_attributes['class'] .= ' tabs_container';
// create the container
$html[] = '<div '. drupal_attributes($container_attributes) .'>';
// start building the list
$html[] = ' <ul>';
// build each tab
foreach ($tabs as $id => $tab) {
// make sure that there is data
if ($id && $tab) {
// by default we have a set of attributes
if (! $tab['attributes']) { $tab['attributes'] = array('class' => 'jquery_tabs'); }
$html[] = ' <li '. drupal_attributes($tab['attributes']) .'><a href="#'. $id .'"><span>'. $tab['title'] .'</span></a></li>';
// now put the content into an array
$contents[$id] = $tab['content'];
}
}
$html[] = ' </ul>';
// now build the content
foreach ($contents as $id => $content) {
// don't build tabs we don't have content for
if ($tabs[$id]) {
$html[] = ' <div id="'. $id .'"><div class="rounded">';
$html[] = ' '. $content;
// add a clear to make sure content pushes tab all the way open
$html[] = '<br class="clear" />';
$html[] = ' </div></div><!-- /'. $id .' -->';
}
}
// now close the main div
$html[] = '</div><!-- /tabs_container -->';
return implode("\n", $html);
}
\ No newline at end of file
; $Id$
name = Media Drupal Upload Module
description = Provides integration with the Drupal Upload Module
package = "Media"
core = 6.x
\ No newline at end of file
<?php
// $Id$
/**
* @file
* This module provides integration for Drupal's upload module
* with the remig module
*/
/**
* Implementation of hook_media_register
* @return
* array
*/
function media_upload_media_register() {
return array(
'media_upload_container' => array(
// human readable name
'name' => t('Media Upload container'),
'uri' => 'file',
// kind of item, one of
// container, format, insert, post_format
'kind' => array(
'container' => array(
'types' => '*',
'description' => t('Drupal uploaded files'),
)
),
// human readable description
'description' => t('Provides integration with Drupal\'s Upload module'),
// fields
'fields' => array('attachments'),
),
// display the file
'media_upload_display' => array(
// human readable name
'name' => 'Media Upload display'),
'uri' => 'file',
// kind of item, one of
// container, format, insert, post_format
'kind' => array(
'formater' => array(
'types' => '*',
'description' => t('Drupal uploaded files display'),
)
),
// human readable description
'description' => t('Provides integration with Drupal\'s Upload module'),
// fields
'fields' => array(),
),
);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment