Skip to content

Instantly share code, notes, and snippets.

View garek007's full-sized avatar

Stan Alachniewicz garek007

  • Salesforce
  • San Diego
View GitHub Profile
@garek007
garek007 / ResponsiveEmailHeader.html
Last active January 29, 2024 21:40
Responsive Email Header
Add this to the head tag of your template within the CSS style block
@media only screen and (max-width: 640px) {
.hero-banner {
background-size: 120% !important;
background-position: left 45% !important;
}
}
Remove this line and everything above after pasting the CSS into the head tag
%%[
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>Create</wsa:Action>
<wsa:MessageID>urn:uuid:bd9bc23b-42da-4c2e-b4c1-b1e822f520a6</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>https://webservice.s7.exacttarget.com/Service.asmx</wsa:To>
<wsse:Security soap:mustUnderstand="1">
<wsse:UsernameToken wsu:Id="SecurityToken-884da619-59bb-4db6-834d-138322342442">
@garek007
garek007 / getTemplateName
Created October 25, 2018 17:20
Wordpress get template name
add_filter( 'template_include', 'var_template_include', 1000 );
function var_template_include( $t ){
$GLOBALS['current_theme_template'] = basename($t);
return $t;
}
function get_current_template( $echo = false ) {
if( !isset( $GLOBALS['current_theme_template'] ) )
return false;
if( $echo )
SELECT s.JobID, s.EmailName, s.EmailSubject, count(o.SubscriberKey) as TotalOpens, count(case when isUnique = 1 then 1 else null end) as UniqueOpens
FROM _Open o
JOIN (
select JobID, EmailName, EmailSubject
from _Job
where EmailName NOT LIKE '%[_]welcome[_]%'
and (EmailName LIKE 'Newsletter[_]%')
AND DeliveredTime >= DATEADD(mm,DATEDIFF(mm,0,GETDATE())-1,0)
AND DeliveredTime < DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)
and SuppressTracking = 0