Skip to Content Skip to Menu

[#5044] Images in CBSubs Mailer

  • nphic
  • nphic
  • OFFLINE
  • Posts: 203
  • Thanks: 25
  • Karma: 1
9 years 9 months ago #257712 by nphic
Replied by nphic on topic Images in CBSubs Mailer
Kyle,

Thanks for all the help on this request. I still have not gotten this to work. Here is the html code from the Mailer:

<table style="width: 708px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="354"><img src="[cb:config param='live_site']images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg" alt="" /></td>
<td style="width: 354px;" align="right" valign="top">
<p align="right">986 Hidden Hollow Drive<br /> Marietta, GA 30068<br /> 770.509.5555</p>
</td>
</tr>
</tbody>
</table>

I received the email fine. I saved it as HTML. It does not look like the replacement worked. Here is the html line from the email that I received:

<p class=MsoNormal><img id="_x0000_i1025"
src="%5bcb:config%20param='live_site'%5dimages/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg"></p>

I'm assuming the %5b is the hex for a left bracket, the %20 is the hex for the space, etc. I'm not sure how to resolve this issue. Any thoughts?

Thanks,
Joe

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 9 months ago #257723 by krileon
Replied by krileon on topic Images in CBSubs Mailer
What email in CBSubs are you trying to use? Presentation tab or CBSubs Emails? Which specific case for either of those (e.g. activation, deactivation, etc..). The substitution either isn't processing or something is causing it to escape. Turn off your Joomla editor so it's just a plain textarea within Joomla global configuration. Next edit your email and replace the img with exactly the below.

Code:
<img src="[cb:config param="live_site" /]/images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg" />

Now retry sending the email and see if it worked fine.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • nphic
  • nphic
  • OFFLINE
  • Posts: 203
  • Thanks: 25
  • Karma: 1
9 years 9 months ago #257729 by nphic
Replied by nphic on topic Images in CBSubs Mailer
Kyle,

I went into my profile on CB and set my default editor to No editor. I went into my CBSubs Mailer and the following is the code I saved:

<img src="[cb:config param='live_site' /]/images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg" />
<table style="width: 708px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="354"><img src="[cb:config param='live_site' /]/images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg" /></td>
<td style="width: 354px;" align="right" valign="top">
<p align="right">986 Hidden Hollow Drive<br /> Marietta, GA 30068<br /> 770.509.5555</p>
</td>
</tr>
</tbody>
</table>

I changed the double quotes around live_site to single quotes. It was getting truncated since it was trying to match the double quotes. Additionally, I added the code you provided outside the table, just to make sure that the table codes were not affecting the replacement. The result is the same as before. The cb:config replacement is not happening. Here's the code from the received email:

<p class=MsoNormal><img id="_x0000_i1025"
src="%5bcb:config%20param='live_site'%20/%5d/images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg"></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=708
style='width:531.0pt;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
<td width=354 valign=top style='width:265.5pt;padding:0in 0in 0in 0in'>
<p class=MsoNormal><img id="_x0000_i1026"
src="%5bcb:config%20param='live_site'%20/%5d/images/stories/Graphics/Logos/NPHIC-Logo-Invoice.jpg"></p>
</td>
<td width=354 valign=top style='width:265.5pt;padding:0in 0in 0in 0in'>
<p align=right style='text-align:right'>986 Hidden Hollow Drive<br>
Marietta, GA 30068<br>
770.509.5555</p>
</td>
</tr>
</table>

Any other thoughts? BTW. I am able to get it to work by hardcoding www.nphic.org into the img src string.

Thanks,
Joe

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 9 months ago #257765 by krileon
Replied by krileon on topic Images in CBSubs Mailer
It's supposed to be double quotes, but the substitution doesn't appear to be taking place. I'm unsure of the cause. For now you need to just hardcode the URL and have opened a bug ticket to investigate why the substitution isn't working. It's possible it's due to no user object being supplied for the email, which will result in substitutions failing.

#5044


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
9 years 9 months ago #257942 by beat
Replied by beat on topic Images in CBSubs Mailer
I'm currently investigating this issue, and checked CBSubs Mailer *CBSubs integration plugin* and it has correct substitutions.

Which exact mail setting (in which exact configuration) are you using that would have that substitution issue ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in or Create an account to join the conversation.

  • nphic
  • nphic
  • OFFLINE
  • Posts: 203
  • Thanks: 25
  • Karma: 1
9 years 9 months ago #258018 by nphic
Replied by nphic on topic Images in CBSubs Mailer
Beat,

Thanks! I am using CBSubs Mailer. I use a cron to kick off the mailer. In this case, I am going into Paid Subscriptions / Mailer / Automation Settings and clicking the first URL to trigger the mailer rules. I then go into the Mail Queue, delete members emails I don't want to send with this test. Then I send the email to myself.

I'm not sure of the exact configuration you are looking for from me. I attached the code from the Mailer rules, NPHIC-MailerBeforeProcessing.txt. This is the actual mailer HTML mailer code. I attached the HTML of the email I received after processing the mail rules, NPHIC-MailerEmailReceived.htm. You can see on line 857 that the live site substitution did not occur.

The other issue I had with this format is when using it with the JCE Editor with validation turned on. If I use the double-quotes around "live_site", it parses incorrectly. JCE Editor seems to parse the first double-quote of "live_site" with the src=" double-quote and then truncates the line. Just an FYI.

I'd be happy to PM you credentials should you like to look at it yourself. Thanks, Beat for all your help!

Regards,
Joe Rebele
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum