Giter Club home page Giter Club logo

Comments (10)

giuliopons avatar giuliopons commented on June 5, 2024 1

I've just uploaded the fix v.3995b
Here is full process #58
(For your banner the script function to define the height, inside the index.html HTML5 banner, is a little different as described in this thread, but I've tested it and it works properly).

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

Sorry, can you upload the banner in another place? The ambdemo folder is refreshed daily and I can't find your banner. You can send me the banner via email if you prefer to check it.

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

I've seen that there is a bug when the iframe containing the banner shows content from another domain. This is what is happening on codepen since the banner is n barattalo and the html showing it is on codepen servers.
I'm studying a workaround to pass the size of the banner from within the iframe... I'll let you know.

For the blue box position issue, I don't know at this moment and I'm waiting your adv since with my test it doesn't happen.

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

The actual code that resize the height of the iframe works only if the banner is showed on the same domain of the site that hosts AdAdmin.

I've made a fix that fix this behaviour also crossbrowser, but it needs a small function inside the code of your HTML5 banner.
Here it is:

<script>

	/*
		add this script in <head> to update the height of the banner
	*/
	function adjust_iframe_height(){
		if(typeof(window.resdefined)=="undefined"){
			window.resdefined = true;
			window.onresize = adjust_iframe_height;
		}
		var actual_height = document.body.scrollHeight;
		parent.postMessage(actual_height,"*");
	}
	window.addEventListener("load", (event) => { adjust_iframe_height() });

</script>

This script uses postMessage to tell to the parent the height of the iframe. On the parent AdAdmin has a new function that handle this call and resize the iframe.

I will update AdAdmin to use this new code.

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

Will be updated in 3.995b

from adadmin.

povpie avatar povpie commented on June 5, 2024

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

To fix the issue an update of AdAdmin is needed because a script is necessary both on the ser.php that show the banner, and another script (the one posted in my previous comment) in your banner. Because of cross domain issues.

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

Which is the tool that you have used to create the banner?

from adadmin.

giuliopons avatar giuliopons commented on June 5, 2024

Your banner scale the size of himself in a different way of mine, so for your ad 973x250 you have to add this code in your banner (you can open the index.html file and go to the end of head tag and add this function):

<script>
	function adjust_iframe_height(){
		if(typeof(window.resdefined)=="undefined"){
			window.resdefined = true;
			window.onresize = adjust_iframe_height;
		}
		var actual_height = document.body.scrollWidth * 250/973;
		parent.postMessage(actual_height,"*");
	}
	window.addEventListener("load", (event) => { adjust_iframe_height() });
</script>

This function will recalculate the height and communicate to AdAdmin script to resize the iframe properly.

You also need to copy the ClickTag from the AdAdmin banner page and place it here in your banner html to make it work, you have to edit your index.html file also here:

image

I'm going to upload the fix to Codecanyon to make it work!

from adadmin.

povpie avatar povpie commented on June 5, 2024

Which is the tool that you have used to create the banner?

I don't remember exactly where this one was made, I use onlymega, creatopy and bannerboo. If I'm not mistaken, this one was made on creatopy but I might be wrong. As soon as I have a free time I'll test it out on demo again. Thanks again Pons.

from adadmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.