News:

Wondering if this will always be free?  See why free is better.

Main Menu

Music Database [3.1]

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

Previous topic - Next topic

Cccddd

Quote from: DoW Kid Rock on April 27, 2005, 02:54:16 AM
I like the mod allot, but is there any way to be able to let members add to the database?  or have each member have their own music list.  or at least attach a members name to the song, artist or album title

norbert is right in that you can allow members in certain groups to add/remove/edit items in the database, but the second two pieces aren't possible right now.

I'm having trouble imagining why you would want to do this though. could you explain your reasoning behind your request? if it's reasonable then I will try to look into the feasibility of adding it in.

Cccddd

Quote from: charlottezweb on April 26, 2005, 08:31:52 PM
Quote from: SeaOfSin on April 22, 2005, 10:52:02 AM
I seem to be getting an error myself

Unknown column 'released' in 'field list'
File: /home/user/public_html/forum/Packages/temp/install_sql.php
Line: 19

any ideas?

I'm also getting this message.  Though I was running 2.4 before uninstalling and trying to move to 3.0 today.

-Jason

haha finally figured out this issue!

find this line:
db_query('ALTER TABLE music_album ADD released int(6) unsigned zerofill', __FILE__, __LINE__);

and move it above this block:
if (isset($date)) foreach ($date as $id => $realdate) db_query('UPDATE music_album SET released = "' . $realdate . '" where id = "' . $id . '"', __FILE__, __LINE__);

I have no idea why it got moved. I probably moved it when I was cleaning code and inadvertently broke something. Anyways I will release 3.0.1 with this fix and the fix for the date sorting sometime in the next few days hopefully. I just can't do anything at work like I used to because some asshole that I can't find is stealing all the bandwidth during the day, and my remote terminal is getting like 700ms delays.

charlottezweb

Quote
I just can't do anything at work like I used to because some asshole that I can't find is stealing all the bandwidth during the day, and my remote terminal is getting like 700ms delays.

lol, that sounds like a joy  :)

Thanks for the fix.  I will definitely try that first thing tonight and post back.  (for real this time!)

-Jason

Cccddd

please dont tell me it caused other issues.

Shizarp

i get this error, some help please

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '21108 like "music_%"' at line 1
File: /home/vhosts/shizarp.xoopiter.com/forum/Packages/temp/install_sql.php
Line: 9

charlottezweb

Quote from: Cheschire on April 28, 2005, 02:05:21 AM
please dont tell me it caused other issues.

lol, sorry --  no, that did the trick.  :)  I thought I responded back because I wrote a post last night but must have not clicked submit.

So yes, thanks!  That did the trick.  But don't get me started on how much fun I had fighting smf to get it to use my edited package to run...Even after creating my own package in order to get it to work in the package manager, I had to download yours, then rename/replace it with mine prior to applying it so it would trick the system.  Of course, I know I probably could've created my own temporary package server if I wanted to but meh ;)

Anyway, the main functionality is back.  My only hitch is that I don't see the administrative link where it used to be.  I notice there's a image for a button in the tarball but it doesn't seem to be putting it on the mod menu when I'm accessing it as admin...any clues there?

Thanks!
-Jason

Cccddd

#26
it doesnt appear on the mod site anymore. there's a button that should appear on the default theme next to the music button. you will have to edit whatever theme you are using and add in the admin button link.

nevermind. for some reason this was one of those nutty problems that my stupid webhost "fixes" without me asking it to. if the name of a file is "close" to the name of what the script is askin for, then it finds that "closely" named file instead. its really annoying for development. anyways i thought i had fixed this before but i might not have updated the package when i fixed it. i changed it now.

and the internet isnt going horribly slow so im going to try to get 3.0.1 out today. hopefully.

oh and for future reference, when you want to use a custom package, dont do it the way you do it. just remove the package files you have on your server, then use the Download New Packages link, and in there you will see a place to upload + install.

Cccddd

#27
Aight 3.0.1 is available on my package server and the mod site package server.

Remember to uninstall the old package before installing any new version! I don't play this upgrade game. it's not safe to do it with mods.

3.0 to 3.0.1
* fixed template looking for musicadmin.gif when should look for music_admin.gif
* workaround for SMF 1.1 uses $txt['months'] instead of $months
* install_sql.php now runs upgrade_sql.php separate. helps locate issues
* upgrade_sql.php was trying to fill released table before creating table
* fixed problem where dates still weren't sorting right
* added Music.german.php and MusicAdmin.german.php language file (thanks to Norbert!)
* fixed pagination bug

Norbert

Thx, Cheschire. Sorting works now.

Here is my MusicAdmin.german.php.
Quote<?php
// Version: 3.0.1; MusicAdmin

