New Features (Beta)

Overview

These are new features that are available to be implemented but are still in Beta and may change before being fully released.

ShowAds

showAds is a new function in ezstandalone that allows for calling for placeholders. Below is an example of how placeholders are currently called, followed by how they can now be called

Current:

1<script>
2    window.ezstandalone = window.ezstandalone || {};
3    ezstandalone.cmd = ezstandalone.cmd || [];
4    ezstandalone.cmd.push(function() {
5        ezstandalone.define(102,103,104);
6        ezstandalone.enable();
7        ezstandalone.display();
8    });
9</script>

New:

1<script>
2    window.ezstandalone = window.ezstandalone || {};
3    ezstandalone.cmd = ezstandalone.cmd || [];
4    ezstandalone.cmd.push(function() {
5        ezstandalone.showAds(102,103,104);
6    });
7</script>

Not only does it reduce the amount of functions, it also removes the complexity of using define/enable/display with displayMore for dynamic content. Below is an example of how someone might implement a page with dynamically loaded pages, followed by how it can be implemented with showAds

Current:

 1<body>
 2    <!-- static content + placeholders -->
 3    <div class="content1">
 4        <div id="ezoic-pub-ad-placeholder-101"></div>
 5    </div>
 6    <div class="content2">
 7        <div id="ezoic-pub-ad-placeholder-102"></div>
 8    </div>
 9    <div class="content3">
10        <div id="ezoic-pub-ad-placeholder-103"></div>
11    </div>
12    <script>
13        window.ezstandalone = window.ezstandalone || {};
14        ezstandalone.cmd = ezstandalone.cmd || [];
15        ezstandalone.cmd.push(function() {
16            ezstandalone.define(102, 103, 104);
17            ezstandalone.enable();
18            ezstandalone.display();
19        });
20    </script>
21
22                .
23                .
24                .
25
26    <!-- dynamic content + placeholders -->
27    <div class="dynamic content1">
28        <div id="ezoic-pub-ad-placeholder-104"></div>
29        <script>
30            ezstandalone.cmd.push(function() {
31                ezstandalone.displayMore(104)
32            });
33        </script>
34    </div>
35    <div class="dynamic content2">
36        <div id="ezoic-pub-ad-placeholder-105"></div>
37        <script>
38            ezstandalone.cmd.push(function() {
39                ezstandalone.displayMore(105)
40            });
41        </script>
42    </div>
43</body>

New:

 1<body>
 2    <script>
 3        window.ezstandalone = window.ezstandalone || {};
 4        ezstandalone.cmd = ezstandalone.cmd || [];
 5    </script>
 6    <!-- static content + placeholders -->
 7    <div class="content1">
 8        <div id="ezoic-pub-ad-placeholder-101"></div>
 9        <script>
10            ezstandalone.cmd.push(function() {
11                ezstandalone.showAds(101)
12            });
13        </script>
14    </div>
15    <div class="content2">
16        <div id="ezoic-pub-ad-placeholder-102"></div>
17        <script>
18            ezstandalone.cmd.push(function() {
19                ezstandalone.showAds(102)
20            });
21        </script>
22    </div>
23    <div class="content3">
24        <div id="ezoic-pub-ad-placeholder-103"></div>
25        <script>
26            ezstandalone.cmd.push(function() {
27                ezstandalone.showAds(103)
28            });
29        </script>
30    </div>
31
32                .
33                .
34                .
35
36    <!-- dynamic content + placeholders -->
37    <div class="dynamic content1">
38        <div id="ezoic-pub-ad-placeholder-104"></div>
39        <script>
40            ezstandalone.cmd.push(function() {
41                ezstandalone.showAds(104)
42            });
43        </script>
44    </div>
45    <div class="dynamic content2">
46        <div id="ezoic-pub-ad-placeholder-105"></div>
47        <script>
48            ezstandalone.cmd.push(function() {
49                ezstandalone.showAds(105)
50            });
51        </script>
52    </div>
53</body>