ECard - sender's email missing on web display ECard - sender's email missing on web display
 

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]

Main Menu

ECard - sender's email missing on web display

Started by Sikes, June 11, 2004, 05:52:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sikes

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?

djboxny

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

djboxny

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

Ernst

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!!

Casper

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.
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

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

Fix for this:

*fix removed, seems to have undesirable side effects*

Sikes

Quote from: Nibbler on June 11, 2004, 06:35:37 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.

FuguTabetai

Quote from: Nibbler on June 11, 2004, 06:35:37 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:

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:

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.

sdstern

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,  ......

sdstern

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.

Pacjack

Quote from: FuguTabetai on June 11, 2004, 11:00:38 PM
Quote from: Nibbler on June 11, 2004, 06:35:37 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:

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:

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 ;)


Quote from: sdstern 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,  ......

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

sdstern

>> 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.

sergiovc

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

FuguTabetai

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...)

Nibbler

#14
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.

FuguTabetai


Guardian

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

williamb


beni

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

Joachim Müller

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