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] 2   Go Down

Author Topic: Generating an email with 'my favourite pics'  (Read 23829 times)

0 Members and 1 Guest are viewing this topic.

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Generating an email with 'my favourite pics'
« on: September 24, 2005, 12:49:59 am »

Is there a mod that will generate an email from the person who has put some picture in their folder, as well as downloading the zip, to ask me about the pictures? I have called it 'My Lightbox' not My Favourites (www.stockshoots.co.uk, probably offline).

Stock
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Generating an email with 'my favourite pics'
« Reply #1 on: September 24, 2005, 09:47:14 am »

edit zipdownload.php, find
Code: [Select]
include ( 'include/archive.php');and add after it (in a new line)
Code: [Select]
require('include/mailer.inc.php');Find
Code: [Select]
$zip->filedownload('pictures.zip');and add after it (in a new line)
Code: [Select]
$sender_name = get_post_var('sender_name', USER_NAME ? USER_NAME : (isset($USER['name']) ? $USER['name'] : ''));
$sender_email = $USER_DATA['user_email'];
$message = $sender_name . '('.$sender_email.') has downloaded these files:\n\r';
foreach ($filelist as $key => $value) {
    $message .= $value.'\n\r';
}
$result = cpg_mail($CONFIG['gallery_admin_email'], 'Lightbox download from'.$sender_name, $message, 'text/html', $sender_name, $sender_email);
Haven't tested this, I'm coding from the top of my head. Please report if this works.
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #2 on: September 24, 2005, 03:51:54 pm »

Gau gau,

Thanks very much! I've tried this but nothing. However, I wonder if I should be adding an email address anywhere, such as in mailer.inc.php?

Stock

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Generating an email with 'my favourite pics'
« Reply #3 on: September 24, 2005, 06:57:27 pm »

for testing purposes, use this bit of code:
Code: [Select]
//$sender_name = get_post_var('sender_name', USER_NAME ? USER_NAME : (isset($USER['name']) ? $USER['name'] : ''));
//$sender_email = $USER_DATA['user_email'];
//$message = $sender_name . '('.$sender_email.') has downloaded these files:\n\r';
//foreach ($filelist as $key => $value) {
//    $message .= $value.'\n\r';
//}
$result = cpg_mail('you@yourdomain.tld', 'Lightbox download test', 'just a test', 'text/html', 'your name', 'you@yourdomain.tld'l);
print $result;
die();
- only change you@yourdomain.tld to your actual email address
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #4 on: September 24, 2005, 07:12:09 pm »

Okay, I have put in:
/**new code from here**/
$sender_name = get_post_var('sender_name', USER_NAME ? USER_NAME : (isset($USER['name']) ? $USER['name'] : ''));
$sender_email = $USER_DATA['user_email'];
$message = $sender_name . '('.$sender_email.') has downloaded these files:\n\r';
foreach ($filelist as $key => $value) {
  $message .= $value.'\n\r';
}
$result = cpg_mail('admin@stockshoots.co.uk', 'Lightbox download test', 'just a test', 'text/html', 'your name', 'admin@stockshoots.co.uk'l);
print $result;
die();
/**new code above here **/

and get a parse error at line 78  - that is:
line with just } on before &result.


thanks for your continued help.

Stock
I can't see what's missing
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Generating an email with 'my favourite pics'
« Reply #5 on: September 25, 2005, 06:10:43 pm »

do as I suggested and comment out the above part. If you don't, try this:
Code: [Select]
$sender_name = get_post_var('sender_name', USER_NAME ? USER_NAME : (isset($USER['name']) ? $USER['name'] : ''));
$sender_email = $USER_DATA['user_email'];
$message = $sender_name . '('.$sender_email.") has downloaded these files:\n\r";
foreach ($filelist as $key => $value) {
    $message .= $value."\n\r";
}
$result = cpg_mail($CONFIG['gallery_admin_email'], 'Lightbox download from'.$sender_name, $message, 'text/html', $sender_name, $sender_email);
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #6 on: September 25, 2005, 06:33:27 pm »

Gau gau, sorry I got it wrong before. However, fraid that doesn't work and now I have tried your next bit, all it does is download the zip file as normal, nor sign of sending email. Here is the text I have just in case:

Stock


$zip->filedownload('pictures.zip');

/**new code from here **/
$sender_name = get_post_var('sender_name', USER_NAME ? USER_NAME : (isset($USER['name']) ? $USER['name'] : ''));
$sender_email = $USER_DATA['user_email'];
$message = $sender_name . '('.$sender_email.") has downloaded these files:\n\r";
foreach ($filelist as $key => $value) {
    $message .= $value."\n\r";
}
$result = cpg_mail($CONFIG['gallery_admin_email'], 'Lightbox download from'.$sender_name, $message, 'text/html', $sender_name, $sender_email);
/**new code above here **/}
?>
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Generating an email with 'my favourite pics'
« Reply #7 on: September 25, 2005, 07:05:40 pm »

Does email work from your gallery? Can you send ecards, for example?
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #8 on: September 25, 2005, 07:49:14 pm »

Thanks, Yes it does. I had taken this facility off. However, while it doesn't quite do what I want, I did wonder looking at this, is it possible to have all pics from lightbox sent via ecard. Note ecard does not put in the admin address automatically and I need to use this for professional enquiries, not so people can send each other pretty images, if you see what I mean. I hope that makes sense. I do like the way it slots the image into an email in the way I wanted (though perhaps without the stamp image but I am sure I can work that one out).

I wondered, since the ecard coding contains some of what this would need it might be adapable? It would be a case of sending the images from the favourites to the ecard, adapted to incorporate as many images as needed. Then this and its images could be send in the email used by ecard.

I'd also like to have an email address already typed in in the ecard box.

I know this is all possible and realise it's away from coppermine normal but if you have any idea I'd be grateful.

Thanks both for all your help and any suggestions.

Stock
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Generating an email with 'my favourite pics'
« Reply #9 on: September 25, 2005, 08:01:47 pm »

I'm not sure exactly what you are trying to do. I understand the part about writing to you about a picture but not about the zipped stuff.

It could be possible to modify ecard to have the user send the mail to you. In 1.4, there is a report to admin function that is based on ecard code.
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #10 on: September 25, 2005, 08:56:40 pm »

TranzDance,

Yes, I am looking into that at the moment. I wanted to change the TO: box to say:
To: info at stockshoots or something, then I could put a link straight to the right email. But I need the 'submit' (ie, send the ecard) straight to that email address. Could you point me to the bit that I could make that work?

Thanks very much

Stock
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Generating an email with 'my favourite pics'
« Reply #11 on: September 25, 2005, 09:12:40 pm »

You can download v1.4 and check out report_file.php. You would also need to go through include/themes.inc.php (search for 'report').
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Generating an email with 'my favourite pics'
« Reply #12 on: September 25, 2005, 09:32:27 pm »

Stock,

This might be going off in a tangent a bit, but what it really sounds like to me is that you need a client-side shopping cart that doesn't post the typical price and shipping costs, but just lists selected items and details with a submit button that sends the entire form to you.  Creating a clone of the "ecard" button as TranzNDance suggested and linking it to a stripped and renamed ecard.php file would be a start.  You could then use this file to build a client-side inquiry cart. (note however, a client-side cart might be limited to less than 20 items at a time as all information must be stored in a cookie on the client's machine.)

Unfortunately, I'm not adept at coding so I can't help you any further, but I wanted to share my thoughts with you on this alternative approach.

A google search on the internet for "free client-side shopping cart" produces a number of listings which may interest you.

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #13 on: September 25, 2005, 09:47:27 pm »

thanks Dennis, I will look into that.

I have got the ecard looking a bit more like I want but it doesn't now send me emails and I really would like a link that gives you th choice, either
1) download zip files

and

2) send to stockshoots as an ecard

Then they have the choice of both. So right now I just need to work out

1) how to get the ecard sent to me
2) how to get the sit to add images from 'My favourites' to the ecard box
3) designing the ecard box to take more than one image.


But as you say, I will look into a readymade lighbox. I know ecommerce has one so maybe this would be handy.

Thanks

Lindsey
Stock
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Generating an email with 'my favourite pics'
« Reply #14 on: September 25, 2005, 09:58:43 pm »

ohhh... I didn't realize lightbox was a photo shopping cart. Are you aware of the paypal cart that Casper developed for coppermine?
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #15 on: September 25, 2005, 10:03:12 pm »

Sorry to confuse you. LIghtbox normally isn't a shopping cart but I think you could adapt a cart to act as a lightbox as long as it shows the images.

cheers

lindsey
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #16 on: September 25, 2005, 10:05:07 pm »

but I would like to see casper's card. Is this available for download?

L
Stock
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Generating an email with 'my favourite pics'
« Reply #17 on: September 25, 2005, 10:08:06 pm »

TranzNDance,

Unfortunately, Casper's mod links directly to paypal and is not a client-based shopping cart.  

Stock,

What it sounds like to me is that you want to put a link on your Favorites (Lightbox) page that does what IE's FILE+SEND+Page By Email option does.  The difference being that you want to hardcode the addressee's email address as yours.  Here's a link that you might find interesting: http://www.godandscience.org/general/mailpage.html

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Generating an email with 'my favourite pics'
« Reply #18 on: September 25, 2005, 10:25:37 pm »

Dennis,

You are right! I've just noted that re paypal. The other thing about them also is I have heard it said by a web designer I know that he hates when the only option you have is to pay by paypal and I agree with him as I think they completely overcharge and are becoming an automony. Aren't they also part of ebay? So it's more money in ebay's pocket. But design wise you are right as you go to their page from the basket.

Thatnks for the final bit that might be the way forward. I suppost to give the option of send ecard to downloap as zip file all I have to do is add a line in the top bar of the lightbox to give an option of sending as an ecard. the problem is the code that puts those images into the ecard.

It might be that using a readymade cart is the solution to that rather than me trying to work out the code. (I'm not a programmer so it's a miracle each time I get success with my mods!)

I'll keep you posted!

Lindsey
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Generating an email with 'my favourite pics'
« Reply #19 on: September 25, 2005, 10:29:53 pm »

Lindsey,

I'm working out the kinks on my client-based paypal mod for coppermine.  Hopefully, I will have it out in a week or two.

But do check out that link I posted above to send the entire HTML page of your "lightbox" as an email.   This would include all of the thumbnail images in the page the same way IE does it.
The drawback I see with this, however, is if the images are spread out over different pages/tabs.  (it the sender has more images than will fit in one page).

Dennis
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.
Pages: [1] 2   Go Up
 

Page created in 0.025 seconds with 19 queries.