Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Using External MP3 Player  (Read 2557 times)

0 Members and 1 Guest are viewing this topic.

briandelshasta

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Using External MP3 Player
« on: September 26, 2007, 07:17:00 am »

Here's the issue, I'd like people to be able to play an mp3 into their .mp3 associated player.  This will allow them to rate and comment on the mp3 without worrying about the page refresh.  Has anyone done this.  Maybe it's possible to add a link on the image(mp3) view page which dynamically creates a direct link to the .mp3 file (instead of the database location as per the e-card url)?  Any ideas?
« Last Edit: September 26, 2007, 09:17:05 am by GauGau »
Logged

briandelshasta

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Using External MP3 Player
« Reply #1 on: September 26, 2007, 07:54:22 am »

Here's an update, I'm trying to change the URL: link under file information to a direct link to the mp3 file.
I'm thinking this is the line to edit in displayimage.php:
    // Create the absolute URL for display in info
    $info[$lang_picinfo['URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';


Any ideas what to change?
Thank you.
Logged

briandelshasta

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Using External MP3 Player
« Reply #2 on: September 26, 2007, 08:51:55 am »

Nevermind, I figured it out...thought I'd document here in case anyone else was interested.

Edit displayimage.php:

Add these lines:
    $path_to_pic1 = $CONFIG['fullpath'];
    $path_to_pic2 = $CURRENT_PIC_DATA['filepath'];
    $path_to_pic3 = $CURRENT_PIC_DATA['filename'];

Modify the line that immediately follows // Create the absolute URL for display in info:
    $info[$lang_picinfo['URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($path_to_pic1) ."/". "$path_to_pic2" ."$path_to_pic3".'" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($path_to_pic1)."/". "$path_to_pic2" ."$path_to_pic3" . '</a>';

That's it!
Changes URL link to a direct link to the mp3 file, which opens in an external player.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.