Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: ECard - sender's email missing on web display  (Read 27875 times)

0 Members and 1 Guest are viewing this topic.

Sikes

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
ECard - sender's email missing on web display
« on: June 11, 2004, 05:52:50 am »

Something happened to the e-card form between the last beta and the release. The senders email address field is missing, making it impossible to send an e-card.  I tried several skins including Hardwired, Default and Classic and it seems to be the same all around.

Can anybody else confirm this?
« Last Edit: August 29, 2004, 02:35:36 am by GauGau »
Logged

djboxny

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • Latin Videos and much More
Re: E-Cards broken in release build
« Reply #1 on: June 11, 2004, 07:22:31 am »

Well is your Gallery Intergrated with a BB.  Cuz if it is then only registered users can send e-cards unless u did some configuration to the access right.  Try Log in and sending a E- card to your self.  then try loggin out and doing the same thing then post your results here
Logged

djboxny

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • Latin Videos and much More
Re: E-Cards broken in release build
« Reply #2 on: June 11, 2004, 07:34:51 am »

DId a little research my self and found out that since my gallery and my board are integrated Unregistered users are not allow to send e-cards so since only registered users are allow and if you are logged in then when u wanna send a e-card the gallery alreay has your E-mail.   THOSE the senders e-mail thingy is dashed OUT.


Hope this was helpfull

Also to fix this go to Gruops and change permtion for unregistered users if u want them to be able to send e-cards
Logged

Ernst

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: E-Cards broken in release build
« Reply #3 on: June 11, 2004, 04:02:04 pm »

Hey,

i use the hardwired theme (cpg 1.3.0 upgraded from cpg 1.2.1). When i try to send an ecard i can't fill in the "Your email address' field, because there is no textfield for it. Next when i try to click "Send an e-card", the following is displayed: "Warning : invalid email address !"  (off course).

Where can i fix this issue? thnx in advance

btw there are some nice functions in cpg1.3.0! congratz... keep up the good work!!
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: E-Cards broken in release build
« Reply #4 on: June 11, 2004, 05:54:46 pm »

This is not due to the themes.
It happens when the database has no email address for the sender.  That will be the admin who set up the site, and any users created by the admin with no email address input.
To get it to work for you, you can use your db tool to input your email address, or use another admin account to edit your original.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: E-Cards broken in release build
« Reply #5 on: June 11, 2004, 06:35:37 pm »

Looks like this was broken by some other change...

Fix for this:

*fix removed, seems to have undesirable side effects*
« Last Edit: June 12, 2004, 02:41:15 pm by Nibbler »
Logged

Sikes

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: E-Cards broken in release build
« Reply #6 on: June 11, 2004, 07:36:51 pm »

Looks like this was broken by some other change...

Thanks, I knew something was wrong because it was definitely working before. I'll try it out tonight.
Logged

FuguTabetai

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://FuguTabetai.com/
Re: E-Cards broken in release build
« Reply #7 on: June 11, 2004, 11:00:38 pm »

Looks like this was broken by some other change...

Fix for this:

Open /includes/init.inc.php

Underneath

udb_authenticate();

add

$USER_DATA = array_merge($USER_DATA,udb_get_user_infos(USER_ID));

This did not entirely fix the problem for me.  I applied this change, and also had to modify my ecard.php from:

Code: [Select]
if (USER_ID){
$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
} else {
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
}

to:

Code: [Select]
if (USER_ID){
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
//$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
} else {
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
}

Basically, when I checked with debug mode on, my user email field was ''.  I guess I should add an email to my account, but ecards should work when the user doesn't have an email on their account.  I haven't checked if ecards work with anonymous people though.
Logged

sdstern

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
    • My Picture Gallery
Re: E-Cards broken in release build
« Reply #8 on: June 12, 2004, 12:59:42 am »

I added

$USER_DATA = array_merge($USER_DATA,udb_get_user_infos(USER_ID));

as shown above and now the mail gets sent.  But the footer on the email is

 Sent by from IP at

Appears that the values for by and IP are missing

ecard.php contains

 $message .= "Sent by from IP" .$_SERVER["REMOTE_HOST"]." at ".gmstrftime ....

