close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE4 - various problems on submit

Thread began 3/28/2010 1:23 am by gwh362692 | Last modified 4/01/2010 3:10 pm by Eric Mittman | 1118 views | 7 replies |

gwh362692

UE4 - various problems on submit

Hi everyone,

I'm using the new UE4 but have run into some problems:

1) When I insert a reply to email address in the user interface, I get the following error:

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/site/www/kc/webassist/email/waue_contact_3.php on line 25

Line 25 is:

//Additional Headers
$WA_MailObject->ReplyTo = "<?php echo((isset($_POST["Contact_us_group_Email"]))?$_POST["Contact_us_group_Email"]:"") ?>";


Since I wanted different labels etc. for the email I removed the following code from the block template file that I'm using so I don't know if this is contributing to the problem:


<?php
$remove = array();
$remove[] = "";
$remove[] = "x";
$remove[] = "y";

$removeBegins = array();
$removeBegins[] = "Security";

$removeEnds = array();
$removeEnds[] = "_x";
$removeEnds[] = "_y";

$removeIncludes = array();
$removeIncludes[] = "Security";
?>

<?php
foreach( $_POST as $pkey => $pval ){
if (!RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes)) {
?>

<tr valign="top">
<th style="font-family: 'Times New Roman', Times, serif; font-size: 10px;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #666; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?>:</th>
<td style="font-family: 'Times New Roman', Times, serif; font-size: 10px;padding: 3px; border-left: 1px solid #DDD; color: #B6B6B6;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>
</tr>
<?php
}
}
?>



2) I also wondered if it was possible to have the date in a different format so that it's in a day/month/year setup? Can the time also be my local time instead of the incorrect time that's appearing at the moment?

3) In addition to the above, I've notice that there's a rule in the block.php email template that sets the background color to a light grey in the email. This works when testing in Entourage on the mac but the color doesn't render at all in Microsoft Outlook 2007. Is there a fix for this?

Appreciate any assistance.

Sign in to reply to this post

Eric Mittman

When you added the reply to how exactly did you go about this, it seems that you have a php block of code within an existing php block of code so this is likely the cause of the error. I would like to know the steps you took to get this result so that we can check into this further. The code you removed is just looping over the fields to in the form to print out their values. It should not be causing the error.

To update the date go into the Block.php template and look for this code:

php:
<?php echo date("n-j-Y"$now); ?>


You will just need to swap around the month and day values like this:

php:
<?php echo date("j-n-Y"$now); ?>



The color that is set for the background is just done via css, is your Outlook client configured to allow css formatting? Have you tried this with any other mail clients, like hotmail, gmail or Yahoo? This would be a good test to determine if it is something specific to your Outlook settings.

Sign in to reply to this post

gwh362692

Originally Said By: Eric Mittman
  When you added the reply to how exactly did you go about this, it seems that you have a php block of code within an existing php block of code so this is likely the cause of the error. I would like to know the steps you took to get this result so that we can check into this further.  



In the UE user interface, I just clicked the from button and then typed in the return address in the Reply to field.

  To update the date go into the Block.php template and look for this code:
php:
<?php echo date("n-j-Y"$now); ?>

You will just need to swap around the month and day values like this:
php:
<?php echo date("j-n-Y"$now); ?>
  



I switched the 'j' and the 'n' around in the code where you specified. This has given me the day first then the month but it's still not the correct date because I'm in a different time zone. This also goes for the time - it's incorrect also. Is there a fix for this?

  The color that is set for the background is just done via css, is your Outlook client configured to allow css formatting? Have you tried this with any other mail clients, like hotmail, gmail or Yahoo? This would be a good test to determine if it is something specific to your Outlook settings.  



Yes Outlook 2007 is set to receive html emails and the "Rely on css for font formatting" is checked in the preferences. I also tested by sending it to a gmail account and it works ok there so it's just Outlook it seems.

Any further suggestions appreciated.

Sign in to reply to this post

Eric Mittman

For the reply to it looks like you have set the value as:

php:
<?php echo((isset($_POST["Contact_us_group_Email"]))?$_POST["Contact_us_group_Email"]:""?>



If this is the case then you should update it so that the value you enter is like this:

php:
".((isset($_POST["Contact_us_group_Email"]))?$_POST["Contact_us_group_Email"]:"")  ."



This looks to be a bug with UE currently, I will ensure that it is logged as so.

To set the default time zone you will need to add this code to the top of your page:

php:
date_default_timezone_set ("America/Los_Angeles");



Here are the links to the php site with more info about this function and the values for it:

function
function.date-default-timezone-set.php

values
timezones.php

When it comes to Outlook and the color for the background can you check on the source of the email message to see if the background color css made it through? I'm wondering if the styling was stripped from the message before it got to you.

Sign in to reply to this post

gwh362692

Thanks,

I've managed to successfully use the timezone function you mentioned. Just one thing: how do I remove the EST at the end of the time or better still change it to AEST? Also regarding the function, I read on the php site about the possible errors that occur if the timezone isn't valid, eg.

"Note: Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_WARNING message if using the system settings or the TZ environment variable. "

Does this mean that if someone uses the form in a different timezone that they'll get an error?

  When it comes to Outlook and the color for the background can you check on the source of the email message to see if the background color css made it through? I'm wondering if the styling was stripped from the message before it got to you.  



I've just checked the source code and yes the background color css came through but it's just doesn't seem to be rendering.

Sign in to reply to this post

Eric Mittman

The code that is putting the the time zone at the end of the time is the T in here:

php:
<?php echo date("g:i A T"$now); ?>



You can remove it to get rid of that part of the date and time. As for the error that would be returned this is not something to worry about. You are setting the local server side, this has nothing to do with the clients time or zone. It will show the time like you see regardless of where the user is.

As for the rendering of the background color I have found that Outlook 07 has some problems with this type of css. I read that it the background color is applied to more than one element that is nested in the page then it will not show. I tested this by removing the other background colors specified and got the background color to show that way, but it was not for the area I thought it would be. It seems that Outlook 07 has some limitations when it comes to properly rendering css in html emails. Here is a link to an article that I found on this topic:

the-scoop-on-outlook-2007/

Sign in to reply to this post

gwh362692

Thanks again for the information.

Sign in to reply to this post

Eric Mittman

You are welcome, let us know if you have any further questions or run into any problems.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...