Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
February 23, 20186 yr Author 2 minutes ago, gavpedz said: Thank you but the code doesnt seem any different. Before {{if isset($forumId) and in_array($forumId, array(1,2,3))}} after {{if !(isset($forumId) and in_array($forumId, array(1,2,3)))}}
February 23, 20186 yr Sorry i edited my post i tried this but ads are still showing in those particular forums and the topics within them.
February 23, 20186 yr Author 2 minutes ago, gavpedz said: Sorry i edited my post i tried this but ads are still showing in those particular forums and the topics within them. Show me the code from extra condition field
February 23, 20186 yr 1 minute ago, newbie LAC said: Show me the code from extra condition field This is what i have. I tried clearing the cache as well just in case but no change. This is for an Adsense ad that is using a customer header position just under the built in header position {{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, 20186 yr by gavpedz
February 23, 20186 yr Author Just now, gavpedz said: This is what i have. {{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(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page']) and !(isset($forumId) and in_array($forumId, array(5,2,21)))}} 1 {{endif}}
February 23, 20186 yr 3 minutes 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(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page']) and !(isset($forumId) and in_array($forumId, array(5,2,21)))}} 1 {{endif}} Ah yes fantastic that works like a charm!
February 23, 20186 yr I have one particular ad that I need to adjust this code for slightly. It's an ad that shows in the sidebar. Is there a way to adjust the above code to stop showing this particular ad on the index page but will show in the sidebar on other pages?
February 23, 20186 yr Author 1 minute ago, gavpedz said: I have one particular ad that I need to adjust this code for slightly. It's an ad that shows in the sidebar. Is there a way to adjust the above code to stop showing this particular ad on the index page but will show in the sidebar on other pages? Is this another advert? How you configured it?
February 23, 20186 yr So basically at the moment, it is just a simple Adsense ad which shows in the sidebar globally. I have the sidebar turned on globally. I am using your conditional above to ensure it doesn't show on error pages and in private forums which works great but I don't want it to show on the forum index as it's too long. So in addition to the conditionals above i also want to stop it showing on the index page. Edited February 23, 20186 yr by gavpedz
February 23, 20186 yr Author 6 minutes ago, gavpedz said: So in addition to the conditionals above i also want to stop it showing on the index page. {{$indexPage = (\IPS\Request::i()->app == 'forums' and \IPS\Request::i()->module == 'forums' and \IPS\Request::i()->controller == 'index');}} {{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 !$indexPage and !isset(\IPS\Output::i()->hiddenElements['nbenhadverts_error_page']) and !(isset($forumId) and in_array($forumId, array(5,2,21)))}} 1 {{endif}}
March 29, 20186 yr I like your work, one question before add into my wishlist ? It work also for commerce app "selling advertisements"?
March 29, 20186 yr Author 4 hours ago, BomAle said: It work also for commerce app "selling advertisements"? Hello, When someone bought the advert that advert will be displayed on adverts page. You can edit that advert.
May 10, 20186 yr On 2/14/2018 at 1:24 PM, newbie LAC said: Hello, There is per advert setting Hello Newbie Lac! I just got advice from support saying this method only works for images but not for code tags. They referred me to you ? can you give me directions how to best implement code a for desktop code b for tablet code c for mobile ? for the same placement ? ) am now just testing it on "After post 1 " placement but at a later time will want to implement this also on other placements via your app and plugin
May 10, 20186 yr Author Hello, 23 minutes ago, MeMaBlue said: I just got advice from support saying this method only works for images but not for code tags. They referred me to you This should also works for code. Show me the advert settings. Anyway if you work with code you can use 23 minutes ago, MeMaBlue said: for the same placement ? ) Not sure what you mean Edited May 10, 20186 yr by newbie LAC
May 15, 20186 yr How to install this plugin? There's no manual anywhere. I downloaded the file and it's .tar not .xml. So I cannot upload it via administrator panel. I tried to unzip and upload to the /plugins/ folder via FTP but it doesn't work too.
May 15, 20186 yr Author 20 minutes ago, ramm said: How to install this plugin? There's no manual anywhere. I downloaded the file and it's .tar not .xml. So I cannot upload it via administrator panel. I tried to unzip and upload to the /plugins/ folder via FTP but it doesn't work too. Hello, It's an application Go to AdminCP -> System -> Applications -> Install. Select .tar file and then click Install button.
May 15, 20186 yr @newbie LACthank you! I thought it's plugin, not application. Anyway I have this error: I guess something is wrong with my server? I downloaded the newest version (for 4.3) and my forum is 4.2.9. Is it a problem? Edited May 15, 20186 yr by ramm
May 16, 20186 yr Author 11 hours ago, ramm said: Anyway I have this error: Where (page/location) and when (after installation/during installation) you get that error? Do you have the missing file?
May 16, 20186 yr Administrator panel -> applications It's during installation. I checked on my server via FTP and yes. The "missing" file is there. Now I have another error when I click "install": 2C133/4 The application you are attempting to install appears to be installed already. To reinstall the application you must first uninstall it.
May 16, 20186 yr Author 18 minutes ago, ramm said: 2C133/4 The application you are attempting to install appears to be installed already. To reinstall the application you must first uninstall it. 1. Try delete the app using direct link domain.tld/admin/?adsess=2g062ahjjsl8sh501jfsi24na4&app=core&module=applications&controller=applications&do=delete&id=nbenhadverts 2. Delete the folder nbenhadverts from applications directory (use ftp) 3. Install the app Quote Go to AdminCP -> System -> Applications -> Install.Select .tar file and then click Install button.
May 17, 20186 yr After I have upgraded to 4.2.9 from 4.1.19 I see a strange behavior with advertisement. I set up advertisement, and they dispayed ok in all locations, but then after 1-2 days they stop showing, and only resume is I clear the cache via ACP. Then they again resume for 1-2 days. on 4.1.19 everything worked fine. Do you have idea why this could happend?