Update audio_attach to D6

kyle_mathews - September 21, 2008 - 03:42
Project:Audio
Version:6.x-1.x-dev
Component:audio_attach
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Problem with the audio attach module. I installed the latest 6.x-dev and I got the error in the title from audio_attach.module.

#1

drewish - September 30, 2008 - 03:31

this was duplicate of #294317: Fatal error: Call to undefined function audio_prepare() in /my_path/audio_attach.module on line 153 but i'm referencing this one from some other places so this stays active.

#3

zirafa - September 30, 2008 - 04:08

Yea. I have pretty much stepped away from drupal dev work for the time being. If I get a chance to look at audio_attach I'll try. It's not a very complicated module but I just haven't had the eyeballs as of late.

zirafa

#4

g76 - October 3, 2008 - 21:36

subscribing. same issue.

#5

randyesq - October 18, 2008 - 22:57

subscribing. same issue too. What is the problem, the function is in there, isn't it?

#6

drewish - October 20, 2008 - 21:55

randyesq, no that function disappeared as part of the upgrade for D6. audio_attach hasn't been fully upgraded.

#7

randyesq - October 24, 2008 - 21:08

Drewish-

Thanks for the update! I know you will get to this when you can, but please know that people (me especially) are excited to see it available and test it out!

Thanks for a great module,
randyesq

#8

RyanFC - November 15, 2008 - 04:34

subscribing

#9

white-raven - November 15, 2008 - 21:34

subscribing.

#10

speersd - November 17, 2008 - 03:26

Is there a work-around? Does batch upload work?

#11

jorisx - November 17, 2008 - 16:16

Subscribing, or if some one knows about a work arround of hack to fix it, please let me know :)
Still a Great module! :-)

#12

jackread - November 18, 2008 - 21:11

subscribing - would love to see this working or find a work around.

#13

drewish - November 25, 2008 - 16:18

I'm working on revamping this module to use a CCK nodereference rather than the current system.

#14

drewish - November 25, 2008 - 18:47
Status:active» needs work

Here's a first pass that creates the CCK field and migrates the data into it. It's got a field formatter that replicates the old look.

Things that need to be done:
- add a default view and use that to select nodes so that people can control the permissions.
- add some elements to the nodereference form for uploading files.
- update the documentation to describe what the new version does.

If people test this out make sure you back up your database before hand.

AttachmentSize
audio_attach_cck.patch 26.88 KB

#15

drewish - November 25, 2008 - 23:34
Status:needs work» active

A little follow up on this to clarify where it sits. You need to install before using this. It will display your upgraded attachment data and let you input new attachments. It will not let you upload files and attach them directly to a node, you'll need to upload them first.

I'm going to go ahead and commit this and but leave the .info marking it as incompatible.

AttachmentSize
audio_attach_311284.patch 21.22 KB

#16

yched - November 26, 2008 - 14:33

drewish, just took a peek at the commit, got a minor remark :
The formatter basically computes a separated output for each individual value (and then themes the whole as a ul), so I'm not sure it really deserves to use

'multiple values' => CONTENT_HANDLE_MODULE,

which rather aims at grouping multiple values in a single 'display' (for instance in a graph, a gmap or an image slideshow).

(granted, we currently miss generic 'ul / ol / comma-separated' display options for multiple values)

#17

drewish - November 27, 2008 - 06:56

yched, yeah it did seem a little much for such a simple bit of themeing but I'd asked on IRC and it seems like other people are mis(?) using it the same way.

here's some fixes to the README.txt and installer to actually stop them if CCK isn't installed or updated. Committed to HEAD.

AttachmentSize
audio_attach_311284.patch 3.72 KB

#18

drewish - December 8, 2008 - 02:01
Title:Fatal error: Call to undefined function audio_prepare() » Update audio_attach to D6

marked #342943: Attaching Audio File to nodes other then "Audio" as a duplicate

#19

drewish - December 8, 2008 - 20:18

I think I need to add an admin form to let people select which nodes should have the attached audio and create the field(s) accordingly. that way the people who want to DIY it can do that and everyone else can have a one click field setup.

#20

RyanFC - December 16, 2008 - 22:40

Hello, I've run into some problems. I patched the files with the above, then I went to my module list and I see the screenshot which I've attached.
Audio Attach is checked and greyed out, but below, Content is greyed out thus I can't check it. any ideas?
thank you!

AttachmentSize
Untitled-1.jpg 123.1 KB

#21

drewish - December 16, 2008 - 23:45

RyanFC you don't need to patch anything at this point. it's included in the current version of the module. you'll need to install CCK though as it says on the project page.

#22

RyanFC - December 17, 2008 - 20:42

Thank you, I really appreciate it. Unfortunately I still seem to be stuck. I have CCK and the updated audio module installed and everything appears to be as I need it in the modules admin. So now, I'm reading, "You can now add a new node reference field and use "Attached audio" as the display type." and under Usage says "Create or edit a content type that has audio attachments enabled"

So I assume my next step is to add a new node reference field. Could you direct me to information on how to do that? (my search didn't return anything that helped me)
When I have that in place I'll need to edit a content type that has audio attachments enabled. I assume I create a content type "Playlist" and enable audio attachements? ..will "enable audio attachements" be an option in the content type setup page?

thanks so much,
Ryan

#23

RyanFC - December 23, 2008 - 23:28

well I've at least found what the problem is. the CCK tabs aren't showing up for me! ..some other module or something must be conflicting with CCK. I have the most recent verison of CCK installed but the "add field" links and tabs don't show up.

should anybody read this and have any ideas, let me know.
thanks!

#24

RyanFC - December 24, 2008 - 20:19

at this point I can't tell if my installation is working correctly or I simply don't know how to use all the pieces of this module (and documentation in near non existent as far as I can find)

Does the audio feeds piece work for drupal 6? I that enabled but nowhere do I find any options of how it works to create an actual xspf or m3u

I created a content type called playlist and added a new field (i titled it "attached audio"). here is an example http://freight.scd2.net/freight-radio
you'll see that it has links to 3 audio nodes, instead of playing those 3 nodes in a player.

It seems like I'm on the right track but I don't see any way or any instruction to make a playlist work thus far. I have everything enabled and I created the content type and the field. Should the field already be an option in the manage fields area of a content type? (I created my own, but I"m wondering)

any assistance on this would be greatly appreciated. I'd then be happy to type up some instructions or notes for other users who may run into this.

thanks and merry christmas!

PS - I created a admin user for my dev drupal installation viewable at the link above if anyone has a minute to take a look. The login info is user: audiohelp pwd: audiohelp

#25

drewish - December 25, 2008 - 01:33

as the release notes state audio_feeds hasn't been updated. it's structured in a way that isn't condusive to updating to the new views2 paradigm.

#26

mariagwyn - December 31, 2008 - 22:13

I would like to test this out. I have a CCK content type with is primarily text, but sometimes has an audio file attached to it. I am having trouble figuring out how to attach the actual audio file. I set up a CCK node reference field, which links perfectly to the audio node, but I was hoping to actually show the flash player in the text node. I am assuming (perhaps incorrectly) that this is what audio attach does. I have also set up a view which I can use to display, but it does not seem to help. I know that at some point, I saw an option for "attached audio", but I can't remember where I saw it, CCK or Views. And I am not finding it again.

Any tips for how to start this process?

Thanks,
Maria

#27

jyg - January 26, 2009 - 05:54

I'm using the dev version (6.x-1.x-dev) from 2008-Dec-22 and I also do not see the audio widget come up in the nodereference field selection list. I see some people say that this works... some say it doesn't. I haven't been able to figure out why its not working for me. FWIW, I'm using CCK 6.x-2.1. I wonder if there's some special order in which I have to do things...

thanks,

jyg

#28

Sakrecoer - March 7, 2009 - 22:56

subscribing
i seem to be missing the attach audio widget in the selection field...

Anyways, thanks a billion for your hardwork! This module is what i use drupal for :)

#29

Steve Hanson - March 26, 2009 - 17:18

Likewise - I cannot seem to get either dev or unstable3 to work - when I try to create the nodereference field, I dont get any options for the field other than the usual suspects - select list, checkboxes, etc. If I use select list, I can then set the display field to be an audio widget - so I can select between the existing audio nodes - but there's no widget to upload a new one, which makes this not very useful.

#30

chaimkut - April 12, 2009 - 22:25
Component:Code» audio_attach

I'm having a similar problem as reported above. I've enabled all the relevant Audio modules (most importantly Audio Attach), granted myself the appropriate permissions for modifying audio, etc. Then:
-I add a Node Reference field in a Content Type
-When setting up the Node Reference field, I choose 'Content Types that can be referenced' to be 'Audio'
When I actually try to create an instance of this Content Type, the 'Select list' widget for the Node Reference field returns no values ('None'). This is also true when I try to use 'Advanced - Nodes that can be referenced (View)' and choose a View which I know returns multiple values, the Select list nevertheless returns 'None'. (Though I'm not sure if this is related to my use of Views2 or not). One strange thing is that often when I setup this Node Reference field and then click 'Save', when I try to edit the Node Reference field again, my previous settings are not saved.
(These attempts have been made with Drupal 6, with both Audio 6.x-1.0-unstable3 and Audio 6.x-1.x-dev ).

I'm not sure if any of this is correct though, since the README instructs:
Create or edit a content type that has audio attachments enabled

What does "enabling" audio attachments for a particular content type mean? (Simply adding a Node Reference field?)

The README also explains:
This module provides additional CCK formaters for nodereference fields

Although I don't seem to see that the Node Reference field is particularly unusual ...

All I want to do is import/add an Audio item and then be able to reference it inside of another Content Type. Has anyone succeeded at getting this to work? Thanks.

#31

mariagwyn - April 13, 2009 - 01:22

Chaim, I received your email. Yes, I did get something like this to work, but it is hardly ideal. Here is the process:

1. Create a view that is specifically an audio embed ONLY view. I have uploaded a text file which exports my view.
2. Create a field using VIEW FIELD module, and select "audio_embed" as the only "allowed view."
3. The CCK field (using the NID) now calls the node view of audio_embed. This is not ideal, b/c the node view adds material I don't really want, but neither the list nor table options work to show the embedded audio player. I cheat and use CSS to remove things I don't want (so .view h2 {display:none;}, etc.). I would upload a picture of the final result, but I can't get my screenshot to work on my mac. Grrr.

Hope that helps. It is clunky, but it works for what I need, showing the audio player in non-audio nodes.

Maria

AttachmentSize
view-audioembed.txt 3.57 KB

#32

me@andy-j-thorn... - April 30, 2009 - 14:32

Hello,

I don't know if this will help anyone, but maybe? I also wanted to embed uploaded audio on page of different type. I added a Node Reference to my page. I called my reference field_article_audio. I use contemplate to lay my node out as I want it (it is an alternative to doing it all in the theme files, but if that is your approach I am sure you can adapt this little snippet). Anyway, so in my contemplate code I do this:

$audio_link = $node->field_article_audio[0]['nid'];
if ($audio_link) {
print audio_get_node_player (node_load ($audio_link));
}

This then displays a little player on my page.

Hope that helps. audio_get_node_player is a function in audio.module - the author may not consider it part of the supported API, though, so there is a danger this may not work in newer versions of audio.module.

Cheers,
Andy

#33

mkeith - July 7, 2009 - 14:27

subscribing

#34

hugafish - July 16, 2009 - 02:27

subscribing

#35

zenasprime - July 27, 2009 - 01:32

I'd love to see this running... any ETA?

#36

Vinc - August 3, 2009 - 19:39
Status:active» needs work

The node reference doesn't allow me to upload audio directly via the form like described in the readme.

#37

discipolo - September 29, 2009 - 10:37

hi, as far as i can tell the
// checkbox in the node's content type configuration page.
is missing in the audio-attach module.

by replacing
// case 'TYPE_node_form': /
with
case ($form['type']['#value'] .'_node_form' == 'NODETYPEVARIABLE_node_form'):

and uncommenting the
Display currently attached files, ( we dont have _audio_attach_current_list fuction yet)
as well as the multiselectfield for existing audio files (because audio_attach_get_audio_nodes function is missing)

the upload module works again.

the form_alter code reads:
FIXME: This is broken; I'm not sure what $form['type']['#value'] is
// expected to be, but it certainly doesn't always exist.

and what that it is supposed to be is the configuration form.

case 'node_type_form':
if ($form_id == 'node_type_form' && isset($form['identity']['type'])) {
$form['workflow']['audio_attach'] = array(
'#type' => 'radios',
'#title' => t('Attach audio files'),
'#default_value' => variable_get('audio_attach_'. $form['#node_type']->type, 0),
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t('Should this node allows users to attach audio files?')
);
}
break;

basically you have to replace TYPE in
TYPE_node_form
withyour contenttype manually,
i couldnt figure out exactly why $form_id doesnt contain this value... (see http://api.drupal.org/api/function/nodeapi_example_form_alter/6)

all the best!

#38

discipolo - September 29, 2009 - 10:52

gotta set one value...

AttachmentSize
patched.audio_attach.txt 6.22 KB

#39

kasha_x - October 7, 2009 - 11:05

subscribed. I'm testing the latest dev on a soon-to-determined site.

donations to the developers on release of a bug-free module. we're not midas, but maybe if everyone had this outlook these issues would get resolved.

 
 

Drupal is a registered trademark of Dries Buytaert.