Jump to content

(NB41) Enhanced Advertisements

Featured Replies

  • Author
10 hours ago, Silnei L Andrade said:

Hi @newbie LAC, with this plugin i can remove ADS of certain forums?

Hello,

You can create adverts and use conditions where to display adverts

Example

Edited by newbie LAC

  • 2 weeks later...
  • Replies 509
  • Views 52.7k
  • 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

have version 1.0.8 installed. Set up an ad to use geo countries. But it ignores the country and displays whatever country i choose. I select Argentina and still shows in uk.

Any ideas what could be wrong @newbie LAC ?

  • Author

Hello,

16 minutes ago, loccom said:

have version 1.0.8 installed. Set up an ad to use geo countries. But it ignores the country and displays whatever country i choose. I select Argentina and still shows in uk.

Any ideas what could be wrong @newbie LAC ?

Could you tell me that UK ip address? I'll check it.

Be sure you use IPS GEO service.

2 minutes ago, newbie LAC said:

Hello,

Could you tell me that UK ip address? I'll check it.

Be sure you use IPS GEO service.

Its definatly a UK IP, I use the same ip on other systems, and I have GEO turned on in club enhancements too

ahh i think its because my IPS subscription ran out the other day. Clever old IPS

Yep.. works now. Thanks

  • 3 weeks later...

Hi

I am trying to workaround the Adsence requiment for not serving ads in several topics with "improper" content.

this I could do with, 

{{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic' and in_array(\IPS\Request::i()->id, array(107168,164188))}}

and serving the static ad with ELSE condition

but also I have several forums locked for guests and because IPS could no provide solution for allowing the Adsense crawler in this forums, google serve no ads there.

I tried to solve this issue with ELSEIF condition, but then whle code became too bulky and duplicate.

 

Coudl I somehow combine the following logic to serve the ads in the topic view:

If the ForumID = a,b,c OR TopicID=  d,e,f  then "Code1"

else "code 2"

 

Thank you

  • Author

Hello,

13 minutes ago, Sergey_SV said:

Coudl I somehow combine the following logic to serve the ads in the topic view:

If the ForumID = a,b,c OR TopicID=  d,e,f  then "Code1"

 else "code 2"

{{$forumId = 0; $topicId = 0;}}
{{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'forums'}}
    {{$forumId = \IPS\Request::i()->id;}}
{{elseif \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic'}}
    {{$topicId = \IPS\Request::i()->id; try { $topic = \IPS\forums\Topic::loadAndCheckPerms(\IPS\Request::i()->id); $forumId = $topic->forum_id; } catch(\Exception $e) {};}}
{{endif}}
{{if in_array($forumId, array('a','b','c')) or in_array($topicId, array('d','e','f'))}}
	Code1
{{else}}
	code 2
{{endif}}

 

Edited by newbie LAC

@newbie LAC 

In "Extra condition", A script will be allowed to not serve ads in Clubs

  • Author

Hello,

3 minutes ago, DSyste said:

@newbie LAC 

In "Extra condition", A script will be allowed to not serve ads in Clubs

I'll upload new version coming soon. Sorry for delay

I would not like to use variable "forumid" to specify all the forums where I do not want the advertisement. Would not it have another variable that could identify that we are in a club and thus not publish the banner?

15 minutes ago, newbie LAC said:

Hello,


{{$forumId = 0; $topicId = 0;}}
{{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'forums'}}
    {{$forumId = \IPS\Request::i()->id;}}
{{elseif \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic'}}
    {{$topicId = \IPS\Request::i()->id; try { $topic = \IPS\forums\Topic::loadAndCheckPerms(\IPS\Request::i()->id); $forumId = $topic->forum_id; } catch(\Exception $e) {};}}
{{endif}}
{{if in_array($forumId, array('a','b','c')) or in_array($topicId, array('d','e','f'))}}
	Code1
{{else}}
	code 2
{{endif}}

 

Great! worked like a charm

  • Author
1 minute ago, DSyste said:

I would not like to use variable "forumid" to specify all the forums where I do not want the advertisement

No need to do it.

1 minute ago, DSyste said:

Would not it have another variable that could identify that we are in a club and thus not publish the banner?

No. Forum created in the club is a forum and looks like forum.

I added 1 variable to determine club pages

Wait while I'll upload new version

What's New in Version 1.0.9 ? :rolleyes:

  • Author
12 minutes ago, DSyste said:

What's New in Version 1.0.9 ? :rolleyes:

Hello,

Read file changelog

  • Author

Show advert on all pages except clubs

{{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_club_id'])}}
    This advert doesn't display in clubs
{{endif}}

 

20 minutes ago, newbie LAC said:

Show advert on all pages except clubs


{{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_club_id'])}}
    This advert doesn't display in clubs
{{endif}}

 

Worked like a charm. 😎

Would not it be nice to have nbenhadverts_forum_id too?

It would be simpler and I believe that faster too.

  • Author
1 minute ago, DSyste said:

Would not it be nice to have nbenhadverts_forum_id too?

I added for nodes

\IPS\Output::i()->hiddenElements['nbenhadverts_node_id']

But this afffect to all nodes: forum, files category, calendar etc

You can use something like

{{if \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and \IPS\Output::i()->hiddenElements['nbenhadverts_node_id'] == 5}}
	Show advert in the forum with ID 5 including topics
{{endif}}

 

Perfect !!! kiss.gif

My script before:

{{if request.app == 'forums' and request.module == 'forums' and request.do != 'add' and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_club_id'])}}
    {{$forumId = 0; try { $topic = \IPS\forums\Topic::loadAndCheckPerms( \IPS\Request::i()->id ); $forumId = $topic->forum_id; } catch( \Exception $e ) {};}}
{{if !in_array($forumId, array(26,10))}}1{{endif}}{{endif}}

 

Current Script:

{{if \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and request.do != 'add' and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_club_id']) and !in_array(\IPS\Output::i()->hiddenElements['nbenhadverts_node_id'], array(26,10))}}1{{endif}}

 

Is anyone having issues with ads not auto renewing? 

In the last month even though invoices have been paid the ads linked to those are not auto renewed and are left disabled meaning I have to go and manually adjust the end date where as before this would be done automatically on invoice payment. 

  • Author

Hello,

4 hours ago, gavpedz said:

Is anyone having issues with ads not auto renewing? 

In the last month even though invoices have been paid the ads linked to those are not auto renewed and are left disabled meaning I have to go and manually adjust the end date where as before this would be done automatically on invoice payment. 

Not sure this issue related with my app.

You can show an ad only after the user has created a topic?

Today I use this way but I do not have the expected result -> member.member_posts == 1

It would spend something like -> member.member_topics == 1

Edited by DSyste

  • Author

Hello,

15 hours ago, DSyste said:

You can show an ad only after the user has created a topic?

sql-query only

{{if \IPS\Member::loggedIn()->member_id and \IPS\Db::i()->select('COUNT(*)', 'forums_topics', array('starter_id=?', \IPS\Member::loggedIn()->member_id))->first() == 1}}

 

  • 2 weeks later...

images not working here: (i cant find extra information about this product)

 

 

Edited by Maxtor

  • Author

Hello,

10 hours ago, Maxtor said:

(i cant find extra information about this product)

Ask here

10 hours ago, Maxtor said:

images not working here:

 

 

enh_ad_1_acp.png

enh_ad_1_public.png

enh_ad_2_acp.png

enh_ad_2_public.png

enh_ad_3_acp.png

enh_ad_31_public.png

enh_ad_32_public.png

enh_ad_bl_ips.png

enh_ad_bl_ips2.png

enh_ad_clicks.png

enh_ad_clicks_settings.png

enh_ad_stats.png

Screenshots are broken.

Recently Browsing 0

  • No registered users viewing this page.