newbie LAC Posted May 19, 2017 Author Posted May 19, 2017 {{if request.controller == 'search' and !isset(request.q)}} <div class="cSearchAd">Advert 1</div> <style> .cSearchAd, div[data-controller="core.front.search.main"] { display: table-cell; } .cSearchAd { float: right; border: 3px solid red; height: 600px; width: 300px; margin: 0 10px; } </style> {{endif}} and {{if request.controller == 'search' and isset(request.q) and request.q == 'adv'}} <div class="cSearchAd">Advert 2</div> <style> .cSearchAd, div[data-controller="core.front.search.main"] { display: table-cell; } .cSearchAd { float: right; border: 3px solid red; height: 600px; width: 300px; margin: 0 10px; } </style> {{endif}} Selector div[data-controller="core.front.search.main"] Position Insert advert before the chosen element(s) MeMaBlue 1
MeMaBlue Posted July 7, 2017 Posted July 7, 2017 On 4/14/2017 at 8:12 AM, newbie LAC said: Hello, CSS selector #elSearch_main [data-role="resultsContents"] .ipsStreamItem:eq(1) Position Insert advert after the chosen element(s) Hello ! what would be the same for showing a banner after the 5th unread topic ? (in the unread list) in this url link ? https://invisioncommunity.com/discover/unread/ [I must say NewbieLac is amazing, he has just helped me put a floating/sticky ad to specific forums only ! super application ]
newbie LAC Posted July 8, 2017 Author Posted July 8, 2017 8 hours ago, MeMaBlue said: Hello ! what would be the same for showing a banner after the 5th unread topic ? (in the unread list) in this url link ? https://invisioncommunity.com/discover/unread/ Hello, Use the same position Selector is [data-streamreadtype="unread"] [data-role="streamContent"] .ipsStreamItem:eq(4) MeMaBlue 1
Bluto Posted July 21, 2017 Posted July 21, 2017 I haven't tested it yet, but will this work with 4.2?
newbie LAC Posted July 21, 2017 Author Posted July 21, 2017 3 hours ago, Bluto said: I haven't tested it yet, but will this work with 4.2? Hello, I've made quick test and the app works. Bluto 1
Darek_Hugo Posted July 24, 2017 Posted July 24, 2017 Hello. Please help. How to insert an ad after the tenth topic in this view https://invisioncommunity.com/forums/forum/238-development-assistance/ Thank you and best regards
newbie LAC Posted July 24, 2017 Author Posted July 24, 2017 11 minutes ago, Hugo_S4 said: Hello. Please help. How to insert an ad after the tenth topic in this view https://invisioncommunity.com/forums/forum/238-development-assistance/ Thank you and best regards Hello, CSS selector [data-pageapp="forums"][data-pagemodule="forums"][data-pagecontroller="forums"] .cTopicList .ipsDataItem:eq(9) Position Insert advert after the chosen element(s) Darek_Hugo and sulervo 2
MeMaBlue Posted July 24, 2017 Posted July 24, 2017 (edited) I am posting instructions I got from newbie LAC that i have already implemented! Here are the selectors for the streams that involve all new posts or new posts from followed or content you have posted in, i.e. what is in there discover/unread/ [data-streamid="1"] [data-role="streamContent"] .ipsStreamItem:eq(4) discover/content-started/ [data-streamid="2"] [data-role="streamContent"] .ipsStreamItem:eq(4) discover/followed-content/ [data-streamid="3"] [data-role="streamContent"] .ipsStreamItem:eq(4) discover/content-posted/ [data-streamid="5"] [data-role="streamContent"] .ipsStreamItem:eq(4) Here is the instructions to Add a STICKY POP UP to SPECIFIC forum ids (the banner will stay put when you scroll) when you press X it will go away. 1) This you put into your Custom.css file .avbxouter { z-index: 2; box-sizing: border-box; position: fixed; bottom: 0; width: 100%; margin-bottom: 0%; } .avbxouter:hover {}.avbxmain { border: 0px solid #fff; height: auto; margin: 0 auto; display: table; position: relative; background: none; } #close { display: inline-block; margin: -15px -25px 0px 0px; opacity: 1.0; cursor: pointer; z-index: 1; } #close:hover { opacity: 0.95 } #close { display: inline-block; margin: -15px -25px 0px 0px; opacity: 1.0; cursor: pointer; z-index: 1; position: absolute; } Edited July 24, 2017 by MeMaBlue Stormlilly 1
MeMaBlue Posted July 24, 2017 Posted July 24, 2017 (edited) 2) then open a new advertisement in the forums inbuilt system and ad this into the first box you need to ADD 2 THINGS : a) the link url of the image that will have the close button X b) your ad code {{if !isset(cookie.nbEnhAdsHeaderBanner)}} <script> $(function() { $( "#nbEnhAdsHeaderBanner" ).on( "click", ".nbEnhAdsHeaderBannerClose", function() { ips.utils.anim.go( "fadeOut", $( "#nbEnhAdsHeaderBanner" ) ); var nbEnhAdvDate = new Date(); nbEnhAdvDate.setTime(nbEnhAdvDate.getTime() + 50 * 60 * 1000); ips.utils.cookie.set('nbEnhAdsHeaderBanner', 1, nbEnhAdvDate.toUTCString()); }); }); </script> <div id="nbEnhAdsHeaderBanner" class="avbxouter"> <div class="avbxmain"> <span id='close' class="nbEnhAdsHeaderBannerClose"> <img src="CREATE and ADD IMAGE URL of the X that will close the box here" width="25" height="25" alt=""/> </span> YOUR ADD CODE HERE! </div> </div> {{endif}} 3) you select at the css selector simply The above code is for ALL forum , for the banner to appear after every 50 minutes the code below is for specific forums only : Edited July 24, 2017 by MeMaBlue
MeMaBlue Posted July 24, 2017 Posted July 24, 2017 This code if for banner to appear in SELECTED forums only. you can see the many numbers -there are the forum ids you need to put. : (109,30,11,10,65,27,165,60,61,118,181,30,11,46,138,159,19,15) This code is set to appear every 5 minutes {{$fid = 0;}} {{if request.app == 'forums' and request.module == 'forums' and request.controller == 'topic' and request.id}} {{ try { $topic = \IPS\forums\Topic::loadAndCheckPerms(request.id); $fid = $topic->container()->_id; } catch(\Exception $e){} }} {{elseif request.app=='forums' and request.module == 'forums' and request.controller == 'forums'}} {{$fid = 0;}} {{endif}} {{if $fid and in_array($fid, array(109,30,11,10,65,27,165,60,61,118,181,30,11,46,138,159,19,15))}} {{if !isset(cookie.nbEnhAdsHeaderBanner)}} <script> $(function() { $( "#nbEnhAdsHeaderBanner" ).on( "click", ".nbEnhAdsHeaderBannerClose", function() { ips.utils.anim.go( "fadeOut", $( "#nbEnhAdsHeaderBanner" ) ); var nbEnhAdvDate = new Date(); nbEnhAdvDate.setTime(nbEnhAdvDate.getTime() + 5 * 60 * 1000); ips.utils.cookie.set('nbEnhAdsHeaderBanner', 1, nbEnhAdvDate.toUTCString()); }); }); </script> <div id="nbEnhAdsHeaderBanner" class="avbxouter"> <div class="avbxmain"> <span id='close' class="nbEnhAdsHeaderBannerClose"><img src="YOUR_IMAGE_URL_HERE_FOR_X_BUTTON" width="25" height="25" alt=""/></span> YOUR AD CODE HERE </div> {{endif}} {{endif}}
newbie LAC Posted August 9, 2017 Author Posted August 9, 2017 17 hours ago, sulervo said: No problems with 4.2? Hello, sulervo 1
Robert Williams Posted September 11, 2017 Posted September 11, 2017 (edited) Hi @newbie LAC, thanks for creating this mod. After moving over from vbulletin, it's been a real struggle to replicate the ads I had before. I've placed the banner ad below so that it appears above every topic in forum 38 using this code which I found earlier on the thread. {{if \IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'topic'}} {{$forumId = 0; try { $topic = \IPS\forums\Topic::loadAndCheckPerms( \IPS\Request::i()->id ); $forumId = $topic->forum_id; } catch( \Exception $e ) {};}} {{endif}} {{if in_array($forumId, array(38))}} code {{endif}} How can I also display it at the top of the page shown below (which displays all the topics in that forum)? Thanks, Rob Edited September 11, 2017 by Robert Williams
newbie LAC Posted September 11, 2017 Author Posted September 11, 2017 Hello, 3 hours ago, Robert Williams said: How can I also display it at the top of the page shown below (which displays all the topics in that forum)? {{if request.app == 'forums' and request.module == 'forums' and request.controller == 'forums' and request.id == 38}} Code {{endif}} Robert Williams 1
Robert Williams Posted September 11, 2017 Posted September 11, 2017 3 hours ago, newbie LAC said: Hello, {{if request.app == 'forums' and request.module == 'forums' and request.controller == 'forums' and request.id == 38}} Code {{endif}} Thanks for that, one last question , could you show me the code I'd use for the above, if I wanted the ad to display at the top of several forums eg 10, 16, 38, 40. I gather I'd need to use an array but I don't know the syntax. Thanks
newbie LAC Posted September 11, 2017 Author Posted September 11, 2017 4 minutes ago, Robert Williams said: Thanks for that, one last question , could you show me the code I'd use for the above, if I wanted the ad to display at the top of several forums eg 10, 16, 38, 40. I gather I'd need to use an array but I don't know the syntax. Thanks {{if request.app == 'forums' and request.module == 'forums' and request.controller == 'forums' and in_array(request.id, array(10, 16, 38, 40))}} Code {{endif}}
MeMaBlue Posted October 4, 2017 Posted October 4, 2017 Hello @newbie LAC ! do you perhaps know and maybe plan to help how to implement scroller ads? its those new ads that show underneath the content , and they have the blessing of users because you scroll over the ad, and therefor can stop if you like it, and it doesnt bother anyone with using the website. here is a link i found that describes them ! http://www.scrollerads.com/ I would very much like to use one of them!
newbie LAC Posted October 4, 2017 Author Posted October 4, 2017 Hello, 1 hour ago, MeMaBlue said: http://www.scrollerads.com/ I would very much like to use one of them! I see how it works but I don't see any guides/faqs there
MeMaBlue Posted October 5, 2017 Posted October 5, 2017 (edited) Could it be that its a paid tool...? Ive seen a number of websites displaying them already here in greece. i will contact them to find out and report back here. ( https://www.iab.com/news/seeking-better-mobile-ad-experiences-scroller-ad-concept/ here is a link describing it, i think its interesting , check it out ) Edited October 5, 2017 by MeMaBlue
Andrzej Pindor Posted October 15, 2017 Posted October 15, 2017 Hi, your app won't work correctly on 4.2.5. no icon in menu in ACP - stats generates error: Error: Cannot instantiate abstract class IPS\Helpers\Chart\Dynamic (0) #0 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Controller.php(85): IPS\nbenhadverts\modules\admin\adverts\_adverts->stats() #1 /var/www/forum.vw-passat.pl/httpdocs/applications/nbenhadverts/modules/admin/adverts/adverts.php(27): IPS\Dispatcher\_Controller->execute() #2 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Dispatcher.php(146): IPS\nbenhadverts\modules\admin\adverts\_adverts->execute() #3 /var/www/forum.vw-passat.pl/httpdocs/admin/index.php(13): IPS\_Dispatcher->run() #4 {main}
newbie LAC Posted October 16, 2017 Author Posted October 16, 2017 Hello, 10 hours ago, Andrzej Pindor said: your app won't work correctly on 4.2.5. All fixed. Bluto and Andrzej Pindor 2
newbie LAC Posted October 27, 2017 Author Posted October 27, 2017 Hello, 13 hours ago, media said: Do you have a link to paypal payment? Why do you need this?
media Posted October 27, 2017 Posted October 27, 2017 7 hours ago, newbie LAC said: Hello, Why do you need this? Never mind I see I can purchase here
Unlucky Posted November 7, 2017 Posted November 7, 2017 Pre Sales Questions Hi, I was going to buy the ad after x posts & ad after x topics but from what I can see this does all of that and more? 1 - A review mentions clickbombing protection. I use google adsense, does this app provide clickbombing protection for adsense? 2 - So can I add adverts anywhere? like ordered in my sidebars? I tend to have a 300x250 followed by 300x600 adverts and have different sets for forum sidebar, calendar sidebar, football sidebar etc. I currently use IP custom blocks to place these so will this give me the ability to replace those? 3 - I also name my ads for the location I place them so I know which ones are performing in adsense. Can I make sure for example, advert 1 in a forum / topic that is in position after 3rd topic / post is a specific advert, then the advert that is after position 5 in a topic post / forum is another specific advert? Thanks in advance.
Recommended Posts