News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Music Database [3.1]

Started by Cccddd, April 21, 2005, 08:12:38 AM

Previous topic - Next topic

StormLrd

Quote from: Cheschire on June 11, 2005, 10:09:53 AM
I'm still not sure what you are trying to do, so get it in a more workable state so i can see what you are talkin about.

Sorry i was putting info together when you posted this.

Actually want im wanting to do is figure out a way to help with this mod lol and playing mp3's from it

JayBachatero

i understand what you want.  he wants to stream the mp3s directly on the browser.  what i think its possible to do is use the streaming mod in conjuction with this mod here is the streaming mod
<id>
Streaming for SMF
</id>

<version>
3.0
</version>

<mod info>
Based on "stream and stream-2 for SMF 1.0 RC 2" written by Hans_de_Echte of www.het-catshuys.nl
</mod info>

<author>
1948pal
http://www.allaboutpalestine.com
</author>

<edit file>
Themes/default/languages/Modifications.english.php
</edit file>

<search for>
?>
</search for>

<add before>
/* Stream */
$txt['stream'] = 'Add Windows media sound or movies to your posting!';
$txt['real'] = 'Add Real media sound or movies to your posting!';
$txt['quick'] = 'Add QuicTime media sound or movies to your posting!';
$txt['enableEmbeddedStream'] = 'Embed stream into posts?';
$txt['enableEmbeddedReal'] = 'Embed real into posts?';
$txt['enableEmbeddedQuick'] = 'Embed QuickTime into posts?';
</add before>

<edit file>
Themes/default/languages/Help.english.php
</edit file>

<search for>
?>
</search for>

<add before>
$helptxt['enableEmbeddedStream'] = 'This option will allow your users to use Windows Media Video and Sound directly inside their posts!';
$helptxt['enableEmbeddedReal'] = 'This option will allow your users to use Real Media Video and Sound directly inside their posts!';
$helptxt['enableEmbeddedQuick'] = 'This option will allow your users to use QuickTime Media Video and Sound directly inside their posts!';
</add before>

<edit file>
Sources/Printpage.php
</edit file>

<search for>
// Oh sure, let's print some flash.
$row['body'] = preg_replace('/\[flash=(.*)\](.*)\[\/flash\]/', '$2', $row['body']);
</search for>

<add after>

// And we can even print some stream.
$row['body'] = preg_replace("/\[stream=(.*)\](.*)\[\/stream\]/","$2",$row['body']);
$row['body'] = preg_replace("/\[real=(.*)\](.*)\[\/real\]/","$2",$row['body']);
$row['body'] = preg_replace("/\[quick=(.*)\](.*)\[\/quick\]/","$2",$row['body']);
</add after>

<edit file>
Themes/default/Post.template.php
</edit file>

<search for>
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
</search for>

<add after>
'stream' => array('code' => 'stream', 'before' => '[stream=256,256]', 'after' => '[/stream]', 'description' => $txt['stream']),
'real' => array('code' => 'real', 'before' => '[real=256,256]', 'after' => '[/real]', 'description' => $txt['real']),
'quick' => array('code' => 'quick', 'before' => '[quick=256,256]', 'after' => '[/quick]', 'description' => $txt['quick']),
</add after>


<edit file>
Sources/Subs-Post.php
</edit file>

<search for>
array('tag' => 'flash', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true)
</search for>

<replace>
array('tag' => 'flash', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true),
// [stream]http://...[/stream]
array('tag' => 'stream', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true),
               // [real]http://...[/real]
array('tag' => 'real', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true),
               // [quick]http://...[/quick]
array('tag' => 'quick', 'protocol' => 'http', 'embeddedUrl' => false, 'hasEqualSign' => true, 'hasExtra' => true)
</replace>

<edit file>
Sources/Subs.php
</edit file>

<search for>
$codetocache[] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$1" height="$2"><param name="movie" value="$3" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$3" width="$1" height="$2" play="true" loop="true" quality="high" AllowScriptAccess="never"></embed></object>';
</search for>

<add after>
// Handle stream.
$codefromcache[] = '/\[stream=(.+?),(.+?)\](?:<br \/>)?(.+?)(?:<br \/>)?\[\/stream\]/is';
if (empty($modSettings['enableEmbeddedStream']))
$codetocache[] = '<a href="$3" target="_new">$3</a>';
else
$codetocache[] = '<object id=\"wmp\" width=\\1 height=\\2 classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0\" standby=\"Loading Microsoft Windows Media Player components...\" type=\"application/x-oleobject\"><param name=\"FileName\" value=\\3><param name=\"ShowControls\" value=\"1\"><param name=\"ShowDisplay\" value=\"0\"><param name=\"ShowStatusBar\" value=\"1\"><param name=\"AutoSize\" value=\"0\"><param name=\"AutoStart\" value=\"0\">
<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp\" src=\\3 name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 visible=1 autostart=0 animationatstart=0 transparentatstart=1 loop=0  width=\\1 height=\\2></embed></object>';
                       
