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: MOD to allow audio as ECARD  (Read 9155 times)

0 Members and 1 Guest are viewing this topic.

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
MOD to allow audio as ECARD
« on: July 18, 2007, 01:02:11 am »

I am using: http://forum.coppermine-gallery.net/index.php?topic=29104.0
to made this mod for my site.

http://www.ehmongmusic.com

I 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:

Code: [Select]
if (!is_image($row['filename'])) cpg_die(ERROR, $lang_ecard_php['error_not_image'], __FILE__, __LINE__);
replace with:

Code: [Select]
//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:

Code: [Select]
$message = template_eval($template_ecard, $params);
Before that add:

Code: [Select]
//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:

Code: [Select]
starttable('100%', $lang_ecard_php['preview']);
before that add:

Code: [Select]
//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:

Code: [Select]
// Parse template
echo template_eval($template_ecard, $params);

before that add:

Code: [Select]
//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:

Code: [Select]
http://localhost/coppermine/music4you.gif
to where ever you put your image.
 
« Last Edit: July 18, 2007, 10:12:23 am by GauGau »
Logged

jerrykemic99

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: MOD to allow audio as ECARD
« Reply #1 on: March 09, 2011, 10:53:07 am »

Well it seems seem it supports e-cards only not the audio file?Am i all right?
Logged
 *Link Removed*
 *Link Removed*
 *Link Removed*
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.