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

Cccddd

#80
****** ALL WITH A SPORK

goddamn see this is why i hate being distracted by assholes at work. here I am trying to do personal ****** on army time and they wanna come distract me and make me fix someone's outlook.

Please use this thread for future file manager discussions, as this thread is intended for the music database mod. Thanks

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

CokeCan

I installed 1.0.4 and I am having problems with the Music Database mod.
I get this error when I try to get in it's ModSettings:
Quote2: Invalid argument supplied for foreach()
File: /www/xxx/xxx/forum/Sources/ModSettings.php
Line: 563
What can I do?

Xarcell


Cccddd

Quote from: CokeCan on June 08, 2005, 02:34:38 PM
I installed 1.0.4 and I am having problems with the Music Database mod.
I get this error when I try to get in it's ModSettings:
Quote2: Invalid argument supplied for foreach()
File: /www/xxx/xxx/forum/Sources/ModSettings.php
Line: 563
What can I do?

is this on a fresh install of 1.0.4, or have you tried installing the file manager there before

CokeCan

It's on a fresh install of 1.0.4

Cccddd

attach a copy of your ModSettings.php

CokeCan

How can I attach files here?

CokeCan


Cccddd

the link isnt working. go into the reply page and click the additional options link

CokeCan

Please try to download from that link again, it's working for me
At "Additional options" I've got:
QuoteNotify me of replies. 
Return to this topic. 
Don't use smileys.
If you can please say me your e-mail by IM and I send you it by mail :)

Cccddd

cheschire at gmail dot com

CokeCan


CokeCan

Cheschire, did you have time to check the files? :)

Cccddd

nope. have to wait till tomorrow. sorry m8

Oldiesmann

I just talked to someone else having this problem... This is related to the optional filie manager mod that you can install... Specifically, these lines:

foreach ($folders as $id => $hash)
{
$checking = $id;
$folders[$id]['fullPath'] = '';
while ($folders[$checking]['parentFolder'] > 0)
{
$folders[$id]['fullPath'] = $folders[$folders[$checking]['parentFolder']]['folderName'] . '/' . $folders[$id]['fullPath'];
$checking = $folders[$checking]['parentFolder'];
}
}


Does this mod automatically enable the file manager features or something?
Michael Eshom
Christian Metal Fans

StormLrd

#95
Correct me if im wrong please lol but ive finally got mine running correctly, the music db that is not the file manger, but is this just for listing genres, albums, artists, and "just lyrics" not actual mp3 files?

mine is only setup for the actual written lyrics not playing songs (and yes i feel like an idiot for clarifying).

I did find several php codes for actual playing mp3's but so far only one has shown promise in actually integrating into the smf forum but ill be damned if i can figure out how lol. Heres the zip file on it maybe some of yall can figure it out.

http://stormlrdsreality.co.uk/zina-0.11.18.tar.gz It seems like a really cool idea here's where i found it:

http://programmingpub.com/scripts/Free_PHP_Scripts/Free_PHP_Scripts-Download_Free_Audio_Scripts/ and this zip file is zina that i uploaded to my server yall are welcome to see what you can come up with it.

There was a forum user transfer file for users but id rather see if their is a way to just incorporate the embedded format directly into my smf forum.

i was also thinking that the now playing mod could be modified to pick up what ever the user is listening to as he/she was posting a message or show nothing if not listening to anything at all.

Cccddd

I'm already working on a tie-in file manager mod to handle mp3s as well as artist and album pictures.

StormLrd

kool lol so am i with my inexperienced *** , ive looked at several from kplaylist, zina, and andromeda all very complex.

I did find this one this morning thou thats very simple (and cheesy at moment) but could have possiblities incorporating it into your mod.


<?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/html");

# get rid of those damns slashes after urlencoding
$add = stripslashes($add);
$addnow = stripslashes($addnow);
$remove = stripslashes($remove);
?>

<?
function currentTrack()
{
$fp = popen( "./playlist.pl current", "r" );
$data = fgets($fp, 1024);
pclose($fp);
$data = chop($data);
return $data;
}

function showInfo()
{
$fd = popen( "./playlist.pl info", "r" );
$title = fgets($fd, 4096);
$album = fgets($fd, 4096);
$artist = fgets($fd, 4096);
$year = fgets($fd, 4096);
pclose($fd);

if ($title=="\n" && $album=="\n" && $artist=="\n" && $year=="\n")
{
return;
}
echo '<center>';
echo '<table bgcolor=#96aebc>';
        echo '<tr><td>';
        echo '<table bgcolor=#cee2ef>';

if ($title!="")
{
echo '<tr><td>Title</td><td>' . $title . '</td></tr>';
}
if ($album!="")
{
echo '<tr><td>Album</td><td>' . $album . '</td></tr>';
}
if ($artist!="")
{
echo '<tr><td>Artist</td><td>' . $artist . '</td></tr>';
}
if ($year!="")
{
echo '<tr><td>Year</td><td>' . $year . '</td></tr>';
}
echo '</table>';
echo '</td></td></table>';
echo '</center>';
}
?>

<html>
<body bgcolor=#ffffff>

<?
if (empty($information) && empty($tracks) && empty($remove) && empty($skip) && empty($randomise) && empty($playlist) && empty($nowlist))
{
echo '<center>';
echo '<a href="index.php3?skip=1" target=main><img src="images/skip.png" border=0 alt="[Skip Track]"></a>';
echo '<a href="index.php3?tracks=1" target=main><img src="images/add.png" border=0 alt="[Add Tracks]"></a>';
echo '<a href="index.php3?playlist=1" target=main><img src="images/playlist.png" border=0  alt="[View Playlist]"></a>';
echo '<a href="index.php3?nowlist=1" target=main><img src="images/reqlist.png" border=0 alt="[View Request List]"></a>';
echo '<a href="index.php3?randomise=1" target=main><img src="images/random.png" border=0 alt="[Randomise Tracks]"></a>';
echo '<a href="index.php3?information=1" target=main><img src="images/info.png" border=0 alt="[Information Summary]"></a>';
echo '<a href="http://epic.world:8000"><img src="images/listen.png" border=0 alt="[Listen]"></a>';
echo '</center>';
}
else
{
echo '<center>';
echo '<h1>';
echo "Now Playing: " . ($current = currentTrack());
echo '</h1>';
echo '</center>';
showInfo($current);
}
?>

<?
function addTracks()
{
echo '<table bgcolor=#96aebc>';
echo '<tr><td>';
echo '<center><h2>Master List</h2></center>';
echo '</td></tr>';
echo '<tr><td>';
echo '<table bgcolor=#cee2ef>';
$fd = popen( "./playlist.pl listmaster", "r" );
while ($data = fgets($fd, 4096))
{
$data = chop($data);
echo '<tr>';

echo '<td>';
echo $data;
echo '</td>';

echo '<td>';
echo '<a href=index.php3?addnow=' . urlencode($data) . ' target=menu>';
echo 'Add to now list';
echo '</a>';
echo '</td>';

echo '<td>';
echo '<a href=index.php3?add=' . urlencode($data) . ' target=menu>';
echo 'Add to playlist';
echo '</a>';
echo '</td>';

echo '</tr>';
}
echo '</table>';
echo '</td></td></table>';
pclose($fd);
}

function showPlaylist()
{
echo '<table bgcolor=#96aebc>';
        echo '<tr><td>';
        echo '<center><h2>Play List</h2></center>';
        echo '</td></tr>';
        echo '<tr><td>';
        echo '<table bgcolor=#cee2ef>';
$fd = popen( "./playlist.pl list", "r" );
while ($data = fgets($fd, 4096))
{
$data = chop($data);
echo '<tr>';

echo '<td>';
echo $data;
echo '</td>';

echo '<td>';
echo '<a href=index.php3?remove=' . urlencode($data) . '>';
echo 'Remove from playlist';
echo '</a>';
echo '</td>';

echo '</tr>';
}
echo '</table>';
echo '</td></td></table>';
pclose($fd);
}

function showNowlist()
{
echo '<table bgcolor=#96aebc>';
        echo '<tr><td>';
        echo '<center><h2>Now List</h2></center>';
        echo '</td></tr>';
        echo '<tr><td>';
        echo '<table bgcolor=#cee2ef>';
$fd = popen( "./playlist.pl listnow", "r" );
while ($data = fgets($fd, 4096))
{
$data = chop($data);
echo '<tr>';

echo '<td>';
echo $data;
echo '</td>';

echo '</tr>';
}
echo '</table>';
echo '</td></td></table>';
pclose($fd);
}

?>



<?
if ($add != "")
{
$fp = popen( "./playlist.pl add", "w" );
fputs($fp, $add."\n");
pclose($fp);
# addTracks();
}
elseif ($addnow != "")
{
$fp = popen( "./playlist.pl addnow", "w" );
fputs($fp, $addnow."\n");
pclose($fp);
# addTracks();
}
elseif ($remove != "")
{
$fp = popen( "./playlist.pl remove", "w" );
fputs($fp, $remove);
pclose($fp);
showNowlist();
showPlaylist();
}
elseif ($skip != "")
{
system('./playlist.pl skip');
showPlaylist();
}
elseif ($tracks != "")
{
addTracks();
}
elseif ($playlist != "")
{
showPlaylist();
}
elseif ($nowlist != "")
{
showNowlist();
}
elseif ($randomise != "")
{
system('./playlist.pl randomise');
showPlaylist();
}
elseif ($information != "")
{
showNowlist();
showPlaylist();
}
?>

</body>
</html>



i set it up for testing here

Ive got to add a song file to it yet to test with but at least the code is simple enough compared to the rest i looked at.


Cccddd

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.

StormLrd

Cheschire i can tell from all the reading ive done this weekend on it and checking out the info on the net this aint gonna be easy lol. In fact i hate to say it but this might be one of those pay mods. Definitly a possible group project.

Of the bunch ive looked and most are in alpha a cpl are in beta and very few are in full release and of those only a cpl are free lol. And you know the saying you get what you pay for lol.

I'll add the zipped files for the cpl ive got to look at besides that zina one above.

the zina, agatha and the kplaylist both got nice feature for rating and setting up personal playlists and randomizing the play of them if you want. Just a matter of understanding them. The zina doesnt use sql but kplaylist does so thats a factor as well.

I dont see the file upload for admin being a problem just some nested if's and browse/upload forms but the rest looks like a bugger.

Heres some zipped files for different mp3 manager/players:

http://stormlrdsreality.co.uk/zipped/agatha-0.7.0.tar.gz

[url]http://stormlrdsreality.co.uk/zipped/muse-0.0.1.tar.tar[url] This is for the simple one above

the kplaylist you can get from the link in above posts

Advertisement: