+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Smarty literal and adsense issue

  1. #11
    Hello Wei Hong,

    Nope, you cannot use google adsense with the banner plugin.
    Viktor,
    Flynax technical department,
    Best wishes.

  2. #12
    Quote Originally Posted by Viktor View Post
    Hello Wei Hong,

    Nope, you cannot use google adsense with the banner plugin.
    Hi Viktor,

    But the header banner can be used for google adsense right? Like I saw on demo?
    Also regular banner plugin with position banner in grid is there anyway to change the position. I have a category with 6 listings only but it seems that this banner in grid only appear after the 9 listings. Can I change it?

  3. #13
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Quote Originally Posted by Viktor View Post
    Nope, you cannot use google adsense with the banner plugin.
    Hello Wei Hong,

    In fact, you can use any js code either in banner plugin or in content box using HTML type and 'header banner' side

  4. #14
    Hi Rudi, Viktor,

    I'm trying to add this adsense code to a html content box

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- sidebar Ads -->
    <ins class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-***********"
    data-ad-slot="********"
    data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    When I hit save button it remove this ins part so the red ins part is removed once I saved
    From this
    <div class="adx">
    <div class="adx-header">Advertisement</div>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- sidebar Ads -->
    <ins class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-************"
    data-ad-slot="*******"
    data-ad-format="auto"></ins>

    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    It became this
    <div class="adx">
    <div class="adx-header">Advertisement</div>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- sidebar Ads -->
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    I tried to apply the fix that Viktor recommened in page 1 to edit block.inc.php in admin folder but it still remove the ins
    Last edited by Wei Hong; April 23, 2018 at 10:44 AM.

  5. #15
    You can set Content box with 'Header banner' position and put google adsense there.

    Choose box type as 'Smarty'
    and put google adsense code between {literal} google ads code ... {/literal}
    and check again.
    Last edited by Viktor; April 23, 2018 at 09:19 AM.
    Viktor,
    Flynax technical department,
    Best wishes.

  6. #16
    Quote Originally Posted by Viktor View Post
    You can set Content box with 'Header banner' position and put google adsense there.

    Choose box type as 'Smarty'
    and put google adsense code between {literal} google ads code ... {/literal}
    and check again.
    THanks Viktor,

    How about html content box? I make some styling by adding border and some text around google ads. Is there any way to make html content box not to remove the <ins> part?

  7. #17
    If you know html and css styles you can add any text in Smarty box also.
    Viktor,
    Flynax technical department,
    Best wishes.

  8. #18
    Quote Originally Posted by Viktor View Post
    If you know html and css styles you can add any text in Smarty box also.
    Hi Viktor,

    I copy this code to a smarty content box:
    <div class="adx">
    <div class="adx-header">Advertisement</div>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- sidebar Ads -->
    <ins class="adsbygoogle"
    *** style="display:block"
    *** data-ad-client="ca-pub-**********"
    *** data-ad-slot="*******"
    *** data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>
    When I click save, it became like this
    Arent there any way to make this smarty and html content box not changing or removing our code? hu hu hu
    {literal}<div class=&quot;adx&quot;>
    <div class=&quot;adx-header&quot;>Advertisement</div>
    <script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;></script>
    <!-- sidebar Ads -->
    <ins class=&quot;adsbygoogle&quot;
    style=&quot;display:block&quot;
    data-ad-client=&quot;ca-pub-***********&quot;
    data-ad-slot=&quot;*********&quot;
    data-ad-format=&quot;auto&quot;></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>{/literal}

  9. #19
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    you should use css styles without a symbol * inside like in your previous example
    so it should be:

    Code:
    Only registered members can view the code.
    and you can also use in html box
    Last edited by Rudi; April 23, 2018 at 12:12 PM.

  10. #20
    Senior Member
    Join Date
    Jun 2016
    Posts
    185
    Quote Originally Posted by Wei Hong View Post
    Hi Viktor,

    I copy this code to a smarty content box:


    When I click save, it became like this
    Arent there any way to make this smarty and html content box not changing or removing our code? hu hu hu
    you should use the fix from page one to not change quote signs and publish as is instead of &quot;

+ Reply to Thread