Jump to content

(NB41) Enhanced Advertisements


Recommended Posts

Posted

Hello,

6 hours ago, Sonya* said:

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}}

 

  • 3 weeks later...
Posted

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...
Posted (edited)

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
Posted

Hello,

12 hours ago, sulervo said:

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"};

 

Posted (edited)

Hello,

13 hours ago, sulervo said:

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...
Posted

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.

 

Posted

Hello,

14 hours ago, jesuralem said:

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

Posted

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

 

Posted (edited)
58 minutes ago, jesuralem said:

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
  • 2 weeks later...
Posted

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?

  • 2 weeks later...
Posted (edited)

Hello,

4 minutes ago, Jirinex said:

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...
Posted

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?

Posted

Hello,

7 hours ago, Nesa said:

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

7 hours ago, Nesa said:

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 

 

  • 2 weeks later...
  • Recently Browsing   0 members

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