HTML5 Ad made with Google webdesigner to Doubleclick for publishers Small Business - google-dfp

How do I publish a HTML5-Ad in Doubleclick for publishers Small Business? Seems like I need to insert click-macros. But were do I insert them if it´s based on script-event?

Generally when you're uploading an HTML5 creative, there are multiple files you are generally dealing with (CSS, JS, images, etc - along with the actual HTML file). The procedure is generally as follows:
1) DFP requires your creative assets (images, scripts, CSS etc) to be uploaded individually (Alternatively, the CSS and Javascript can be added inline into the HTML5 code).
2) The source code of your HTML file must be added to the "Code snippet" area.
3) Next, every file path in your creative code needs to be replaced by DFP file macros, which upon ad serving will be replaced by the absolute path url. If any file is referenced within a CSS or Javascript file, it will need to be brought/surfaced to the "Code Snippet", otherwise they won't be replaced by the actual paths.
So if your original HTML source has an img tag like this:
<img src="product1.jpg"/>
You need to pre-upload product1.jpg into DFP and change that img src to reference the DFP name for this file using the macro. Thus it may end up looking like this:
<img src="%%FILE:JPG1%%"/>
But if you are using SVG images, you cannot currently use the macro in this way. You'll need to either host the SVG files externally and reference with a full path to them (ie: <img src="http://someserver/file.svg">) or you can paste the contents of the SVG file in-line.
BR,
Bablu Chakma

Related

How to get the whole code of a HTML element in Developer tools?

I'm looking for possibility to export or just copy the whole code of a HTML element, targeted with Developer Tools. With whole code I mean not only HTML (this option is good visible in context menu), but corresponding CSS and JS code too.
I found a Chrome extension, which claims to copy HTML and CSS, but it isn't reliable in its core function and doesn't copy JS at all.

Hugo deploy and delete not necessary files

I'm developing a new Hugo site and in this case I thought to create also a template so.I can use for future site.
Well in the template there are tons of vendor files and library because depending of the pages that the site will implement these library will be used. The problem is on the deploy. For example I use Line icons library that has a lot of .png files. (For example 200 files).
Well in the template I put all the files but could happen that in the site that implement this template I use only five icons. Is there a way that look around the final HTML and the usage of the icons and delete in the public folder the not necessary files?
Not directly.
You would need to add an utility script to your template, in order for any user implementing said template to be able to call this script on demand.
That script should then be able to:
analyze the HTML files generated in public_html
cleanup the icons accordingly

Reusing content of an external webpage in DITA-OT

I tried different method to include the content of an external webpage by url in dita files without success. Is it possible to do it? I can add references to my dita files:
<related-links>
<link href="http://example.com" format="html" scope="external"/>
</related-links>
however I am not able to ddisplay the content of the page in oXygen.
tl;dr: It depends on the external sources and on your publication targets. If you want to publish to PDF, your content needs to be available offline.
What do you exactly mean with content? You can use external sources, e.g. images, if you just publish to html5. Just use the image URL in the href. If you publish to pdf, it would not work. The DITA-OT does not download things for you. Most websites are dynamic, so content is not very static so it may not work as you might expect. Maybe the external website has an API to gather the data you need. Or maybe it would be safer to use the depend.preprocess.pre extension point to hook in an Ant Target to download the external sources via <get> or curl. Another approach would be dita-glass for on-the-fly conversion. But, it depends...

Unity web open custom html after build

I made a custom html file for my Unity web project. Though after building my project, it opens the default pre-made one. Is there a way to make Unity open my own html file instead of the default one?
You're looking for the Web Player Templates manual page.
In your Assets folder, create a folder named WebPlayerTemplates, and put your template in there. You'll need an HTML file. To help make this slightly easier, Unity will look in that HTML for certain tokens that it can replace with data from the project.
For example, one such tag is %UNITY_WEB_PATH%, which will be replaced with the path to your built project file.
Some tags include:
UNITY_WEB_NAME Name of the webplayer.
UNITY_WIDTH UNITY_HEIGHT Onscreen width and height of the player in
pixels.
UNITY_WEB_PATH Local path to the webplayer file.
UNITY_UNITYOBJECT_URL In the usual case where the page will download
UnityObject2.js from the Unity’s website (ie, the Offline Deployment
option is disabled), this tag will provide the download URL.
UNITY_UNITYOBJECT_DEPENDENCIES The UnityObject2.js have dependencies
and this tag will be replaced with the needed dependencies for it to
work properly.
In every deployment I've seen, the WebPlayer plugin is is launched via JavaScript, by instantiating a UnityObject2 and calling its initPlugin method:
var u = new UnityObject2();
u.initPlugin(jQuery("#unityPlayer")[0], "Example.unity3d");
The above assumes that you have a div with id #unityPlayer, and that Example.unity3d is a valid path to your Unity build file.
In practice, though, I recommend working from Unity's generated HTML files; they include some failsafes for cases where the WebPlayer plugin isn't installed or fails to load. The manual page linked above also has HTML source examples which include some of those special tags.
UnityObject2 does have some advanced features, which are also documented in the manual. If your game needs to communicate with the outer web page, that is also possible.

How to Intercept image load requests in WebView?

Is it possible to intercept image load requests in WebView before they are actually started and modify their URLs?
For example, I have
mWebView.loadUrl(myUrl);
In onLoadResources event I can see URLs, but I can't modify them?
The thing is I am working on application that loads html content from remote location. For some reason author excluded image path and in img src he just have file name. Existing iPhone application is using this html content and I assume the content is build the way that is the best for iPhone. So, I need somehow to figure how to alter these paths. For example, if I choose to download all images first, I would need to alter path and add file:///... in front of image.jpg name.
Thanks.
you can use onLoadResource although are not only images but any resource loaded like javascript and css