I changed this to

 $message .= "Sent by ".$sender_name." from IP" .$_SERVER["REMOTE_ADDR"]." at ".gmstrftime("%A,  ......
Logged

sdstern

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
    • My Picture Gallery
ECard - sender's email missing on web display
« Reply #9 on: June 12, 2004, 01:25:35 am »

When I view the ecard as mailed, it shows the sender's name and email


   sender(sender@host.domain)

But when viewed online it shows

    sender()

I checked displayecard.php. The value is supposed to come from the array data, but it's not there. A print_r($data) shows:

Array ( [rn] => steven [sn] => sender[se] => [p] =>

Where is the data array loaded?  It comes into this script from an HTTP variable.
Logged

Pacjack

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
Re: E-Cards broken in release build
« Reply #10 on: June 12, 2004, 01:36:16 am »

Looks like this was broken by some other change...

Fix for this:

Open /includes/init.inc.php

Underneath

udb_authenticate();

add

$USER_DATA = array_merge($USER_DATA,udb_get_user_infos(USER_ID));

This did not entirely fix the problem for me.  I applied this change, and also had to modify my ecard.php from:

Code: [Select]
if (USER_ID){
$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
} else {
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
}

to:

Code: [Select]
if (USER_ID){
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
//$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
} else {
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"WIDTH: 100%;\">";
}

Basically, when I checked with debug mode on, my user email field was ''.  I guess I should add an email to my account, but ecards should work when the user doesn't have an email on their account.  I haven't checked if ecards work with anonymous people though.

Thanks, now it works ;)


I added

$USER_DATA = array_merge($USER_DATA,udb_get_user_infos(USER_ID));

as shown above and now the mail gets sent.  But the footer on the email is

 Sent by from IP at

Appears that the values for by and IP are missing

ecard.php contains

 $message .= "Sent by from IP" .$_SERVER["REMOTE_HOST"]." at ".gmstrftime ....

I changed this to

 $message .= "Sent by ".$sender_name." from IP" .$_SERVER["REMOTE_ADDR"]." at ".gmstrftime("%A,  ......

Haven't tried this yet, what does it do?
Logged

sdstern

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
    • My Picture Gallery
Re: E-Cards broken in release build
« Reply #11 on: June 12, 2004, 04:27:20 am »

>> Haven't tried this yet, what does it do? <<

At the bottom of the ecard email, there's a footer (duh!) that's not quite right without this fix. The footer specifies the sender and the IP address of the sender's browser at the time the ecard was sent.
Logged

sergiovc

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Send an E-Card
« Reply #12 on: June 12, 2004, 07:54:48 am »

When I login as Admin, I tried to send an E-Card, my email doesn't appear and it is not possible enter my email this box called Your email address
When I logout yes I can send an E-Card but I have to enter my email address
When some register user comes to my CPG 1.30 nad login, he/she can send an E-Card and his/her email addres appears automatically.

Is this ok or this is a bugs?

Tell me please.

Thanks
Logged

FuguTabetai

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://FuguTabetai.com/
Re: ECard - sender's email missing on web display
« Reply #13 on: June 12, 2004, 03:43:38 pm »

Admins / coppermine gurus, is there an official fix for this planned?  Because the workaround that I posted up above is almost positively not the right way to go (completely ignores trying to get the email from a registered user, which must have been there for a good reason...)
Logged

Nibbler

  • Guest
Re: ECard - sender's email missing on web display
« Reply #14 on: June 12, 2004, 04:10:18 pm »

OK, forget any changes to init.inc.php, new version of ecard.php is in CVS, and for download here.

Box will only display if it cannot get your email address
sender email is encoded into $data properly
url uses config's ecard target link.
footer info corrected.
« Last Edit: June 12, 2004, 04:19:51 pm by Nibbler »
Logged

FuguTabetai

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • http://FuguTabetai.com/
Re: ECard - sender's email missing on web display
« Reply #15 on: June 12, 2004, 06:08:35 pm »

Thanks!  Worked like a charm.
Logged

Guardian

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: ECard - sender's email missing on web display
« Reply #16 on: June 19, 2004, 11:50:29 am »

Thanks! I just replaced the entire contents and it fixed the problem.
Logged

williamb

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [Solved]: ECard - sender's email missing on web display
« Reply #17 on: June 20, 2004, 12:20:17 am »

Worked great for me too, quick fix.  Thanks!
Logged

beni

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • http://www.fotoalbum.for-all.ch
Re: [Solved]: ECard - sender's email missing on web display
« Reply #18 on: June 20, 2004, 06:50:50 pm »

I have replaced the "ecard.php,v 1.12" file with "ecard.php,v 1.13" file. To send E-Mails everything works fine - but when i receive the mails, the pictures (stamp and gallery-picture) dont appear, only two red cross. :\'(

Tell me please.

Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: ECard - sender's email missing on web display
« Reply #19 on: June 20, 2004, 11:57:32 pm »

check the html code of the emails you receicve and post here if necessary. You will only see the stamp and other pictures if you read your email online (connected to the internet). Some clever email clients disable having <img>-tags in emails pointing to a http-server, as this technology has been abused in the past by so-called web-bugs. Make sure your email client can handle them as expected, or remove the stamps from the ecard's html code (to be found in themes/yourtheme/theme.php) altogether.

GauGau
Logged
Pages: [1] 2   Go Up
 

Page created in 0.035 seconds with 21 queries.