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 3 4 5 ... 7   Go Down

Author Topic: [Unsupported]: Email images to your gallery  (Read 149346 times)

0 Members and 1 Guest are viewing this topic.

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
[Unsupported]: Email images to your gallery
« on: July 17, 2006, 08:30:16 am »

The magic of GD and a few scripts I gathered/merged.

(http://gallery.rphmedia.net/albums/pixlog.jpg)

Email an image (attatchment) to "cam AT rphmedia DOT net" - come back to this post/thread and refresh (may have to refresh twice; nature of this example.  The hack in the Sample Gallery appears upon entering :) )

I have to work out some details and I'll post everything after performing some more tests.

This could be used for simply emailing images to your gallery, cell phone pics/video, even documents or music.  There are filesize limits (where more testing needs to be done) and a couple of glitches here and there. 

Obviously, if more than one emails, your emailed image may not appear here, but if you go to the Sample Gallery (instead of refreshing here - but do it quickly because if someone refreshes ((or even reads this topic)), then your image will not be here as the emails are deleted [I turned this off for now] as soon as they're probed), you should see your image(s) under the album "Emailed Pix".

For now, definitely don't send an image >1MB.  If this is abused in any way, I'll have to shut it down, goes without saying.  And I also ask you - please don't send anything that could be offensive to others.  Thanks.
« Last Edit: August 31, 2008, 10:33:41 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Potential mod/hack - Email Pix
« Reply #1 on: July 17, 2006, 08:35:45 am »

Looks promising - I'm looking forward to see your code contribution.

Joachim
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Potential mod/hack - Email Pix
« Reply #2 on: July 17, 2006, 09:23:46 am »

Realy nice job ....
waiting for your final code :)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Potential mod/hack - Email Pix
« Reply #3 on: July 17, 2006, 02:09:07 pm »

Yeah Ron,  ;D

I'm nice to read you again with a new terrific Mod/Hack  ;)
Me too, i'm waiting for your code !

PYAP
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Potential mod/hack - Email Pix
« Reply #4 on: August 20, 2006, 09:41:31 pm »

I hope to get to this soon ... been really busy this summer.

Be back later ! 

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Potential mod/hack - Email Pix
« Reply #5 on: August 26, 2006, 12:31:26 pm »

OK, here are the files needed for this mod.

One of the first things you'll have to do is create an album that 'Visitors' can upload files to - retrieve the id # of the album. ((if you don't like the idea of "Visitors can upload files" turned on [which turns on the "upload link"], you can always remove the upload link itself using an appropriate plugin. I just realized that all you have to do is set "Visitors can upload files" at the properties of the album (you don't need to turn anonymous group upload on).  You can also enable "Upload Requires Approval". I haven't had the time to figure out how to be notified, but the approval process works.

Create a folder off of your 'albums' folder to store the emailed items - this example uses 'pix' as the folder name.

Create or use an existing email address for the php file to read (supports either imap or pop3).

Configure a new anycontent?.php file (this example uses the name 'anycontent1.php').  This will silently include the file needed to fire the email read when entering the gallery.

Input your variables into the 'newcam.php' file (host, username, login, filepath, album#, folder).

I think that's it.  It works every time.  I believe that there are filesize / attachment limits, but I'm sure that it's reliant on individual hosts.

I will answer questions best I can. 

My first post in this thread utilizes GD, a php embedded (imposter) jpg file and a log file and is a separate entity used just for show (in other words, not really related to Coppermine structure).  If you'd like that feature, you can PM me and I'll be happy to give you those scripts, but limited support - just don't have the time lately.

EDIT: Typo in attachment - didn't affect performance
« Last Edit: January 18, 2007, 12:32:20 pm by rphMedia »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Potential mod/hack - Email Pix
« Reply #6 on: August 27, 2006, 09:42:20 am »

great, have to give this a try asap  ;D

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
Re: Potential mod/hack - Email Pix
« Reply #7 on: August 27, 2006, 10:13:56 am »

Thanks for this
.
Got it and tried to "install".

Any Idea of where to put the 3 files?

anycontent1 into the root?

but where to put the other2?

How to invoke the check for new "mail"?
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Potential mod/hack - Email Pix
« Reply #8 on: August 27, 2006, 02:30:58 pm »

Thanks for this
.
Got it and tried to "install".

Any Idea of where to put the 3 files?

anycontent1 into the root?

but where to put the other2?

How to invoke the check for new "mail"?

Search the boards for configuring anycontent.

And yes, all files to the root.  For more advanced, they can actually be placed anywhere and modify paths as needed.

The email is checked (once anycontent is configured) when entering the gallery - home page.  Understand also that the email(s) is/are deleted once the script executes.  If you don't want the emails deleted, remove these lines:

Code: [Select]
imap_delete($mbox,$jk); // sends to trash, if available
imap_expunge($mbox); // totally deletes

I just (going by my instruction above to test) put this in my personal gallery --- worked out of the box :)

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Email images to your gallery
« Reply #9 on: August 27, 2006, 04:49:38 pm »

Hi Ron,

So fine MOD  ;D

About Anycontent, maybe you can create a new "case" versus "anycontent" !
For exemple your MOD is about emaling into CPG ! Create a new "case" with the name : "receivemail".
Find in INDEX.PHP :
Code: [Select]
case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }
                        flush();
                        break;

