MailChimp template add script tag at the end of html template - mailchimp-api-v3.0

I used email template creator MailChimp, I figure out at the end of html body there is a script with type 'text/javascript' that src is not clear for me and I can't find any reason for that, for example
<script type="text/javascript" src="/thukjgfg/iOt1cffw/S20SQQE/PBY/PeloHEXkB"></script>
is anybody know what is it?

You have created a template in the standard template builder.
After creation, you exported the html code. After the export, there is indeed a script tag. If you create a campaign and send template then there will be no script tag.
Conclusion: Most likely, the script tag is tied to the template builder settings.

Related

Integrate third party library that generates a pricing page in Wix

I'm trying to integrate a third party library that is meant to dynamically generate a pricing page in Wix
I need to reference the external script from a script tag, and then call a function that will add the content to a dom Node.
The code, on a regular HTML page, would be something like this:
<html>
<head>
[...]
<script src="https://js.test.library.com/pricing.test.js"></script>
</head>
<body>
<div id="pricing"></div>
<script>
Pricing.render('#pricing', 'PRICING_PAGE_CODE');
</script>
</body>
Pricing being the embedded library.
From the settings, Custom code option I could add the reference script, but I don't know how to execute it or get the reference to the DOM element where I want to render the pricing page.

How i can translate article in codeigniter? the localization work on the app but not on thes artclles

I would like to know how I can translate the articles according to the language of the user ! the language set on the app when the user changes the language, the article must be translated also, localization is already set up in the app but not on the article! i should use an API for that or i can do it without? please tell me!
NB: I got only access via FTP so, I can install packages via composer!
please show me some example or link!
how I can use packages in Codeigniter without use composer, like download it directly from GitHub an put it in my project!
Put the following code in your website structure:
HTML Code:
<div id="google_translate_element"></div>
Javascript Code:
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
This is for your whole website will be translated, I hope it works for you.

Is there a way in Total.js to add to #{head} from a view?

I'm using total.js and wanting to add a page-specific CSS link tag to a page's HTML <head> from within a view, rather than coding it into the route's controller.
I've tried to use #(head(css('page.css'))} but that results in a server error. Using #{css('page.css')} prints out the CSS link tag as part of the #{body}. Yet, the #{meta('Page Title')} directive is able to direct its output to the <head> section of the page.
Am I missing something or is it just not possible in this version of total.js?
Try to add #{head('/css/page.css')}.

How to get output of RAZOR template engine as a String and then write it to a file?

In my ASp.Net MVC 3 application, I am using the RAZOR engine for generating html with templates. It is working great for viewing in a browser. But I would like to get the output of the razor engine to a string and then write it to a file. For example:
test.cshtml
<html>
<head>
<title>
#websiteTitle
</title>
</head>
<body>
#websiteBody
</body>
</html>
I would like to make a call in my controller code like this:
String output = processTemplate(...)
//code to write 'output' to a file
..where processTemplate() takes the template file name and the required template parameters and produce the String output.
I tried to search in Google but couldn't find any docs on how to do it. Is it possible? If yes, how?
Note: I was able to do it using FreeMarker in Java web applications - we can output to Console, File or StringWriter. It was very convenient. I would like to have similar functionality.
Use "RazorEngine"
for an example of use, have a look at http://www.hanselman.com/blog/NuGetPackagesOfTheWeek12AccessingGoogleSpreadsheetsWithGDataFromCAndHostingRazorTemplatesToGenerateHTMLFromAConsoleApp.aspx

How to hide the image tag src attribute?

I have a question about the <img> tag src attribute.
Is it possible to hide the <img> tag src attribute when viewing the source in a browser?
If it is possible, how? Please tel me if you have any reliable sources.
No, it's not possible.
You can set them dynamically with JS, but you can't hide them. You can store them as base64 encoded strings, and then decode them on the fly which will "hide" them from your page's source.
However, this is still utterly pointless as in the end, the browser still makes an HTTP request to fetch the image.
Simply spoken: This is impossible.
You might try to obfuscate your image src attributes (JS, Base64, etc), but for the browser to be able to show an image, you'll always end up exposing the image URI.
Which, in turn, means that everyone who knows their firebug will be able to see where your cute kitteh image comes from.
Alternative:
Generate One-Time URIs for your images (quite expensive).
Another good feature is to hide the location paths of your important scripts. I found a great npm plugin for this https://www.npmjs.com/package/location-hide
This works also for php href, src, content it will use everything inside src=""
You need only node.js for creating the exported files. It´s easy to use even if you don´t know node.js
It turns
<script src="test/folder/sample.js" type="text/javascript"></script>
<link href="test/stylesheet/perfect-scrollbar.css" rel="stylesheet">
into
<script src="TNANIuTOLZfmLYwaPDIYhcZDVOWKodqYhysaTeQHFPDhYlDLCOtxZqYmkKAhaSwSgbsYOWlpBzVSBtMZKSfwRqvPSqWVlBBuzHR" type="text/javascript"></script>
<link href="gyXeFnOEvZbgTjLvdZRnsyrfhaXqffkDjcdATTouqpIenCalLRXKamuXEtiKbPGCsNrdQIaqTMTNWsLyLFuxygKytaruWzSjKYMq" rel="stylesheet">
And it generate new jquery include codes like this to include your scripts with javascript in a external file
$('[src=\'TNANIuTOLZfmLYwaPDIYhcZDVOWKodqYhysaTeQHFPDhYlDLCOtxZqYmkKAhaSwSgbsYOWlpBzVSBtMZKSfwRqvPSqWVlBBuzHR\']').attr("src", "test/folder/sample.js")
$('[href=\'gyXeFnOEvZbgTjLvdZRnsyrfhaXqffkDjcdATTouqpIenCalLRXKamuXEtiKbPGCsNrdQIaqTMTNWsLyLFuxygKytaruWzSjKYMq\']').attr("src", "test/stylesheet/perfect-scrollbar.css")
Also I would suggest you that you include all of your external javascript codes in 1 single js file. This file you place in the root of your index file that you can make this
<script src="./allinone_external_file.js" type="text/javascript"></script>
Then make right htaccess that nobody can acces this file. You can also make a fake import script for the source code that every body can see. But this file is only a redirect for the real external js file. you make this multiple times as example + use other obfuscation tools. This will protect you from people searching exploits with your javascript codes. I know its no big deal and maybe you can see the jquery include codes if you know how. But anyway its a great protection.

Resources