// Handle real.
$codefromcache[] = '/\[real=(.+?),(.+?)\](?:<br \/>)?(.+?)(?:<br \/>)?\[\/real\]/is';
if (empty($modSettings['enableEmbeddedReal']))
$codetocache[] = '<a href="$3" target="_new">$3</a>';
else

                        $codetocache[] = '<OBJECT ID=RVOCX width=\\1 CLASSID="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" WIDTH=256 HEIGHT=256>
<PARAM NAME="SRC" VALUE="$3">
<PARAM NAME="CONSOLE" VALUE="MOVIE1">
<PARAM NAME="CONTROLS" VALUE="ImageWindow">
<PARAM NAME="AUTOSTART" VALUE="FALSE"><PARAM NAME="CONSOLE" VALUE="MOVIE1">
<PARAM NAME="CONTROLS" VALUE="ControlPanel"></OBJECT><br /><OBJECT ID=RVOCX width=\\1 CLASSID="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" WIDTH="375" HEIGHT="100">
                  <PARAM NAME="CONSOLE" VALUE="MOVIE1">
                  <EMBED height="240" width="320" controls="ImageWindow,controlPanel" src="$3"?embed" type="audio/x-pn-realaudio-plugin" autostart="false">
                  </OBJECT>';

                  // Handle Quicktime
    $codefromcache[] = '~\[quick=(\d+?),(\d+?)\](?:<br />)?(.+?)(?:<br />)?\[/quick\]~is';
if (empty($modSettings['enableEmbeddedQuick']))
$codetocache[] = '<a href="$3" target="_new">$3</a>';
else
$codetocache[] = '<object width="$1" height="$2" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="SRC" value="$3" />
<param name="CONSOLE" value="MOVIE1" />
<param name="AUTOPLAY" value="false" />
<param name="CONTROLLER" value="true" />
<embed src="$3" width="$1" height="$2" autoplay="false" controller="true" pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>';

</add after>

<edit file>
Sources/ModSettings.php
</edit file>

<search for>
array('check', 'enableEmbeddedFlash'),
</search for>

<add after>
array('check', 'enableEmbeddedStream'),
array('check', 'enableEmbeddedReal'),
array('check', 'enableEmbeddedQuick'),
</add after>
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

baio

Hi, great mod :D but I am having problems since the artist is not in the Albums part :'(.
So, If you have a "Greatest Hits" album you don't know wich to choose when you are adding songs.
How can I add the artists in the Albums part? And how do I do if I want the combo to list Artist - Album in the song part ???

Thx!

JayBachatero

ok i was taking a look at the filemanager and the musicdb mod.  i found were the player can go at.  the problem wis linking the source because fmdl is setup to download the file if you make a function to stream it it would work.  i only got the real streamer code take a look
<?php ' . (isset($info['ID_FILE']) ? '<a href="' . $scripturl . '?action=fmdl;ID_FILE=' . $info['ID_FILE'] . '"><img style="float:right" src="' . $settings['images_url'] . '/music_play.gif" /></a><br />                    <OBJECT ID="RVOCX" width="256" CLASSID="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" HEIGHT="50" />                    <PARAM NAME="CONSOLE" VALUE="MOVIE1"/>                    <EMBED height="50" width="256" controls="All" src="' . $scripturl . '?action=fmdl&ID_FILE=' . $context['songinfo']['ID_FILE'] . '" type="audio/x-pn-realaudio-plugin" autostart="false"/>                  </OBJECT/>' : '') . '?>

' . $scripturl . '?action=fmdl;ID_FILE=' . $info['ID_FILE'] . ' thats the source link

take a look at http://www.kevmundial.com/test_board/index.php?action=music;list=songs;ID_SONG=2 u can see it tries to play it but it cant cause it setup to download it.  maybe make a function that wen ID_FILE is called it repllaces it with the name of the file example: hello.rm instead od the ID.  well thats just an oppinion lets see if it helps out
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Cccddd

Quote from: baio on June 11, 2005, 12:02:42 PM
Hi, great mod :D but I am having problems since the artist is not in the Albums part :'(.
So, If you have a "Greatest Hits" album you don't know wich to choose when you are adding songs.
How can I add the artists in the Albums part? And how do I do if I want the combo to list Artist - Album in the song part ???

Thx!

You dont. You set the artist with the song. That way if you enter in a soundtrack it will come up with various artists automatically if it detects more than one artist for the cd.

Cccddd

finally got the filemanager mod approved on the modsite.

thread here:
http://www.simplemachines.org/community/index.php?topic=38382

mlrocks1

Hey! :D

Well i dont understand something... here i go...

is there any instructions of installation?

I uploaded everyfile to the path u say at the beggining... I dont know what to do with the install.xml and install_sql.php I HAVE NO CLUE...

  <?xml version="1.0" ?>
  <!DOCTYPE modification (View Source for full doctype...)>
- <modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
  <id>Cheschire:MusicDB</id>
  <version>3.1</version>
- <file name="$boarddir/index.php" error="fatal">
- <operation error="fatal">
- <search position="before" regexp="false" whitespace="exact">
- <![CDATA[       'movetopic2' => array('MoveTopic.php', 'MoveTopic2'),

  ]]>
  </search>