Just after add :
Code: [Select]
case 'receivemail':

                if ($cat == 0) {
                    include('RPHMEDIA-FILE.php');
                }
                flush();
                break;

PYAP
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Email images to your gallery
« Reply #10 on: August 27, 2006, 05:39:38 pm »

Yeah, I wanted to avoid editing index.php, but yes, definitely an option  :)

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Email images to your gallery
« Reply #11 on: August 27, 2006, 11:36:33 pm »

Hey Ron, Morning...

I just try your MOD, and post one picture on your Galery  ;D
(http://gallery.rphmedia.net/albums/pix/thumb_ruine-st-barnabe_3_19-05-2006.jpg)
http://gallery.rphmedia.net/displayimage.php?pos=-181
Work very fine.
  But us, your visitors, can'nt add any info about our pictures ! C'est la Vie :-)

PYAP
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Email images to your gallery
« Reply #12 on: August 28, 2006, 03:37:25 pm »

I don't understand what you would like me to do.  No, this mod doesn't have that capability.

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Email images to your gallery
« Reply #13 on: August 28, 2006, 04:16:49 pm »

Quote
I don't understand what you would like me to do.  No, this mod doesn't have that capability.
Exemple : my Object email become my Title picture in Coppemine
              and why not Body email, will be the file description.

I just discored a Fatal error: Call to undefined function: imap_open() in attachmentread.class.php on line 42 on one of my webs.
On other, your MOD work fine  ???

PYAP
« Last Edit: August 28, 2006, 07:14:17 pm by PYAP »
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Email images to your gallery
« Reply #14 on: August 28, 2006, 09:41:17 pm »

imap_open() ---- Probably need to upgrade your php version on that server.

As far as reading the body of an email (to add a description to the image), I'm sure it could be done, but I don't have the time right now  :P

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Email images to your gallery
« Reply #15 on: August 30, 2006, 11:21:18 am »

Ron,

1, imap_open is perhaps not present on my host, I do not know!
In this case, how to turn around this fatal-error, to employ your MOD?
Secondly, some emails dispatched to my gallery towards emailpix(at)pays-dignois.com arrived on my emailbox!.
Unfortunately, nothing is recovered by my Coppermine  ???

PYAP

ps:
It seems to me that there is no update of your pixlog.jpg file, that one sees in your first post.
« Last Edit: August 30, 2006, 11:30:02 am by PYAP »
Logged

rphMedia

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 515
  • ***muvipix.com***
    • muvipix - Music | Video | Pictures
Re: Email images to your gallery
« Reply #16 on: August 30, 2006, 01:08:33 pm »

Hi PYAP,

Remember,
Quote
My first post in this thread utilizes GD, a php embedded (imposter) jpg file and a log file and is a separate entity used just for show (in other words, not really related to Coppermine structure).  If you'd like that feature, you can PM me and I'll be happy to give you those scripts, but limited support - just don't have the time lately.
If you send an email to "cam AT rphmedia DOT net" and refresh here first, the email attachment will be in the post.  If you go to the sample gallery first, then the attacment will be inserted in the gallery and not this post.  Sorry for the confusion.

With the exception of your password, show me the scripts you're using and how you implement them (ie, how is the include call used) and where they are located (ie, paths ... root?).  Also make sure your email host supports - most do.  Maybe just try another email.  I see that it's Album="35"?  Hope you changed that  :)

Don't despair, we can get it working.  I may not respond today, but I'll be around later.

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Email images to your gallery
« Reply #17 on: August 30, 2006, 03:46:18 pm »

I'm getting the same error as PYAP -
Quote
Fatal error: Call to undefined function: imap_open() in /home/content/B/i/l/BillyBullock/html/test/attachmentread.class.php on line 49

My PHP version is 4.3.11
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Nibbler

  • Guest
Re: Email images to your gallery
« Reply #18 on: August 30, 2006, 03:47:18 pm »

You need the imap extension installed to be able to use the imap_* functions.

http://php.net/imap
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Email images to your gallery
« Reply #19 on: August 30, 2006, 04:15:29 pm »

Thanks Nibbler. I just called (I know I'm going to catch flack for saying this but...) GoDaddy and imap_* functions aren't installed and the tech support couldn't offer a reason why. I'll email them which usually gets a better answer. I do have the option to upgrade to a configuration that includes PHP 4 & 5 but doubt that these functions will be installed automatically. I also checked Gmail and it's not installed either- http://mail.google.com/support/bin/answer.py?answer=10339. A Google search shows a number of links to make it work with imap but I'm looking for a solid solution and not having to deal with email hacks. So unless there is a workaround, I doubt I'll be able to use this mod.  :'(
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision
Pages: [1] 2 3 4 5 ... 7   Go Up
 

Page created in 0.043 seconds with 20 queries.