I am using:
http://forum.coppermine-gallery.net/index.php?topic=29104.0to made this mod for my site.
http://www.ehmongmusic.comI am using CPG 1.14.12 to add this modification so I am not about the location on other version of CPG
This modification will allow users to send ecard with audio. Will not actually send someone the audio file. It will just send them a ecard with a picture link that link them back to your site where the music is at.
included picture are the preview and the image "music4you.gif" I use to show instead of audio on the card.
Open ecard.php
Go to line 65 find:
if (!is_image($row['filename'])) cpg_die(ERROR, $lang_ecard_php['error_not_image'], __FILE__, __LINE__);
replace with:
//Adding audio ecard so you can send ecard and linking them back to the site
if (!is_image($row['filename'])) {
if (!is_audio($row['filename'])) {
cpg_die(ERROR, $lang_ecard_php['error_not_image'], __FILE__, __LINE__);
}
}
Go to line 130 find:
$message = template_eval($template_ecard, $params);
Before that add:
//Replace image with a picture to tell user they have a music ecard
if (is_audio($data['p'])) {
$myimage = '<img src="http://localhost/coppermine/music4you.gif" border="0">';
//print_r($template_ecard);
$template_ecard = str_replace('<img src="{PIC_URL}" border="1" alt="" />', $myimage, $template_ecard);
}
Go to line 212 find:
starttable('100%', $lang_ecard_php['preview']);
before that add:
//Replace image with a picture to tell user they have a music ecard
if (is_audio($data['p'])) {
$myimage = '<img src="http://localhost/coppermine/music4you.gif" border="0">';
//print_r($template_ecard);
$template_ecard = str_replace('<img src="{PIC_URL}" border="1" alt="" />', $myimage, $template_ecard);
}
Close ecard.php
Now open displayecard.php
Go to line 62 find:
// Parse template
echo template_eval($template_ecard, $params);
before that add:
//Replace image with a picture to tell user they have a music ecard
if (is_audio($data['p'])) {
$myimage = '<img src="http://localhost/coppermine/music4you.gif" border="0">';
//print_r($template_ecard);
$template_ecard = str_replace('<img src="{PIC_URL}" border="1" alt="" />', $myimage, $template_ecard);
}
Besure to change the location of the image.
For my case it is:
http://localhost/coppermine/music4you.gif
to where ever you put your image.