- <add>
- <![CDATA[
      'music' => array('Music.php', 'Music'),
      'musicadmin' => array('MusicAdmin.php', 'MusicAdmin'),


  ]]>
  </add>
  </operation>
  </file>
- <file name="$sourcedir/ManagePermissions.php" error="fatal">





I Chmod the sources/ files and the ones that are on the themes/default path... but what do i have to do next??? chmod the index.php of the forum (main page)?

i do not understand this

1. Execute Code install_sql.php 
2. Execute Modification ./index.php Success
3. Execute Modification ./Sources/ManagePermissions.php Success
4. Execute Modification ./Sources/ModSettings.php Success
5. Execute Modification ./Themes/default/index.template.php Success
6. Execute Modification ./Themes/default/languages/ManagePermissions.english.php Success
7. Execute Modification ./Themes/default/languages/Errors.english.php Success
8. Execute Modification ./Themes/default/languages/ModSettings.english.php Success


Basically... how can i do to run install.xml correctly ??? omg this is so confussing!

JayBachatero

you click continue and after you refresh.  your menu buttons should show.  it looks like it installed correctly.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Cccddd

basically install.xml modifies files that already exist on your website and install_sql.php is a script i wrote to setup the SQL tables to store the data.

when you run the install for the package, it shows you a TEST of the install. I didn't make the package manager so I'm not to blame for it not being more obvious as to how it works, but anyways, just hit continue like Lil_J said, and it will continue past the test and actually complete the install.

ashvin

hey great mod, im after it 4 the lyrics database

just one problem, i've edited it manually and had problems with modsettings.php using 1.0.4 SMF
now i've used the package manager i still get

4.     Execute Modification     ./Sources/ModSettings.php     Failure

everything else is succesful, do u think this is primarily 2 do with the code/mods coded into this file?
unfortunately i can't attach my modsettings.php file
http://www.rapcage.com, source for the newest rap/hiphop

eddie43302

i to get this problem

Installing this package will perform the following actions:  Type Action Description
1. Execute Code install_sql.php 
2. Execute Modification ./index.php Success
3. Execute Modification ./Sources/ManagePermissions.php Success
4. Execute Modification ./Sources/ModSettings.php Failure
5. Execute Modification ./Themes/default/index.template.php Success
6. Execute Modification ./Themes/default/languages/ManagePermissions.english.php Success
7. Execute Modification ./Themes/default/languages/Errors.english.php Success
8. Execute Modification ./Themes/default/languages/ModSettings.english.php Success
9. Extract File ./Sources/Music.php 
10. Extract File ./Sources/MusicAdmin.php 
11. Extract File ./Sources/Subs-Music.php 
12. Extract File ./Themes/default/Music.template.php 
13. Extract File ./Themes/default/MusicAdmin.template.php 
14. Extract File ./Themes/default/languages/Music.english.php 
15. Extract File ./Themes/default/languages/MusicAdmin.english.php 
16. Extract File ./Themes/default/images/english/music.gif 
17. Extract File ./Themes/default/images/english/music_admin.gif 
18. Extract File ./Themes/default/images/english/music_albums.gif 
19. Extract File ./Themes/default/images/english/music_artists.gif 
20. Extract File ./Themes/default/images/english/music_genres.gif 
21. Extract File ./Themes/default/images/english/music_songs.gif 
22. Extract File ./Themes/default/images/english/music_header.gif 
23. Extract File ./Themes/default/images/english/music_header_admin.gif 
24. Extract File ./Themes/default/images/music_staroff.gif 
25. Extract File ./Themes/default/images/music_staron.gif 
26. Extract File ./Themes/default/images/music_play.gif 

[ Proceed ]

ashvin

seems like something to do with another mod, thats been installed on smf 1.0.4, i aint much of a php coder so  ::).
http://www.rapcage.com, source for the newest rap/hiphop

eddie43302

i dont have 1.04 installed i have SMF 1.0.3 installed.and no this is the first time i ever downloaded the music database i never installed another version before.

ashvin

neither have i lol this is my first installation of music database, its in use, but that one modsettings thing isnt done, lol  :P ah well hopefully cheschire who im sure is a busy guy has sometime in the next week or so 2 help out, im willing 2 wait.
http://www.rapcage.com, source for the newest rap/hiphop

dash

Hi,
is it just for the default theme or does it work with the classic yabb theme too?

JayBachatero

Quote from: dash on June 16, 2005, 01:50:24 PM
Hi,
is it just for the default theme or does it work with the classic yabb theme too?
default theme.  you will need to copy the images that themes images/english folder
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

ashvin

also how do i change the length of text allowed in Lyrics? cos some songs r long and this dont accept them
http://www.rapcage.com, source for the newest rap/hiphop

JayBachatero

go to your admin panel -> features and options -> music -> change the length of the lyriqs
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

ashvin

lol i don't have that, see above , my modsettings.php hasnt been edited, failure, and i tried it manually wudnt work. so it dont show up in features and options which of course calls modsettings.
http://www.rapcage.com, source for the newest rap/hiphop

ashvin

any1 had the same errors as me and the few ppl above?
http://www.rapcage.com, source for the newest rap/hiphop

Advertisement: