Hello,
I have released a simple add on for Gallery that allows Custom Postcards to be sent to the email address' of your choice. It adds a new link above each photo in your gallery and has a super simple install.
This version DOES NOT require MySQL and will take on the look of your current gallery.
(it uses <!-- BBCode Start --><A HREF="http://textdb.sourceforge.net" TARGET="_blank">TextDB</A><!-- BBCode End -->)
You can download your very own copy here:
<!-- BBCode Start --><A HREF="http://gocompupro.com/muggles/mod.php?mod=downloads&op=viewdownload&cid=5" TARGET="_blank">Postcards for Gallery</A><!-- BBCode End -->
I have a MySQL version for the phpWebSite gallery hack available, but NO nuke version, since I do not use nuke... so don't ask. :evil:
I would gladly host a nuke version if someone creates one.
Also, there is nothing built-in to this version that will automatically remove old cards...
for now, I created an admin page for you to manually delete cards. :???:
muggles
Posts: 22
[Question:]
My Postcards are not being sent, what's wrong?
[Answer:]
The PostCard Mod uses php's built-in mail function to send cards, as set-up in your installs php.ini.
You would need to define some variables in your php.ini
If running win* you need to set these two:
SMTP = someserver.com;
sendmail_from =
;
and if running *nix just this one:
sendmail_path = /path/to/sendmail;
Good Luck
Posts: 20
I tried to install the text version but it couldn't create all the db files because of permissions.
This is the error code i get when i run the installation page:
Warning: fopen("gallery_cards_database.dat", "w+") - Permission denied in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 146
When I send a card on the pick up page i get a broken image with the following error:
Warning: getimagesize: Unable to open '' for reading. in /home/pavochon/public_html/gallery/gallery_cards_pickup.php on line 36
The email doesn't get sent neither. I can't find the php.ini. I am running on unix...
When i try to rebuild the database I get a never ending page with an error like this:
Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 612
Warning: fopen("gallery_cards_database.idx", "w+") - Permission denied in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 613
Warning: flock(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 614
Warning: flock(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 615
Warning: rewind(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 617
Warning: ftell(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 864
Warning: fread(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 865
Warning: fread(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 893
Warning: ftell(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 864
Warning: fread(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 865
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 629
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 632
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 639
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 632
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 639
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 632
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 639
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 632
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 639
Warning: feof(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 632
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/pavochon/public_html/gallery/gallery_cards_tdb.inc.php on line 639
Please help. This would be a nice feature.
Dave
Posts: 487
Laugh, fun! You probably didn't need to post quite so many of those :lol:
Anyhow, you are indeed hitting permissions problems. Php sucks
in that it doesn't nicely tell you to check your permissions but spits
out a crappy error like that
You need to verify that httpd daemon has read and write access to your
gallery folder, not just the albums one and such as the cards plugin
dumps all files into the main directory which is a little messy *nudge muggles*.
Fix that and it should work fine, it is for me.
Posts: 20
Opps. I am sorry about that. Shame on me :roll:
Your suggestion sounds to me like I need telnet to do this? I only have ftp and I didn't find any file called httpd daemon. I'll look again, let me know if you can give me a little simpler explanation. Thanks for taking the time to help me.
Perhaps I have to make the gallery setup folder, .htaccess and config.php writable when I run the installation? Like ftp users have to do when they run the setup for the gallery itself?
Dave
Posts: 22
Dabitz,
Sorry for the delay, wife and I went away for our 15th anniversary :smile:
1] download this archive of an empty card database:
http://gocompupro.com/muggles/downloads/gallery_cards-emptydb.zip
2] extract into your gallery folder with the rest of the postcard files
3] give the files writable permissions (ask your admin)
4] run the install again
:???:
and, my bad for not spending more time on this version, I use the MySQL version
which has none of these problems. I just thru this version together real quick for others who may want postcards and have no MySQL daemon running (and was curious about that TextDB MySQL look-alike database thingy).
Tomorrow I'll release the stand-alone MySQL version i guess.
muggles
Posts: 20
Oh boy! Congratulations! 15 years is a long time... I hope you had fun... That is a good excuse for the delay, I do have an excuse for my rush as well. I am having a baby within 5 weeks!!! Can't believe it yet... our 1st one... :smile:
Everything went smoothly on the installation great job. I really wish i would know how to write php code myself.
I still have one little problem. The email doesn't get sent. I know I have to do this:
and if running *nix just this one:
sendmail_path = /path/to/sendmail;
But where do I do this change? Is it within a gallery file? Or a card file? I am using phpBB2 board which works very well and it sends emails well, so this should work for me too. php.ini? Is that a server php installation file? I am on a shared unix environment so php is already installed on my server. Again the bulletin board has no problem sending emails.
Let me know and congratulations again! :lol:
Posts: 22
oh my,
You can open gallery_cards_send.php in an editor and..
replace:
// mail($PCto, $PCsubj, $PCbody, $PCheaders);
with:
mail($PCto, $PCsubj, $PCbody, $PCheaders);
i.e. remove the slashes "//" from the beginning of the line. HAHAHA
omg
I just uploaded the fixed version. download again if you want the new fixed gallery_cards_send.php
omg, I can't beleive I left it like that. stuff happens :smile:
Congrats!
Posts: 487
Oooh, standalone mysql, that would be nice :wink:
Posts: 22
tada, <!-- BBCode Start --><A HREF="http://gocompupro.com/muggles/mod.php?mod=downloads&op=viewdownload&cid=5" TARGET="_blank">download standalone MySQL Postcards here!</A><!-- BBCode End -->
Quick How To:
1] create your MySQL database
2] Edit gallery_cards_config.inc with your database info
3] execute gallery_cards_install.php to create tables
4] Enjoy!
:grin: :grin: :grin:
Posts: 2
thx
evey thing worked for me
<!-- BBCode Start --><A HREF="http://www.funvill.com" TARGET="_blank">funvill</A><!-- BBCode End -->
Posts: 27
Thanks!!
Installed mySQL version, works/looks great!!
-v
Posts: 140
HI,
I would really like this script to work and it does to a point. It seems that I don't know how to connect the database as I get the following error:
Warning: Failed opening 'gallery_cards_config.inc' for inclusion (include_path='') in /home/agatka/public_html/galeria/gallery_cards_dbconnect.php on line 9
Unable to select database
Can someone please help me?
Thank you in advance.
Posts: 140
Still waiting. I know you guys could help me afterall you did it.
Please, please ........ I would realy like this to work
Thanks :smile:
Posts: 3474
Hi Agatka.
It cannot find the MySQL database you've (hopefully) specified (or it doesn't have permission). You have to create a new database (either with mysqladmin or phpMyAdmin) and specify the correct database/mysql user/password to the program (I just looked throught the code (spiffy!)... seems it goes into gallery_cards_config.php).
(muggles, is there an FAQ for these questions on your site to refer people to?)
Good luck,
-Beckett (beck@beckettmw.com)
Posts: 140
Thanks,
But I have done all of the above. It just wasn't connecting that way, so what I did is get rid of the gallery_card_config.php altogether and just used the mysql_connect in the gallery_card_dbconnect and it worked. Guess the config file is supposed to make it easier but didn't for me :smile:
Agatka
Posts: 19
I tried installing the standalone my SQL version. I inserted my database info and password. however got the following errors:
This is what I have on line 23:
$cards_home_url = $gallery->app->http://www.mydomain.com/gallery/; /* Your sites URL */
$cards_sitename = $gallery->app->my gallery; /* Your Site Name */
Could anyone help decipher what I did wrongly? Thanks.
Posts: 16
i've try those
gallery_cards03_mySQL-standalone.zip &
gallery_cards02-standalone.zip
but the problem is the same when running step
> Point your browser to http://www.your_site.com/gallery/gallery_cards_install.php
------------
Warning: Failed opening '/home/fay/public_html/gallery/gallery_cards_install.php' for inclusion (include_path='') in Unknown on line 0
Posts: 3474
fay,
Your include path is hosed. Edit your php.ini file and change your include path to be at least the current working directory ("."):
include_path "."
Then restart your webserver to effect the changes.
-Beckett (
)
Posts: 19
any work around for the errors I encountered?
Posts: 16
i was add this line to my php.ini
include_path = "."
then restart the httpd...
i also try to put full path of gallery but same prb..
still got same error msg.. any idea
thanks
Posts: 75
All,
I'm working on a postnuke module called "GalleryCards" based upon the standalone Postcards code base. I'm not a programmer, but I've been able to complete the basic user functions. The postnuke module now allows users to send and pickup postcards. I'm still working on the admin portion, which will allow postnuke admins to list all postcards and to add/delete them from the database. Also, the color customization still doesn't quite work.
When I'm done, I'll post the code up for download.
Posts: 11
Hi
I use the cards stand alone. I have no problems with sending ecard, but i get the wrong link to ecard.
I have albums with pictures in the gallery folder. (gallery/albums)
But the ecards link points to gallery and no picture to show
What should i change?
Im using gallery 1.3.3
Posts: 75
All,
I'm releasing the initial version of the postnuke module called "GalleryCards" based upon the standalone Postcards code base.
Features
Users: send and pickup postcards.
Admin: list all postcards and to add/delete them from the database.
You can download the postnuke module <!-- BBCode Start --><A HREF="http://www.storypath.com/pn/modules.php?op=modload&name=UpDownload&file=index&req=getit&lid=2" TARGET="_blank">here</A><!-- BBCode End -->.
Enjoy! :smile:
Posts: 75
All, I had to update the download for GalleryCards. There was an error in it. If you downloaded it and it doesn't work, I would recommend that you get the latest version. I've updated the download link with the latest file.
Posts: 11
Hi
Your link does'nt work - But I dowloaded it from your homepage.
But need the gallery_cards02-standalone, from muggles. So I tried again.
I couldn't install the files (gallery_cards_database.dat and gallery_cards_database.idx) on my host server.
So I made to empty files in notepad:
gallery_cards_database.dat
gallery_cards_database.idx
Upload to Gallery/
and CHMODE them to 777
and then Point your browser to http://www.your_site.com/gallery/gallery_cards_install.php to create your db files
and then it worked for me.
Just to inform others users if they have the same problem
Posts: 75
Things that I have on the TODO list for the PostNuke module:
1. Clean up the code!!!!
2. Fix the custom color selection javascript in send card
3. Complete the admin functions:
- Clean database (allow for cleaning of cards that are over XX days old in the database)
- Validate (validation of Photo URLs)
- Config (allow/disallow anonymous users, XX days for lifespan of postcards, etc)
Posts: 54
Does anyone have the code to get the "send a postcard" link in the top next to the "print this photo" link (if that link is enabled)?
Thanks!
Posts: 107
For some reason I was unable to get this working until I removed this line from the gallery_cards_send.php and gallery_cards_pickup.php files:
$image_size = getimagesize($this_photo, &$image_info);
Once I removed that line I was able to send a card, before that I kept getting an error...
However, I do not see an image when the card is picked up, is that due to my removing those files?
I also was unable to chmod 777 the .dat and .ibx files...
Babs
Posts: 4
Hello,
I am getting same error unable to connect /home/www/mydoman/gallery/gallery_cards_dbconnect.php on line 9
I have tried what stated above, but no luck, I guess I am not doing something right. Could you please help me stup up this thing.
Thank
Posts: 17
Hi,
I also tried to install the standalone mySQL version, I also get the error;
Warning: Failed opening '/home/blah/public_html/gallery/gallery_cards_install.php' for inclusion (include_path='') in Unknown on line 0
I hacked away for a while with no sucess :cry:
I have thought that it pulls the path to gallery from the global(config), and with my setup (behind a router) it fails as my config file just says "gallery/" then the rest of your postcard code tries to look for a complete path. I am hoping this comment helps others, I couldn't get it to work.....
I'm fairly sure that the path fails in the utils.php file around line 579
Also, is it correct to have the requires have single quotes;
require ('gallery_cards_dbconnect.php'); I thought that might be it,
Any thoughts appreciated,
Regards, Paul
Posts: 11
Yep I did that... Im new to PHP, so I hope this will work with other Gallerys than mine :smile:
1. Delete inline_photo.header from <your-gallery-dir>/html_wrap/
2. Edit view_photo.php from <your-gallery-dir> with your fav. editor
3. On line 341 if you use Gallery 1.3.2 after the Shutterfly code, paste this:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$photo = $gallery->album->getPhoto($GLOBALS["index"]);
if ($photo->isResized()) {
$name = $photo->image->resizedName;
} else {
$name = $photo->image->name;
}
$url = $gallery->album->getAlbumDirURL("full") .
"/" .
$name . "." . $photo->image->type;
$adminCommands .= "<a href=" . $gallery->app->photoAlbumURL . "/gallery_cards_send.php?photo_name=" . $url . ">[send as postcard]</a>";
</TD></TR></TABLE><!-- BBCode End -->
I hope this will do it... If someone can optimize the code, then I'll be happy :grin:
/Agerley
Posts: 11
Ok, good news.... I just updated to Gallery version v1.3.4-cvs-b15, and the code works fine also there... the only difference is that it need to be pasted on line 361 instead. the code needs to be pasted after the shutterfly and fotokasten codes (print service codes).
Good Luck..... :grin:
Posts: 126
Where is the download link? I followed the liink to muggles site and it is the August version.
**********************
Edited: Oops, I was reading about the incorrect version. Can I get pointed to somewhere that has a tutorial on creating a php nuke module? I am going to spend today researching this. The Gallery Cards ad on is GREAT!
One question, does the mod track the number of times a card has been sent and picked up? I need this for a specific purpose.
Debbie
Posts: 3
i have this problem !
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of getimagesize(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/modules/GalleryCards/gallery_cards_send.php on line 233
it got to this with this
$image_size = getimagesize($this_photo, &$image_info);
in gallery_cards_send.php and gallery_cards_pickup.php
what should it do to clear this error ?
do i need to modify php.ini ?
how should i modify and where to modify ?
i do not use ImageMagick for gallery, i only use netpbm is this the reason.
please advise
thanks
Taji
Posts: 126
I had the standalone version working with 1.3.4 and now with 1.3.5B44 and the MySql version I get the cannot connect to error above also, anyone find out what is going on?
I tried both Standalone and MySql versions and get errors with both. I manually installed the dbase and now I get the following error after I create the card and attempt to send.
Warning: Access denied for user: 'apache@localhost' (Using password: NO) in /usr/local/psa/home/mysitepath/gallery/gallery_cards_dbconnect.php on line 10
Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost' (Using password: NO) in /usr/local/psa/home/mysite/gallery/gallery_cards_dbconnect.php on line 10
Unable to select database
Posts: 126
btw, I checked and double checked the database settings including password and they are all correct.
Posts: 10
Hi Agatka - I'm no PHP expert but I had the same error you were getting. I did notice that the file gallery_cards_dbconnect file referenced include file 'gallery_cards_config.inc' when actually it has php ending. I changed the .inc to .php and reran the gallery_cards_install.php page and it went to completion.
Posts: 126
Worth a try! Thanks!
Posts: 126
It worked, but you need both the .php and the .inc
Posts: 114
Anyone tried installing this with PHPNUKE 6.5? I don't see why it wouldn't work!
Have a good one!
Posts: 126
It works, but it doesn't keep the postcard inside nuke. I am using it with 6.8
(I solved the dbase issue by following the advice above. You need both .inc and .php and the files are identical, not the .inc that comes with the non-sql version.)
Posts: 1
muggles,
last year someone asked about an FAQ on muggles' site. Was that ever posted? I'd like to see that before attempting to install.
Posts: 107
Hi, I've recently upgraded to v1.4pl and have finally gotten this ecard hack to work...
I'd like to center the tables however... I've tried several different ways of adding the center tag but none seem to work... I'd really rather not have everything way over to the left of the browser page...
How does one go about editing this so it's centered? I'm sure by my question one can tell I'm fairly new to php so please consider that when you reply...
Thanks,
Babs
Posts: 6
Babs, I just installed the ecard hack and can't get it to work with v1.4-pl1... It keeps sending back to the configuration wizard after I click on the send card link above the photo. Could you please let me know what you did to get it to work. I am new to php. Thanks.
Posts: 107
Hi CFresh4U,
I did what thebign did a while back:
"So I made to empty files in notepad:
gallery_cards_database.dat
gallery_cards_database.idx
Upload to Gallery/
and CHMODE them to 777
and then Point your browser to http://www.your_site.com/gallery/galler ... nstall.php to create your db files"
I tried that before and couldn't chmod my .dat and .idx files to 777 but now I can (webhost upgraded my site so now I can do more) so I was able to get it to work... For some reason some people don't seem to need to premake those files while others do...
Addendum: I forgot to mention I had to make all the files chmod777 (I could probably get by with 775, haven't tried that yet)... If I don't the card will get sent but when the person clicks on the link they get the card w/o the image)
Babs
Posts: 107
HI all...
Could anyone explain to me how to get this centered? The ecard is centered when someone clicks on their link to get the ecard sent to them but when they go to make the ecard it's all pushed over to the left... I can't figure out how to get it to center...
Thanks,
Babs
Posts: 107
*S-I-G-H*
OK, continuing on with this... Why is it if I change this line in gallery_cards_send.php:
$box_stuff .="
<table summary='send26' border='0' cellspacing='0' cellpadding='10' align='center'><tr>
<td align='center'><span style='font-variant: small-caps;'>Text Color</span>
to
$box_stuff .="
<center><table summary='send26' border='0' cellspacing='0' cellpadding='10' align='center'><tr>
<td align='center'><span style='font-variant: small-caps;'>Text Color</span>
the table does not center?
Babs
Posts: 107
After many hours of fiddling I finally figured it out... Guess if I were proficient in php I could have gotten it sooner... I'm still playing with the code (and still uploading cards so there's not as many choices as I'd like just yet)...
http://www.fractalfairy.com/~feusers/ecard/
Babs
Posts: 106
That is very good BubblyBabs
Can I ask, if it was a) difficult to isntall (newbie with php) and b) do you use it just for e-cards
Posts: 106
Hi there
I have installed ecards and it looks like it will be good, once I can resolve a couple of probs.
The first is the dreaded red x which I think will be a path problem, but where do you think. This occurs when you go to view your card
The second is again when you go to view the card "no record found" is displayed at the top.
Any ideas what I have done to cock it up