Jump to content

(NB41) Enhanced Advertisements


Recommended Posts

  • 2 weeks later...
Posted

Hi newbie -

Is there anyway to block the ads from showing to bots?  The issue that I am running into is that the Indexing crawler is set to Googlebot Smartphone.  However for some reason the ads don't render the mobile version of the ads so Google is penalizing the site for not being mobile friendly when really it is. 

I see two solutions here if possible.

1.)  Allow us to disable ads when bots are crawling the site

2.)  Update to code to check for bots and render the mobile ads for them.

Thanks for any ideas/support you can offer here.

Chad

Posted

Hello,

9 hours ago, BlueEye said:

ideas/support you can offer here.

You can check the bots using 

\IPS\Session::i()->userAgent->spider

Example

{{if \IPS\Session::i()->userAgent->spider}}
	Show code for bots
{{else}}
	Show code for others
{{endif}}

 

Posted

Thank you very much newbie LAC!  Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert.  Could your code in the if statement be altered slightly to ready NOT A SPIDER?  In this case I would simply add that one line to the extra condition area vs. wrapping each advert in an if/else statement.

{{if \IPS\Session::i()->userAgent->spider}}
Posted
15 hours ago, BlueEye said:

Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert.  Could your code in the if statement be altered slightly to ready NOT A SPIDER?

{{if !\IPS\Session::i()->userAgent->spider}}1{{endif}}

 

Posted

One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads?  If not, is there a way to enable an option to lazy load ads?

Thank you!

Chad 

Posted

Hello,

13 hours ago, BlueEye said:

One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads?  If not, is there a way to enable an option to lazy load ads?

Do you mean images?

images.jpg.46dfb0d1a1499079be99e0739b589ced.jpg

If so they don't support lazy load

Posted
7 minutes ago, BlueEye said:

I typically use HTML code.

22 hours ago, BlueEye said:

if I enable Lazy Loading

Anyway you should to add additional code

This code works in adverts

<img {{if settings.lazy_load_enabled}}src="{expression="\IPS\Text\Parser::blankImage()"}" data-{{endif}}src='https://dne4i5cb88590.cloudfront.net/invisionpower-com/profile/photo-thumb-293560.gif' alt='newbie-lac'>
Posted

Dear Newbie LAC

I am now using your plugin again.

It still works fine there is just one small problem. When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices". So I am not able to only show a certain ad only on desktop devices which is a big problem because some of my affiliate ads are not responsive and so they will be therefore cut badly on phone devices.

How can I solve this? Would be amazing if you could help me with that!

Best,

Marcel

Posted

Hello,

3 minutes ago, Marcel Iseli said:

When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices".

I can not reproduce on the latest version.

 

Posted
1 minute ago, newbie LAC said:

Hello,

I can not reproduce on the latest version.

 

Maybe I haven't the last version then. Let me check this. Thanks a lot for the quick reply. I think I have 1.0.8.

oh I did not yet pay the renewal fee. I just did that. and will now try with the latest version!

  • 3 weeks later...
Posted
3 hours ago, breatheheavy said:

Hi there - a while back I purchased (NB40) Ads After X Posts and (NB40) Ads After X Topics. Are these plugins outdated? Do I need to buy this one instead and disable the others? @newbie LAC

Also, if it's possible to still use those plugins I mentioned above... can someone please help me understand how to shows ads based on defined locations.

Specifically, where in the theme can I display an ad after every 10 posts in a thread or every 10 topics in a forum. It would be greatly appreciated!

Posted

Hello,

10 hours ago, breatheheavy said:

a while back I purchased (NB40) Ads After X Posts and (NB40) Ads After X Topics. Are these plugins outdated?

Those plugins work fine.

10 hours ago, breatheheavy said:

Do I need to buy this one instead and disable the others

Why?

7 hours ago, breatheheavy said:

Also, if it's possible to still use those plugins I mentioned above... can someone please help me understand how to shows ads based on defined locations.

Specifically, where in the theme can I display an ad after every 10 posts in a thread or every 10 topics in a forum. It would be greatly appreciated!

Please post issues in the proper topics

https://invisioncommunity.com/forums/topic/421457-nb40-ads-after-x-posts/

https://invisioncommunity.com/forums/topic/421955-nb40-ads-after-x-topics/

 

  • 2 months later...
Posted (edited)
On 5/9/2020 at 5:22 PM, Jirinex said:

Hello,

Is there any way to place an ad on all threads and sub-categories under a category?

Hello,

You can use conditions

{{if isset(\IPS\Output::i()->hiddenElements['nbenhadverts_node_class']) and \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and $forum = \IPS\Output::i()->hiddenElements['nbenhadverts_node_node']}}
{{ try { $category = \IPS\forums\Forum::load(12345); } catch (\OutOfRangeException $e){} }}
{{if $category and $forum->isChildOf($category)}}
1
{{endif}}
{{endif}}

Change the 12345 on category ID

Edited by newbie LAC
Posted
On 5/10/2020 at 8:44 AM, newbie LAC said:

Hello,

You can use conditions


{{if isset(\IPS\Output::i()->hiddenElements['nbenhadverts_node_class']) and \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and $forum == \IPS\Output::i()->hiddenElements['nbenhadverts_node_node']}}
{{ try { $category = \IPS\forums\Forum::load(12345); } catch (\OutOfRangeException $e){} }}
{{if $category and $forum->isChildOf($category))}}
1
{{endif}}
{{endif}}

Change the 12345 on category ID

Hello,

Unfortunately it's not working :sad:
The ad displaying everywhere in the forum, even on the new content feed. We want the ad to display only under all Gaming threads and all the forum gaming sub-categories.

For example:

  • Gaming
    • PC
      • Thread 1
      • Thread 2
    • PlayStation
      • Thread 1
      • Thread 2
    • Xbox
      • Thread 1
      • Thread 2
  • Hardware (not here)
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...