$txt['music'] = array(
        'title' => ' Verwaltung der Musik-Datenbank',
   'choosegenre' => 'Genre w&auml;hlen',
   'chooseartist' => 'K&uuml;nstler w&auml;hlen',
   'choosealbum' => 'Album w&auml;hlen',
   'choosesong' => 'Song w&auml;hlen',
        'genres' => 'Genres',
   'artists' => 'K&uuml;nstler',
   'albums' => 'Alben',
   'songs' => 'Songs',
   'editgenre' => 'Genre editieren',
   'editartist' => 'K&uuml;nstler editieren',
   'editalbum' => 'Album &auml;ndern',
   'editsong' => 'Song editieren',
   'editlyrics' => 'Songtext editieren',
   'editgenreinfo' => 'Genre Info editieren',
   'editartistinfo' => 'K&uuml;nstler Info editieren',
   'editalbuminfo' => 'Album Info editieren',
   'editsonginfo' => 'Song Info editieren',
   'addgenre' => 'Neues Genre hinzuf&uuml;gen',
   'addartist' => 'Neuen K&uuml;nstler hinzuf&uuml;gen',
   'addalbum' => 'Neues Album hinzuf&uuml;gen',
   'addsong' => 'Neuen Song hinzuf&uuml;gen',
   'genre' => 'Genre',
   'artist' => 'K&uuml;nstler ',
   'album' => 'Album',
   'song' => 'Song',
   'filename' => 'Dateiname',
   'foldername' => 'Ordnername',
   'songnumber' => 'Track #',
   'songlengthformat' => ' (MM:SS)',
   'songlength' => 'L&auml;nge',
   'albumlengthformat' => ' (HH:MM:SS)',
   'albumlength' => 'L&auml;nge',
   'releaseyear' => 'Jahr der Ver&ouml;ffentlichung',
   'releasemonth' => 'Monat der Ver&ouml;ffentlichung',
   'delete' => 'L&ouml;schen',
   'save' => 'Speichern',
   'edit' => 'Editieren',
   'nolyrics' => ' (Hat keinen Text!)',
   'nofolder' => 'Kein Ordner',
   'nofile' => 'Keine Datei',
);
?>

Cccddd

Okay I think maybe 3 people may have downloaded this mod since I posted the update, so I'm not too worried about making you guys do it again.

go uninstall and reinstall 3.0.1. There was one stupid page bug which makes the page links not work, and I added the MusicAdmin.german.php file.

I think they changed the way the pages works in SMF... I dunno. it's been a while since I tried a large database. charlottez was the one who pointed it out to me.

DoW Kid Rock

Quote from: Cheschire on April 27, 2005, 03:43:08 AM

norbert is right in that you can allow members in certain groups to add/remove/edit items in the database, but the second two pieces aren't possible right now.

I'm having trouble imagining why you would want to do this though. could you explain your reasoning behind your request? if it's reasonable then I will try to look into the feasibility of adding it in.

sorry it took so long to reply.  I was more thinking that I could work it in to show each members list of music they have

JayBachatero

im glad to see 3.0.1 out.  im sorry tha i havent put my demo page up.  havent had time.  this mod keeps getting better and better.  bro i was thinking you should do sumthing like the streaming mod to play the music files.  i think its better than offering the download.  also i was thinking did you remove the artists and cover image from the lyrics page.  because i have this mod with the file manager but it doesnt seem to show the images i have up.  i was thinking also you should try to have the template more flexible with other themes.  like you had the older 1 with text links.
Follow me on Twitter

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

MellowB

File manager seems to work fine tho i had to make some changes to it to work with GD 1.6.2 - cant update the GD lib on that webhost there so had to fix that.
BUT there is one problem... where the heck are the pictures and stuff uploaded and assigned to the albums/artist finaly shown in the Music Database? The pics are uploaded correctly, assigned to an album but they are nowwhere to be seen in the Database itself. I also cant find any code in the template that would show them. Is it just missing couse its not implemented right now or why is this?

Oh and the mod itself produces TONS of Eval(?) errors in the Error Log of our forum. Not that these errors are critical or something but its damn anoying if the error log is flooded with those. Thank god we have an admin in our forum who knows what to do to get ride of these errors...
On the Keyboard of life, always keep one finger on the ESC key.

Cccddd

HAHA I forgot ALL about the eval errors. I keep that whole log turned off all the time cuz i never look at it anyways. it rarely does any good.

hmm damn i guess i need to work out a 3.0.2 now to get rid of those eval errors. its just a hassle, cuz the whole reason its ******ing is I don't properly check to see if variables are set before using them. I know there is a way to turn this off in PHP but I dunno what that command is. so I either go through the hassle of cleaning my code up, or making it ****** less.

hmm i wonder if [Unknown] has left on his mission yet, or if he still hangs around...

lemme know what changes you made to make GD 1.6.2 work. I'll incorporate the stuff into the version of FM that I am working on.

MellowB

Better would be if you fix all these Eval(?) errors. xD
Would at least be great for forums which have their error log turned onl. ;)

Here are my two small changes to the Filemanager.php to get GD prior to 2.0 working:

Change this:
$dest_img = imagecreatetruecolor($dest_width, $dest_height);
imagecopyresampled($dest_img, imagecreatefromjpeg($filePath), 0, 0, 0, 0, $dest_width, $dest_height, $width, $height);


To this:
$dest_img = imagecreate($dest_width, $dest_height);
imagecopyresized($dest_img, imagecreatefromjpeg($filePath), 0, 0, 0, 0, $dest_width, $dest_height, $width, $height);


Maybe build in a setting in the Filemanager settings to rather user GD 1.x oder GD 2.x depending on what is installed on the server couse the old GD 1.x method gives crappy results compared to the GD 2.x ones.

Oh and lets see if we make any more use of the filemanager at the moment, its restricted to admins anyway so dont know if its that critical if we have it or not. ^^;
On the Keyboard of life, always keep one finger on the ESC key.

Cccddd

#35
Musicdb 3.0.2 now released, and it doesnt generate 4 pages of errors in the error log anymore!

as always, uninstall old versions before installing this version. I have to keep stressing this because i know the one time i dont someone will ****** up and forget to uninstall first.

all that was changed in this version is that the script now checks to make sure most of the variables are set before actually using them, thus eliminating all the eval errors. If you have the error log turned off, this will do nothing for you.

MellowB

#36
Ok, THAT was fast. *g*
Will see if i install it right now... hm first gotta make backups of the changed files here.
I guess i will report here if everything works find. ^^

Well, uninstall of the old one gives me five errors. I think we made to many changes to everything... i hate that uninstall stuff. ;P
Guess i have to make the changes by hand...
On the Keyboard of life, always keep one finger on the ESC key.

Cccddd

heh yeah. I just happened to be coding the file manager at the time, and was at a good stopping point. i knew exactly what was causing the eval errors because i already fixed it before, but never FULLY fixed it. was too lazy. then forgot about it. blah.

Anyways...



Hey guys if you want to see this mod in action, on a larger scale too I might add, check out charlottezweb's install, now up and running (3.0.1 currently) at:

http://www.psychopathicforums.com/forum/index.php?action=music

MellowB

Ok, updated only the changed files to 3.0.2 - seems like all eval errors are gone except two or three of them:

http://www.ayu-kult.de/forum/index.php?action=music;list=songs;showOnly=1
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: ID_FILE
Datei: /.../forum/Sources/Music.php
Zeile: 240

http://www.ayu-kult.de/forum/index.php?action=music;list=songs;ID_SONG=2
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: ID_FILE
Datei: /.../forum/Sources/Music.php
Zeile: 216

http://www.ayu-kult.de/forum/index.php?action=music
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: photoCount
Datei: /.../forum/Themes/default/languages/Music.german.php (eval?)
Zeile: 115


And one more problem, you seem to have mixed up the language files in the archive. The german.php's are also all in English. Have replaced them with the old one's couse they didnt change afais.
On the Keyboard of life, always keep one finger on the ESC key.

ディン1031

Quote from: MellowB on May 04, 2005, 01:54:34 PM
Ok, updated only the changed files to 3.0.2 - seems like all eval errors are gone except two or three of them:

http://www.ayu-kult.de/forum/index.php?action=music;list=songs;showOnly=1
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: ID_FILE
Datei: /.../forum/Sources/Music.php
Zeile: 240

http://www.ayu-kult.de/forum/index.php?action=music;list=songs;ID_SONG=2
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: ID_FILE
Datei: /.../forum/Sources/Music.php
Zeile: 216

http://www.ayu-kult.de/forum/index.php?action=music
Filter hinzufügen: Zeige nur Fehlermeldungen mit der gleichen Nachricht
8: Undefined index: photoCount
Datei: /.../forum/Themes/default/languages/Music.german.php (eval?)
Zeile: 115


And one more problem, you seem to have mixed up the language files in the archive. The german.php's are also all in English. Have replaced them with the old one's couse they didnt change afais.
There is a easy way to clear the problems :) (I've found some more eval errors, too).

Change in the Music.php
Line around 131 (Sometimes this made also a error)
'ID_FOLDER' => $hash['ID_FOLDER'],
replace
'ID_FOLDER' => &$hash['ID_FOLDER'],

Line around 138
$sql[$hash['ID_ARTIST']]['photoCount'] = $childhash[0];
replace
$sql[$hash['ID_ARTIST']]['photoCount'] = &$childhash[0];

Line around 216 and around 240
'ID_FILE' => $hash['ID_FILE'],
replace
'ID_FILE' => &$hash['ID_FILE'],

Line around 212 and 241
'lyrics' => $hash['lyrics'],
replace
'lyrics' => &$hash['lyrics'],

and in the file music.template.php
around line 120
' . ($info['ID_FOLDER'] && $info['photoCount'] > 0 ? '[ <a href="' . $scripturl . '?action=filemanager;ID_FOLDER=' . $info['ID_FOLDER'] . '">' . $info['photoCount'] . $txt['music']['numphotos'] . '</a> ]' : '') . '
replace with something like this
' . ($info['ID_FOLDER'] && (!empty($info['photoCount']) && $info['photoCount'] > 0) ? '[ <a href="' . $scripturl . '?action=filemanager;ID_FOLDER=' . $info['ID_FOLDER'] . '">' . $info['photoCount'] . $txt['music']['numphotos'] . '</a> ]' : '') . '

than the errors should not shown any more ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Advertisement: