PDA

View Full Version : weird html in phrase


Chadi
07-11-2014, 01:24 AM
I updated the phrase "notify" to convert it to a nice html email notification instead of the ancient plain text format.

Here's the very weird thing... I tested it several times today and it worked fine. I received the full html output in mobile and desktop mail clients. That was only 20-30 minutes ago, at least 5-10 tests all good. Now, another member replied to a thread I'm subscribed to and it showed the full code in plain text in the email instead. I'm baffled why it worked before and suddenly now? I did not make any new updates since it was working fine before too.

The code for phrase "notify"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Talk Jesus Forums</title>
</head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
<tbody>
<tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
<table border="0" cellspacing="0" cellpadding="0"><tbody>
<tr><td align="center" width="680" style="padding: 10px">
<a href="http://www.talkjesus.com" target="_blank">
<img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
</td></tr>
</tbody></table>
</td></tr>
<tr><td style="padding: 20px" align="center">
<table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td width="400" style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
<div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
<p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" width="50" /></p>
<p style="text-decoration: none; color: #008fd5;" target="_blank">
Dear $touser[username],<br>
<p style="text-decoration: none; color: #68757e; font-size: 16px" target="_blank">
<span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
<p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left" target="_blank">the messsage...</p>
<p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left" target="_blank">"$pagetext"</p>
<p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;" target="_blank">click here</a></p></div>
</td>
</tr>
</tbody></table>
</td></tr>
<tr><td style="background-color: #f9f9f9; color: #89949b" align="center">

<p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;" target="_blank" target="_blank">
Home</a>
&nbsp;|&nbsp;
<a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;" target="_blank">Facebook</a>
&nbsp;|&nbsp;
<a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;" target="_blank">Twitter</a>
</p>
<p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
Thank you for being a part of Talk Jesus</p>
</td></tr>
</tbody>
</table>
</body>
</html>

ForceHSS
07-11-2014, 01:42 AM
Line 23, Column 101: required attribute "ALT" not specified
Line 23, Column 101: NET-enabling start-tag requires SHORTTAG
<p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" width="50" /></p>
Line 24, Column 69: there is no attribute "TARGET"
<p style="text-decoration: none; color: #008fd5;" target="_blank">
Line 38, Column 117: duplicate specification of attribute "TARGET"
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;" target="_blank" target="_blank">

Chadi
07-11-2014, 02:17 AM
I think that may have worked, thanks :)

ForceHSS
07-11-2014, 02:21 AM
happy to help

Chadi
07-11-2014, 10:11 AM
Unfortunately it is not working at all. It seems like anytime I make an edit, it works first time around but not after? Doesn't make sense.

Updated code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Talk Jesus Forums</title>
</head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
<tbody>
<tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
<table border="0" cellspacing="0" cellpadding="0"><tbody>
<tr><td align="center" width="680" style="padding: 10px">
<a href="http://www.talkjesus.com">
<img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
</td></tr>
</tbody></table>
</td></tr>
<tr><td style="padding: 20px" align="center">
<table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td width="400" style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
<div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
<p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" alt="New Reply" width="50" /></p>
<p style="text-decoration: none; color: #008fd5;">
Dear $touser[username],<br>
<p style="text-decoration: none; color: #68757e; font-size: 16px">
<span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
<p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left">the messsage...</p>
<p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left">$pagetext</p>
<p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;">click here</a></p></div>
</td>
</tr>
</tbody></table>
</td></tr>
<tr><td style="background-color: #f9f9f9; color: #89949b" align="center">

<p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;">
Home</a>
&nbsp;|&nbsp;
<a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
&nbsp;|&nbsp;
<a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
</p>
<p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
Thank you for being a part of Talk Jesus</p>
</td></tr>
</tbody>
</table>
</body>
</html>

Lynne
07-11-2014, 03:56 PM
Some people have receiving html email turned off and thus the email will just show as text to them. Have you asked the user to check their email settings to make sure they allow html emails to be received?

This is a good place to check html - http://validator.w3.org/check

ForceHSS
07-11-2014, 03:57 PM
Line 23, Column 117: NET-enabling start-tag requires SHORTTAG

alt="New Reply" width="50" /></p>

Try putting quotation marks around the value.

the Document Type (-//W3C//DTD HTML 4.01 Transitional //EN) is not in the validator's catalog
No XML declaration (e.g<? xml version="1.0"?>) could be found at the beginning of the document.

Chadi
07-11-2014, 04:02 PM
Some people have receiving html email turned off and thus the email will just show as text to them. Have you asked the user to check their email settings to make sure they allow html emails to be received?

This is a good place to check html - http://validator.w3.org/check

It's me, I'm the one receiving them fine in HTML on mobile/desktop clients and then they come in suddenly in plain code. HTML is enabled by default for me in iOS mail and Outlook 2013.

--------------- Added 1405098303 at 1405098303 ---------------

Line 23, Column 117: NET-enabling start-tag requires SHORTTAG

alt="New Reply" width="50" /></p>

Try putting quotation marks around the value.

Are you saying to remove the end trailing slash? Confused sorry.

--------------- Added 1405099298 at 1405099298 ---------------

I've been using the W3 validator, no errors.

Again this is happening. I created/responded to a few threads/posts between admin/member user (test user). First few emails in proper html. Then, just now back to plain text html code. Why on earth would this happen? This makes no sense at all.

ForceHSS
07-11-2014, 04:45 PM
Use the Validate by direct input http://validator.w3.org/#validate_by_input

Chadi
07-11-2014, 04:54 PM
Thank you. Been using that. Only 2 warnings, which is below and not sure quite what to do from here.

Unable to Determine Parse Mode! The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:

in Direct Input mode, no MIME Media Type is served to the validator
the Document Type (-//W3C//DTD HTML 4.01 Transitional //EN) is not in the validator's catalog
No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document. As a default, the validator is falling back to SGML mode.


--------------- Added 1405132517 at 1405132517 ---------------

Ok, tracing this down a little bit.

Here's the thing I noticed. The pmreceived phrase is working perfectly fine with the HTML code, but the notify one is still sending plain text code (even though it worked first couple times with same code). This is baffling me.

notify phrase:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Talk Jesus Forums</title>
</head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
<tbody>
<tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
<table border="0" cellspacing="0" cellpadding="0"><tbody>
<tr><td align="center" width="680" style="padding: 10px">
<a href="http://www.talkjesus.com">
<img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
</td></tr>
</tbody></table>
</td></tr>
<tr><td style="padding: 20px" align="center">
<table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td width="400" style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
<div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
<p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" alt="New Reply" width="50"></p>
<p style="text-decoration: none; color: #008fd5;">
Dear $touser[username],<br>
<p style="text-decoration: none; color: #68757e; font-size: 16px">
<span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
<p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left">the messsage...</p>
<p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left">$pagetext</p>
<p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;">click here</a></p></div>
</td>
</tr>
</tbody></table>
</td></tr>
<tr><td style="background-color: #f9f9f9; color: #89949b" align="center">

<p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;">
Home</a>
&nbsp;|&nbsp;
<a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
&nbsp;|&nbsp;
<a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
</p>
<p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
Thank you for being a part of Talk Jesus</p>
</td></tr>
</tbody>
</table>
</body>
</html>

pmreceived phrase:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Talk Jesus Forums</title>
</head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
<tbody>
<tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
<table border="0" cellspacing="0" cellpadding="0"><tbody>
<tr><td align="center" width="680" style="padding: 10px">
<a href="http://www.talkjesus.com">
<img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
</td></tr>
</tbody></table>
</td></tr>
<tr><td style="padding: 20px" align="center">
<table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td width="400" style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
<div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
<p><img src="http://www.talkjesus.com/images/newsletter/inbox-100.png" alt="New Message" width="50"></p>
<p style="text-decoration: none; color: #008fd5;">
Dear $touserinfo[username],<br>
<p style="text-decoration: none; color: #68757e; font-size: 16px">
You have received a new private message from <span style="text-decoration: none; color: #E66B1B;">$fromusername</span>, entitled <strong>"$plaintext_title"</strong>.</p>
<p>To read and respond back to this message, you must
<a href="http://www.talkjesus.com/private.php" style="text-decoration: none; color: #008fd5;">log in here</a>.</div>
</td>
</tr>
</tbody></table>
</td></tr>
<tr><td style="background-color: #f9f9f9; color: #89949b" align="center">

<p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;">
Home</a>
&nbsp;|&nbsp;
<a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
&nbsp;|&nbsp;
<a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
</p>
<p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
Thank you for being a part of Talk Jesus</p>
</td></tr>
</tbody>
</table>
</body>
</html>

Ran both through the W3 validator, no errors. They're also virtually almost 100% the same code, except 2 pieces which is the actual vbphrases that are different, nothing else.

Any one have an idea?

Chadi
07-13-2014, 11:03 PM
I would really appreciate help here.

Lynne
07-14-2014, 12:37 AM
To be honest, I don't believe those phrases are created to be html text. There are modifications to allow you to send emails in html because vbulletin doesn't allow you to do so.

Chadi
07-14-2014, 05:30 PM
To be honest, I don't believe those phrases are created to be html text. There are modifications to allow you to send emails in html because vbulletin doesn't allow you to do so.

That's what VB support just confirmed. Do you know of any mods that enables the system to send the notifications in html format? I have an html mod but that's only for manual newsletter sending, not phrase replacement or such.

Lynne
07-14-2014, 09:27 PM
search "html" in 4.x Mods/Titles Only and you should find something.

Chadi
07-15-2014, 08:51 PM
search "html" in 4.x Mods/Titles Only and you should find something.

Thanks. That's exactly what I did immediately after my last post and did find this mod. I didn't want to reply until I confirmed it did what I needed, so far 2 days now and it seems to work with pm and thread reply notification phrases. So far so good.

Mod: https://vborg.vbsupport.ru/showthread.php?t=231532