Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
newbie LAC Posted January 29, 2018 Author Posted January 29, 2018 1 minute ago, Hugo_S4 said: Will you tell me what condition to apply to exclude an ad from the login page? https://example.com/login/ Add in extra condition field {{if !(request.app == 'core' and request.module == 'system' and request.controller == 'login')}}1{{endif}}
sulervo Posted February 7, 2018 Posted February 7, 2018 (edited) How to show banner only in the front page / home page index page? Not in global header. No need for CSS selector. I have custom location key in use. Edited February 7, 2018 by sulervo
newbie LAC Posted February 8, 2018 Author Posted February 8, 2018 Hello, 13 hours ago, sulervo said: No need for CSS selector. I have custom location key in use. Add in Extra condition field {{if request.app == 'forums' and request.module == 'forums' and request.controller == 'index'}}1{{endif}} sulervo 1
Unlucky Posted February 14, 2018 Posted February 14, 2018 Hi, Is there a way to only show adverts to someone if they are on a mobile phone?
newbie LAC Posted February 14, 2018 Author Posted February 14, 2018 Just now, Unlucky said: Hi, Is there a way to only show adverts to someone if they are on a mobile phone? Hello, There is per advert setting
2002faq Posted February 14, 2018 Posted February 14, 2018 Installing the App broke the page layout for me. I had to disable it as the site is live, but is there anything i can provide you to help investigate here are the screenshots of the broken pages The live pages are https://www.bmw2002faq.com/ https://www.bmw2002faq.com/forums/topic/213717-hemmings-1975-2002-for-sale/ thank you, Steve K.
newbie LAC Posted February 15, 2018 Author Posted February 15, 2018 Hello, 7 hours ago, misfit76 said: but is there anything i can provide you to help investigate Could you give me acp access?
loccom Posted February 22, 2018 Posted February 22, 2018 installed 1.0.6 and now my ads are like attached Above the buttons is an adsense leaderboard
newbie LAC Posted February 22, 2018 Author Posted February 22, 2018 Hello, 8 minutes ago, loccom said: installed 1.0.6 and now my ads are like attached Send me the codes of those ads
loccom Posted February 22, 2018 Posted February 22, 2018 3 minutes ago, newbie LAC said: Hello, Send me the codes of those ads messaged
gavpedz Posted February 22, 2018 Posted February 22, 2018 Loving this app so far wondering how i might be able to stop showing ads on error pages though as far as i am aware google doesn't like Adsense ads to show on error pages like 404 not found etc.
newbie LAC Posted February 22, 2018 Author Posted February 22, 2018 20 minutes ago, loccom said: messaged Thanks 14 minutes ago, gavpedz said: Loving this app so far wondering how i might be able to stop showing ads on error pages though as far as i am aware google doesn't like Adsense ads to show on error pages like 404 not found etc. Hello, To exclude all error pages you can add in Extra condition field {{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}}
loccom Posted February 22, 2018 Posted February 22, 2018 11 minutes ago, newbie LAC said: Thanks Hello, To exclude all error pages you can add in Extra condition field {{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}} i tried adding that to an exsisiting condition and does not work. How do you add 2 conditions?
newbie LAC Posted February 22, 2018 Author Posted February 22, 2018 1 minute ago, loccom said: How do you add 2 conditions? use and {{if 1==1 and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}}
loccom Posted February 22, 2018 Posted February 22, 2018 this just breaks the original one {{if !(request.app == 'core' and request.module == 'system' and in_array(request.controller, array('register', 'login')))}}1{{endif}} {{if 1==1 and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}}
gavpedz Posted February 22, 2018 Posted February 22, 2018 (edited) 20 minutes ago, newbie LAC said: Thanks Hello, To exclude all error pages you can add in Extra condition field {{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}} Perfect thank you! 3 minutes ago, loccom said: this just breaks the original one {{if !(request.app == 'core' and request.module == 'system' and in_array(request.controller, array('register', 'login')))}}1{{endif}} {{if 1==1 and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}} What i am doing is using the global settings to stop ads showing on any login and register url so no need for the login conditional then just adding the one error page conditional. Edited February 22, 2018 by gavpedz
newbie LAC Posted February 22, 2018 Author Posted February 22, 2018 1==1 is an example You need combine yours conditions {{if !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page']) and !(request.app == 'core' and request.module == 'system' and in_array(request.controller, array('register', 'login')))}}1{{endif}}
gavpedz Posted February 22, 2018 Posted February 22, 2018 (edited) I seem to have another issue i need to fix. I have two forums that are private as in they are only visible and accessible to logged in members. I added the forum sections url to the global settings which stopped ads within the topic list of that forum but if a click a topic within that forum ads try and show how can i stop ads from showing in any topic of a particular forum, please? Oh also any trickery to show ads after either the first unread post within a topic or the last post if already read? Edited February 22, 2018 by gavpedz
newbie LAC Posted February 23, 2018 Author Posted February 23, 2018 (edited) 19 hours ago, gavpedz said: I added the forum sections url to the global settings which stopped ads within the topic list of that forum but if a click a topic within that forum ads try and show how can i stop ads from showing in any topic of a particular forum, please? I'm afraid you can't do it with that setting. You need to use condition. 19 hours ago, gavpedz said: Oh also any trickery to show ads after either the first unread post within a topic Try Selector .ipsCommentUnreadSeperator + a + article.cPost Position Insert advert after the chosen element(s) 19 hours ago, gavpedz said: the last post if already read? https://invisioncommunity.com/forums/topic/429838-nb41-enhanced-advertisements/?do=findComment&comment=2668271 Just change position Edited February 23, 2018 by newbie LAC
gavpedz Posted February 23, 2018 Posted February 23, 2018 2 hours ago, newbie LAC said: I'm afraid you can't do it with that setting. You need to use condition. Ok what conditional would I need to use for that please? To exclude ads in private forums and topics within those forums.
newbie LAC Posted February 23, 2018 Author Posted February 23, 2018 (edited) 3 hours ago, gavpedz said: Ok what conditional would I need to use for that please? To exclude ads in private forums and topics within those forums. {{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'}} {{try { $topic = \IPS\forums\Topic::loadAndCheckPerms( \IPS\Request::i()->id ); $forumId = $topic->forum_id; } catch( \Exception $e ) {};}} {{endif}} {{if !(isset($forumId) and in_array($forumId, array(1,2,3)))}} 1 {{endif}} Change IDs in array(1,2,3) on forums IDs Edited February 23, 2018 by newbie LAC
gavpedz Posted February 23, 2018 Posted February 23, 2018 (edited) 1 hour ago, newbie LAC said: {{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'}} {{try { $topic = \IPS\forums\Topic::loadAndCheckPerms( \IPS\Request::i()->id ); $forumId = $topic->forum_id; } catch( \Exception $e ) {};}} {{endif}} {{if isset($forumId) and in_array($forumId, array(1,2,3))}} 1 {{endif}} Change IDs in array(1,2,3) on forums IDs Thank you so much for your help. I just have the extra conditionals box like this now but the ads still show in the private forum topics {{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'}} {{try { $topic = \IPS\forums\Topic::loadAndCheckPerms( \IPS\Request::i()->id ); $forumId = $topic->forum_id; } catch( \Exception $e ) {};}} {{endif}} {{if isset($forumId) and in_array($forumId, array(5,2,21))}} 1 {{endif}} {{if 1==1 and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page'])}}1{{endif}} Edited February 23, 2018 by gavpedz
newbie LAC Posted February 23, 2018 Author Posted February 23, 2018 (edited) 19 minutes ago, gavpedz said: I just have the extra conditionals box like this now but the ads still show in the private forum topics Sorry. I read incorrect your post. I've changed my code. Edited February 23, 2018 by newbie LAC
gavpedz Posted February 23, 2018 Posted February 23, 2018 (edited) 12 minutes ago, newbie LAC said: Sorry. I read incorrect your post. I've changed my code. Thank you but the code doesnt seem any different. What i mean is the new code doesnt make a difference. Ads still show in those particular forums and the topics within those forums. Edited February 23, 2018 by gavpedz
Recommended Posts