horst Posted May 19, 2013 Share Posted May 19, 2013 Local Audio Files - MP3-DBThe Local Audio Files DB is a combination of a Module and a SiteProfile. It is intended to import MP3-files from your filesystem into ProcessWire, read ID3-Tags and pull coverImages from it to feed the DB. It is thought as a starting point for your own site creation. A sort of comfortable aggregated reuseable code for PW-lovers. How to InstallGrab a copy of the latest ProcessWire. Replace the install, modules and templates directories with those in this profile, as shown below: /site-default/install/ /site-default/modules/ /site-default/templates/ With SiteProfile-Installs normally that is all there is to do. With this Profile you also have to copy the file LocalAudioFilesImportShellScript.php (for simplicity) to your PW-rootfolder, (where the index.php reside). If you are on Windows you also should copy mp3_import_starter4win.cmd to the same location. Now install ProcessWire as per the instructions included with it and it will install the LocalAudioFiles profile automatically. After that you find a Quickstart Guide at the homepage of the profile: Follow the 3 steps and you are done! How does it work? The Site has 4 sibling Tree Branches: genres - artists - albums - songs. Each of them hold child-pages: genre - artist - album - song. The logical relations are nested parent-children ones: a genre hold artists, each artist hold albums, each album hold songs. To support both, slim and fast data relations & the logical hirarchy, the module extends the ProcessWire variable $page with some additions. It uses the addHookProperty mechanism to achieve that. It uses an own caching mechanism for large lists, that can be prebuild when running the importer-shellscript, or it build the cache on demand. Also it comes with a FrontEndHandler class that provides a lot of functionality, for example fully customizable FormSelectFields of all genres, artists or albums. More detailed informations and code examples are collected in a demo section of the site. The extended $page variable together with the LocalAudioFiles-FrontEndHandler gives you comprehensive tools to work with your music collection. Download Modules Directory LocalAudioFiles-SiteProfile_v0.1.5.zip LiveDemo I have uploaded a small LiveDemo with only 7 truncated songs. But it's pretty fine to view all Demos and the additional $page->proterties. demo song page demo album page demo artist page demo genre page Graphical overview Screencast of installation https://youtu.be/-qYyppvEF1k History of origins http://processwire.com/talk/topic/3322-how-to-setup-relations-for-a-mp3-db-with-pw/http://processwire.com/talk/topic/3462-pages-get-return-nullpage-but-page-exists/ 9 Link to comment Share on other sites More sharing options...
kongondo Posted May 20, 2013 Share Posted May 20, 2013 Well done Horst! Sorry didn't have time to test the last version. Will make some time for this 1 Link to comment Share on other sites More sharing options...
horst Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) A little change in the importer script has to be done: - added a line that prevents the Shellwindow from closing when the wrong username/password was provided. With the fix now it stays open and the user get the info. LocalAudioFilesImportShellScript.zip (is included in the above Version 1.0.5 now) Edited June 15, 2013 by horst Link to comment Share on other sites More sharing options...
ryan Posted May 25, 2013 Share Posted May 25, 2013 Awesome work Horst! 1 Link to comment Share on other sites More sharing options...
Crssp Posted May 25, 2013 Share Posted May 25, 2013 Are the mentioned Examples & Demo hosted live someplace? They don't seem to be linked to anything. Looks awesome! Link to comment Share on other sites More sharing options...
horst Posted May 25, 2013 Author Share Posted May 25, 2013 Are the mentioned Examples & Demo hosted live someplace? They don't seem to be linked to anything. Looks awesome! ?? uhhm, - you first have to run the ShellImporterScript, then the Examples & Demos have some 'food' to work (They don't within an empty DB) No sorry, there is no LiveDemo. Link to comment Share on other sites More sharing options...
horst Posted May 26, 2013 Author Share Posted May 26, 2013 LiveDemoI have uploaded a small LiveDemo with only 7 truncated songs. But it's pretty fine to view all Demos and the additional $page->properties. demo song page demo album page demo artist page demo genre page 2 Link to comment Share on other sites More sharing options...
ryan Posted May 29, 2013 Share Posted May 29, 2013 Really impressed by all you've put together here Horst, nice work! 1 Link to comment Share on other sites More sharing options...
horst Posted May 29, 2013 Author Share Posted May 29, 2013 Thanks Ryan. It was really massive learning to write this together. In fact I have (re)written it three to four times. Every time I want it to do something from what I don't know the PW-way, I have done it old-schooled first. Then a few days later, I've found informations here in Forum or in the docu that show me how to do it better. And I have rewritten it. Much work, much fun, me.better PW.coder now. ( but also much.much.much.more to learn ) The only downside with that project is that I now don't like my (before LocalAudioFiles) new created (but still not finished) portfolio site any more. I have trashed it and started new from scratch. With it there are new things like sessions, redirects, cookies and, ... yes, again: much.learning! 2 Link to comment Share on other sites More sharing options...
AndréPortuga Posted February 5, 2020 Share Posted February 5, 2020 Its not working on my machine. Whenever I refresh the modules page it shows me a error. Link to comment Share on other sites More sharing options...
horst Posted February 5, 2020 Author Share Posted February 5, 2020 34 minutes ago, AndréPortuga said: Its not working on my machine. Whenever I refresh the modules page it shows me a error. Hhm, this is a very old one, from 2013. Which version of PW do you use? Link to comment Share on other sites More sharing options...
AndréPortuga Posted February 5, 2020 Share Posted February 5, 2020 20 minutes ago, horst said: Hhm, this is a very old one, from 2013. Which version of PW do you use? ProcessWire 3.0.123 © 2020; Is there another way of having a mp3 field? Link to comment Share on other sites More sharing options...
dragan Posted February 5, 2020 Share Posted February 5, 2020 I haven't tried out this module, but often with old modules (pre PW v.3) all you need is to add the PW namespace at the first line of the module. i.e. https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/modules/LocalAudioFiles/LocalAudioFiles.module just replace first line with <?php namespace ProcessWire; then refresh modules and try again. If that doesn't work, you should post the error messages you see. Link to comment Share on other sites More sharing options...
horst Posted February 5, 2020 Author Share Posted February 5, 2020 You can search like this via google: https://www.google.de/search?source=hp&ei=pdw6XtWCNbD4qwGGpYrQDA&q=site%3Aprocesswire.com+mp3&oq=site%3Aprocesswire.com+mp3&gs_l=mobile-gws-wiz-hp.3...3099.24029..29059...0.0..0.133.2617.5j19......0....1.......0..46i131i275j0i131j0j46i131j46.4qJhHOpUkyQ#sbfbu=1&pi=site:processwire.com mp3 Then you will get a list, possibly with a link to an inputfield, but definetly to some useful information. Link to comment Share on other sites More sharing options...
AndréPortuga Posted February 5, 2020 Share Posted February 5, 2020 I Just created a field using file type. In supported extensions I putted mp4 and mp3, and it worked well. Thank you, btw... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now