• Resolved crwhite57

    (@crwhite57)


    Ok for the ones that are self hosting there site I have created a way to do a playlist that will not slow your system down using Audio Album and a plugin called Code Snippets Extended. Using these 2 plugins you can create a song list or album that will load ALL the songs in a directory on your hard-drive and give the option to play a single song from that list.

    Demo go to [link removed] to see my Remix list and how it works. I will let you know when I finally have it refined to get the tags from the files to list it better.

    First get and install Audio Album, then get Code Snippets at https://ww.wp.xz.cn/plugins/code-snippets-extended/

    now in code snippet create 2 snippits like this.

    1 plays the music I named mine Play Songs

    <?php
    $title=$_POST[“title”];
    $writer=$_POST[“writer”];
    $fname=$_POST[“fname”];
    ?>

    <?php echo do_shortcode(‘[audiotrack autoplay=”on” mp3=”http://www.pegasussal.com/remixs/&#8217;.$fname.'” title=”‘.$title.'” songwriter=”‘.$writer.'”]’);?>

    second one I names Remix songs( this one you just change the directoy location for the one you want in this listing.

    <table><tbody>
    <?php
    $id = “0”;
    /* Change this to the drive and directory of you songs for that album*/

    $dir = ‘E:\Club Music\DJ Music\Remix\Up Beat Dance Songs’;
    $files1 = scandir($dir);
    foreach ($files1 as $value) {
    ($id=$id+’1′);
    if ($id > ‘2’){?>
    <tr><td><?php echo $value?></td><td><form action=”../playing-your-song” method=”post”><input name=”title” type=”hidden” value=”<?php echo $value?>” /><input name=”writer” type=”hidden” value=”<?php echo $value?>” /><input name=”fname” type=”hidden” value=”<?php echo $value?>” /><input type=”submit” value=”Play” /></form></td></tr>
    <?php ;}
    }
    ?>
    </tbody></table>

    Now just create a page for the song list and one I call Now playing
    Put the first snippet in the (Now Playing) page and the second one in the page that is going to show your play list. Now every time you add or remove a song from that song directory, it will automatically be added or removed.

    https://ww.wp.xz.cn/plugins/audio-album/

Viewing 1 replies (of 1 total)
  • Plugin Author cubecolour

    (@numeeja)

    This looks like it might be a useful technique.

    Although I think using code snippets extended is probably fine for a prototype or proof of concept, I would suggest putting the functionality into a custom plugin rather than including PHP into the page content, which feels rather kludgy to me.

    I am concerned about the possible implications of linking to a site which is making MP3s online without knowing whether permission to distribute them has been granted. For this reason I’m afraid I have had to put my moderator hat on and remove the link you posted to your site.

    This is a support forum rather than a repository for tips, so your own blog would probably be the best place to post an updated version of this when adding it it.

Viewing 1 replies (of 1 total)

The topic ‘Play List’ is closed to new replies.