Web Design Forums

Drupal Help

Need help with the Drupal CMS? Post your questions here!

Playing mp3 in Drupal: SWF Tools or just TinyMCE?



Site of the Month Nominations
ENTER YOUR SITE NOW!

Reply
 
LinkBack Thread Tools
Old December 18 '09, 02:11 PM (#1)
tabea is offline
New Member!
 
tabea's Avatar
 
Join Date: December 2009
Posts: 3
tabea is an unknown quantity at this point
Playing mp3 in Drupal: SWF Tools or just TinyMCE?

Is there ANY method to use my favourite google mp3 player in Drupal?

... and here is what I did so far to achieve this.
"SWF Tools allows you to easily embed flash content on your [Drupal] pages(...)" according to its documentation site: drupal.org/project/swftools


The EMBED tag for using the google player is:
<OBJECT
classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="400" height="27" id="myMovieName">
<PARAM NAME=movie VALUE="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=MY_AUDIO_URL">
<PARAM NAME=quality VALUE=best>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<PARAM NAME=allowscriptaccess VALUE=never >
<PARAM NAME=quality VALUE=best >
<PARAM NAME=wmode VALUE=window >
<PARAM NAME=flashvars VALUE="playerMode=embedded" >
<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=MY_AUDIO_URL"
width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" /> </div>
</OBJECT>

but I don't know how SWF Tools could help me with using this tag.

SWF Tools comes with some default players but these players are either video players, are large (I need as small as possible) or do not have volume control which is essential. So I found the google reader player, but I don't know how to use it with Drupal.

If it is absolutely not possible to have SWF Tools to use this player, then I have another question: is it possible to use this player by simply inserting the EMBED code into Drupal TinyMCE editor? In my case, I can do it and it plays fine, but when I again edit this node, TinyMCE filters this EMBED tag - just deletes it. And it is so by design according to page:
groups.drupal.org/node/4111

Well I actually have found a workaround to this. In order to have TinyMCE enable EMBED tags, it is necessary to put the following to the tinyMCE.init file:
extended_valid_elements : “object[width|height|classid|codebase],param[name|value],embed[src|type|width|height|flashvars|wmode]“
However, the Drupal init file for TinyMCE does not exist, instead, there is tinymce.module file. I inserted these lines to this file, but it didn't help (means, tinyMCE still filters the EMBED tag):
$plugins['media'] = array();
$plugins['media']['theme_advanced_buttons3'] = array('media');
$plugins['media']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name |obj|param|embed]');


So I think I have basically done everything I could find but it does not work.


Last edited by tabea; December 18 '09 at 02:16 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 18 '09, 04:51 PM (#2)
smoseley is offline
WDF Moderator
 
smoseley's Avatar
 
Join Date: March 2003
Location: Miami, FL
Posts: 8,796
smoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud of
Go with SWF Tools. They're a great simple plug-in, and allow a great deal of customization, including creation of custom content types and views with CCK, etc.

Here's a site I created using SWF Tools for mp3: www.friedonbusiness.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 11 '10, 05:49 AM (#3)
tabea is offline
New Member!
 
tabea's Avatar
 
Join Date: December 2009
Posts: 3
tabea is an unknown quantity at this point
From SWFTools documentation for Drupal:

"SWF Tools comes with support for players as listed in the table below.(...) After making sure that the necessary supporting files have been installed you can then activate the module(...)Finally, you need to tell SWF Tools to use the player now it is available."

I understand from the above that there are only specific players supported by SWFTools, not just any player. My original question was about the possibility to use the Google player, example of this player is on page: http://www.thinkinginwordpress.com/2...your-blogsite/

This player is not on SWF tools list of supported players, so I don't see how SWF tools could help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 11 '10, 10:07 AM (#4)
smoseley is offline
WDF Moderator
 
smoseley's Avatar
 
Join Date: March 2003
Location: Miami, FL
Posts: 8,796
smoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud of
If you want to use the Google Player, just drop it right in your node content. Just be sure to switch the content type to PHP for that page so you don't get Drupal auto-formatting it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 12 '10, 03:11 AM (#5)
tabea is offline
New Member!
 
tabea's Avatar
 
Join Date: December 2009
Posts: 3
tabea is an unknown quantity at this point
This is what I did. However, as I wrote in my original post:

"I have another question: is it possible to use this player by simply inserting the EMBED code into Drupal TinyMCE editor? In my case, I can do it and it plays fine, but when I again edit this node, TinyMCE filters this EMBED tag - just deletes it. "

So this dropping embed tag into code is a one-direction operation with no user friendly support and with no visual editor support.

If e.g., after inserting the EMBED tag and publishing the node, I realize that there is a mistake in text (e.g. a misspell ) and I want to correct the node later, I can't do it normally via TinyMCE editor, because as soon as TinyMCE opens, the EMBD tag is gone from the node. Clicking the HTML icon and opening the HTML content of the node shows that there is no embed tag at all. So each time I edit such node I have to copy paste the whole node text from a copy on my disk. Or only copy paste the EMBED tag in a correct place within the node, but in such case I would have to remember where this place is (and it is not very easy within html), so it's easier to paste the whole node.

My formatting settings are always set no "No filter", setting to "PHP code" does not change the situation.

[EDIT] I think my problem is related to a bigger problem of TinyMCE deleting all non -html code, described here:
http://drupal.org/node/249743


Last edited by tabea; March 12 '10 at 03:39 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 12 '10, 10:35 AM (#6)
smoseley is offline
WDF Moderator
 
smoseley's Avatar
 
Join Date: March 2003
Location: Miami, FL
Posts: 8,796
smoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud ofsmoseley has much to be proud of
Why is TinyMCE turned on for "php" mode? It should only appear in "full html" mode.

Did you manually install TinyMCE on your drupal site? If so, you should scrap that and use the WYSIWYG module, which will allow you to select from several editors and define when they turn on / off while editing.

Last edited by smoseley; March 12 '10 at 10:39 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » CMS Help » Drupal Help

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
User Infomation
Your Avatar

Site Of The Month

Ticket Cake
Ticket Cake

Ticket Cake is a drupal based event ticketing platform. It features that ability to browse events and share them.

Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:29 AM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163