The whole point for CMS is to allow clients be able to place their data on their websites without assistance.

My client wants to do that, and from the descriptions, I thought that the MP3 Player module was the right module. Now, after some 5 hours of trying to find a solution, reading the documentation and forums, I have reached the point of writing this. I believe it is a fairly easy item, hence my putting this under Documentation - there are no instructions that I can follow, let alone some that my client can.

On the module page http://drupal.org/node/361980 there is reference to "custom code". I don't believe I want to customize the module in any way - but took a look (http://drupal.org/node/524344) Nothing of help there.

What does "Easy integration into CCK FileField and therefore Views as well." mean? Is it important?

I believe that placing a playable MP3 on a page should be as easy as placing a picture.

It's not.

http://www.youtube.com/watch?v=2XIuc6oCoGA was of some help - but ended up not helping position a player on a page. (I can create an upload that results in the player being at the bottom of the page).

I'm now working through this: http://groups.drupal.org/node/10869

My point is that better direction - either in the form of saying that it can't be done - or giving direction as to where to find how it can be done would be good. Either way the documentation is unclear.

Comments

jdelaune’s picture

Status: Needs work » Closed (fixed)

Sorry but you need some basic understanding of Drupal to use this module. If you don't know what CCK or Views is then you are going to get stuck pretty soon.

If you add a FileField to any content type and use the MP3 formatter then it's very easy. But hey that's just my opinion.

I don't get paid for doing this so take it or leave it.

Enzman’s picture

Title: How does one place the MP3 Player / file within body content in a page? » How does one place the MP3 Player / file on a page?
Status: Active » Closed (fixed)

Thank you Starnox.

I'm uncertain if you are confirming if it can be done.

"you need some basic understanding of Drupal to use this module". Well I think I have some understanding, though of course am keen to learn more.

I'm still stuck on this. I believe I have a basic understanding of what CCK is, though am struggling with Views - mostly trying to relate how they are relevant to getting the MP3 Player to appear in content.

Some more information - I'm using the FCKeditor and WYSIWYG modules. Ideally, I'll be wanting to add a button (like the one that is used for uploading SWF files) so the client can upload mp3 clips themselves.

Will search for information about:
"add a FileField to any content type and use the MP3 formatter then it's very easy"
Just watched: http://learnbythedrop.com/drop/83 - it was not helpful.
Have now watched: http://learn.awakenedvoice.com/2007/07/30/drupal-cck-and-views-tutorial/ - not helpful.
I have already added content types and fields. These are very basic and leads me to believe that Starnox misunderstood my issue - possibly related to the way I documented it!

Remember that this is a query about documentation (where to find the information and how to use it) not about the module itself.

Will now start investigating FCKeditor and WYSIWYG modules. Just learnt that CKEditor replaced FCKeditor. (That should be documented on the FCKeditor page. It's not.) Will upgrade and investigate issue with CKEditor.

Enzman’s picture

Status: Closed (fixed) » Active
Enzman’s picture

Title: How does one place the MP3 Player / file on a page? » How does one place the MP3 Player / file within body content in a page?

Improving the title may make it easier for those who answer to get their heads around the issue. Have now spent 11 hours on this issue. I will not give up!

Enzman’s picture

Still stuck on this for four days. I have worked on this for a total of 17 hours. Hoping for some help.

Can now easily create a link that opens a player in a new page - however this is not what the client wants. It would be really nice to have it embedded within a page.

I'm not the only one who had had this issue (http://drupal.org/node/305470)

Just found "SWF Tools" http://drupal.org/project/swftools. I will take a look at it tomorrow.

Enzman’s picture

Hi there. A new day. Feeling abandoned here. I had MP3 player working BEFORE I wrote up the issue - however the objective always was to embed it into content. The question is HOW to embed it into body content - where is the documentation? I am taking the view that the documentation is incomplete, that the module itself works fine.

Enzman’s picture

Title: How does one place the MP3 Player / file on a page? » How does one place the MP3 Player / file within body content in a page?
Component: Documentation » Code
Status: Closed (fixed) » Active

Another new day. Still no closer to having a working solution. Maybe nobody reads these support requests? Will change component from documentation to code in an attempt to solicit a response. I will see this through until I have a solution.

lutherkauai’s picture

It was confusing to me too.....
but with your hint about creating field in content types..
it was so easy it only took 5 minutes after i read this..
http://drupal.org/node/264828

Thanks

ajayrockrock’s picture

Try checking out this tutorial: http://learnbythedrop.com/drop/150

It is a pretty complete step-by-step for the mp3 audio player.

Caveman Concepts’s picture

without CCK or views or any other extra stuff, just the MP3 player, you can drop it anywhere you want.
First, upload an mp3 file (I prefer /sites/default/files/audio so it's easy to migrate when upgrading drupal core files).
Then create a page or a new block, whatever you need.
Add the following code to the body:
.

/**
* Custom MP3 Player theme function.
*
* @param theme
*    Always set to 'mp3player'.
* @param player
*    The name of the player you want to use (default is 'Default').
* @param url
*    The URL to the mp3 file.
* @param album (optional)
*    The name of the album.
* @param artist (optional)
*    The name of the artist.
* @param description (optional)
*    A description of the mp3.
* @return A WordPress Audio Player instance.
*/
theme($theme, $player, $url, $album, $artist, $description);

Then add the code to place the actual player like this:

print theme('mp3player', 'Default', 'http://www.example.com/audiofile.mp3', 'An example file', 'John Smith', 'An optional description of the file');

THAT'S IT!
Add the block to your sidebar or promote the page to your front page or whatever you want to do.

Enzman’s picture

Caveman Concepts, it makes me wonder why we don't use the same technique to place images!! (Oh that's right - placing images is far easier!!)

I'm uncertain how users can control the position on a page. (And if they can't then the solution doesn't match the original request).

ecsmike’s picture

I have been reading articles for 3 days before seeing these posts. I have clients with Drupal sites who want to place audio on their sites mcuh as they place images: a simple upload paradigm and an easy way to locate the link or a very small player INLINE with the content.

I have installed CCK, FileField, and the MP3Player module and cannot get it to function in any useable fashion. I can only get it to display the player at the end of a page - worthless in most cases since it needs to be located at a specific place in the content.

Also, after hours of working with MP3 Player I still cannot figure out how to place the description NEXT TO the player - not above or below it. Using the "theme" feature is not a solution because you cannot even control where the description is shown. It needs to be inline with the player - not beneath it. Besides it is way out of the capability of most users to be able to construct the <?php call to set up the player in the content.

As gantt asked, if this is not possible, please say so. All of the solutions posed to his question thus far ignore the requirement that the player or a link be INLINE with the content and that it be located anywhere within the content - not just at the end or at the end of a teaser. Also the solution needs to be such that it is no more complicated to place the audio within the content than it is to place an image within the content.

If there is a better solution, please recommend one - but not SWFTools - it is far too complicated to set up and far too complicated for most users to manage.

What is needed is something that a person who is barely capable of entering a blog post can master. My clients are small and do not have IT professionals or programmers on their staff.

I would appreciate any suggestions as to how to achieve this.

W.M.’s picture

@Caveman Concepts

Looks great but I am not sure how to make this work since I am using TinyMCE. TinyMCE removes all the php code. Any ideas?

Scott J’s picture

Guys,
The short answer is NO.

Gantt, you say that placing images is easier, but, you must not be using filefield to do it. If I add an imagefield to my content type, it appears at the bottom of the page. This is true for any CCK field, not just mp3player. CCK fields are automatically placed on the page in the order that you drag them to in the 'Manage Fields' tab at for example /admin/content/node-type/story/fields.

You are talking about placing content in line with a wysiwyg editor. The only module that tries to combine CCK and wysiwyg is Insert module, so you could try asking quicksketch if it will work for audio. The other modules that I know of for placing files with an editor are Inline particularly #394682: CCK fields (filefield,imagefield,emfield) and fieldgroups for Inline API and Inline and link Drupal objects modules.

Have you looked at Audio or AudioField modules to see if they have any other ideas?

Scott J’s picture

Here is a good article about this subject at BeezNest: Drupal 6: embedding just about any content securely. It discusses 3 possible methods.

Dubber Dan’s picture

Great link and really helps to explain how to get it the module up and running.

It does still place the MP3 player at the end of the node. So as per the OP is it possible to have the MP3 player mid post, perhaps using CKeditor or something?

Wolf_22’s picture

I've also wondered about this as I had a project awhile back that could have been done much more professionally if the MP3 player could have been placed inside the story or page content.

I wonder... Could something like this be done through the Token module? Much of it would be contingent upon the player I guess, but...?

Dubber Dan’s picture

ignore this, posted in wrong issue

markie’s picture

Status: Active » Postponed (maintainer needs more info)

ping.. anyone still need this?

markie’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

After digging into the module a little more, I've figured out a good answer for this. The module can be embedded into the theme with custom code 1 of 2 ways:

  1. Embed the below code snippet into the tpl files directly
  2. Enable the php_filter and create a block with the below code
    <?php if (module_exists('mp3player')) { print theme('mp3player', 'Default', 
    $audio_file_url, $audio_title, $audio_artist, $description); } ?>

I will try to get the documentation up to date.