Jump to content

(NB41) Enhanced Advertisements

Featured Replies

  • Author

Hello,

 

Node?

Yes.

{{$show = true;}}
{{if $item = \IPS\Output::i()->hiddenElements['nbenhadverts_item_item'] and ($item->mapped('pinned') or $item->mapped('featured'))}}
	{{$show = false;}}
{{elseif $club = \IPS\Output::i()->hiddenElements['nbenhadverts_club'] and $club->featured}}
	{{$show = false;}}
{{endif}}
{{if $show}}
	Show advert everywhere except of pinned and featured items
{{endif}}

 

  • Replies 509
  • Views 56.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Right...I think we all understand this. He's not been heard from since Jan 2021. Unfortunately I'm unable to wait until he's back here to update this application, as I need it updated for 4.6 and

  • newbie LAC
    newbie LAC

    Hello again You can add in your code data-excludequote Example <div style="float:right; position:relative; padding: 0 0 0 5px;" data-excludequote> Google ads code </div&gt

  • Hello, 1. https://invisionpower.com/forums/topic/429838-nb41-enhanced-advertisements/?do=findComment&comment=2638531 2. HTML  {{if (\IPS\Request::i()->app == 'forums' and \IPS\R

Posted Images

Perfect! It is even valid for the featured club features, not only for the club's homepage.

 

  • 3 weeks later...

Hi @newbie LAC

I'm expirimenting with Google Automatic advertisement placing.

For this i just would need 1 location inside the <head>tag

 

I prefer not to edit my Theme directly. Can i create it with a custom location set by your mod?

  • 1 month later...

Type of advertisement: Supply HTML Code 
Show the advertisement: Just below the page header
HTML code:

<script type="text/javascript">

if(window.innerWidth > 1019)
{
    var forums = ["83", "84", "85", "86"];
    var forum_id = request.id;
    if (forums.includes(forum_id)
    {
        // Desktop tag/code 1
    }
    else
    {
        // Desktop tag/code 2
    }
}
else
{
    var forums = ["83", "84", "85", "86"];
    var forum_id = request.id;
    if (forums.includes(forum_id))
    {
        // Mobile tag/code 1
    }
    else
    {
        // Mobile tag/code 2
    }
}
</script>

There is JavaScript in the field of HTML code.. not even know if it's working but it's the best I can make.

1. The first "if" = Desktop or mobile.
2. The second "if" = Two tags available and the forum id defines which one is in use.

Now I don't know how to get "request.id" so do you have an idea how to solve this? Maybe Extra Condition field would work better?

@newbie LAC

Fixed version:

<script type="text/javascript">

if(window.innerWidth > 1019)
{
    var forums = [83, 84, 85, 86];
    var forum_id = {expression="(request.app == 'forums' and request.module == 'forums'and request.controller == 'forums' and isset(request.id)) ? request.id : 0"};
    if (forums.includes(forum_id))
    {
        // Desktop tag/code 1
    }
    else
    {
        // Desktop tag/code 2
    }
}
else
{
    var forums = [83, 84, 85, 86];
    var forum_id = {expression="(request.app == 'forums' and request.module == 'forums'and request.controller == 'forums' and isset(request.id)) ? request.id : 0"};
    if (forums.includes(forum_id))
    {
        // Mobile tag/code 1
    }
    else
    {
        // Mobile tag/code 2
    }
}
</script>

 

Edited by sulervo

  • Author

Hello,

 

Now I don't know how to get "request.id" so do you have an idea how to solve this? Maybe Extra Condition field would work better?

 

    var forum_id = {expression="(request.app == 'forums' and request.module == 'forums'and request.controller == 'forums' and isset(request.id)) ? request.id : 0"};

 

Do you know is it possible to get forum ID in topic view? @newbie LAC

Edited by sulervo

How about JavaScript solution? Sorry I forgot told it. Thank you.

  • Author

Hello,

 

How about JavaScript solution? Sorry I forgot told it. Thank you.

 

// Topic view
var forum_id = {expression="(request.app == 'forums' and request.module == 'forums'and request.controller == 'topic') ? \IPS\Output::i()->hiddenElements['nbenhadverts_node_id'] : 0"};

 

Edited by newbie LAC

  • 1 month later...

Just so you know, i have 2 ads in the sidebar with your app, and for some reason i wasn't able to edit or move any block in the sidebar, any move just would not be saved.

I was able to do it disabling your app and re-enabling it once mu changes were made.

 

  • Author

Hello,

 

Just so you know, i have 2 ads in the sidebar with your app, and for some reason i wasn't able to edit or move any block in the sidebar, any move just would not be saved.

I was able to do it disabling your app and re-enabling it once mu changes were made.

I need more information to reproduce

- Adverts settings

- Widgets locations

Here is a screenshot, if i try to move (or remove) any widget in the sidebar, the move just isn't saved.

image.thumb.png.5cf5dd445dd024a22ab0058cf0c8f24f.png

 

I have 2 ads block (basic div) in the sidebar, both are configured like this :

image.thumb.png.1cc5efc403b92b973ceaebf2282ff345.png

image.thumb.png.91fa500e63f16dc07ce0205d1c9e1396.png

 

  • Author
 

Here is a screenshot, if i try to move (or remove) any widget in the sidebar, the move just isn't saved.

Thanks. I'll look into that

Upd. Fixed for next release.

Edited by newbie LAC

 

Upd. Fixed for next release.

 

Great, thanks for the quick answer.

  • 2 weeks later...

This looks really nice, but there is one thing stopping me from moving from Google Ad Manager. I need the ability to automatically generate click and impression reports and have them sent to different emails addresses.

Question: Is this possible with enhanced advertisements?

  • Author

Hello,

 

Question: Is this possible with enhanced advertisements?

No

  • 2 weeks later...

Does anyone know if I can use this plugin to put an add on a specific thread and only there?

  • Author

Hello,

 

Does anyone know if I can use this plugin to put an add on a specific thread and only there?

Yes using condition or css selector

Edited by newbie LAC

  • 2 weeks later...

Hi @newbie LAC

Just to make sure I understand correctly 🙂

I want on my Forum to add space for Google Adsense between posts in topic view. Every Topic, every page.
For example, after every 7th and 15th post (I have 20 post per page in topic view).
This application of yours can enable this?

  • Author

Hello,

 

I want on my Forum to add space for Google Adsense between posts in topic view. Every Topic, every page.
For example, after every 7th and 15th post (I have 20 post per page in topic view).
This application of yours can enable this?

Yes

 

I want on my Forum to add space for Google Adsense between posts in topic view. Every Topic, every page.
For example, after every 7th and 15th post (I have 20 post per page in topic view).

You can also use 

 

@newbie LAC

Thanks a lot for advice. 👍
I bought (NB40) Ads After X Posts, easily installed, set it up and everything works fine. 🙂

  • 2 weeks later...

@newbie LAC 

With the plugin I can display a banner in a particular forum? If so, could you give an example of how to do this? Thanks!

Recently Browsing 0

  • No registered users viewing this page.