christopher-w Posted January 9, 2020 Posted January 9, 2020 3 hours ago, newbie LAC said: Hello, Do you mean Pages blocks? If so you can do it Yes Pages blocks. Can you show me the syntax please?
newbie LAC Posted January 9, 2020 Author Posted January 9, 2020 2 hours ago, christopher-w said: Can you show me the syntax please? https://invisioncommunity.com/4guides/suite-applications/pages/core-concepts/blocks-r151/ Quote On pages built using custom HTML (or if you want to insert the block in an IPS4 template), a special tag is used to insert the block: {block="block_id"} christopher-w 1
christopher-w Posted January 9, 2020 Posted January 9, 2020 Thanks yes, I did that, but it wasn't working. I assumed I was doing something wrong. I will try again. Thank you.
BlueEye Posted January 23, 2020 Posted January 23, 2020 Hi newbie - Is there anyway to block the ads from showing to bots? The issue that I am running into is that the Indexing crawler is set to Googlebot Smartphone. However for some reason the ads don't render the mobile version of the ads so Google is penalizing the site for not being mobile friendly when really it is. I see two solutions here if possible. 1.) Allow us to disable ads when bots are crawling the site 2.) Update to code to check for bots and render the mobile ads for them. Thanks for any ideas/support you can offer here. Chad
newbie LAC Posted January 24, 2020 Author Posted January 24, 2020 Hello, 9 hours ago, BlueEye said: ideas/support you can offer here. You can check the bots using \IPS\Session::i()->userAgent->spider Example {{if \IPS\Session::i()->userAgent->spider}} Show code for bots {{else}} Show code for others {{endif}}
BlueEye Posted January 24, 2020 Posted January 24, 2020 Thank you very much newbie LAC! Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert. Could your code in the if statement be altered slightly to ready NOT A SPIDER? In this case I would simply add that one line to the extra condition area vs. wrapping each advert in an if/else statement. {{if \IPS\Session::i()->userAgent->spider}}
newbie LAC Posted January 25, 2020 Author Posted January 25, 2020 15 hours ago, BlueEye said: Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert. Could your code in the if statement be altered slightly to ready NOT A SPIDER? {{if !\IPS\Session::i()->userAgent->spider}}1{{endif}}
BlueEye Posted January 25, 2020 Posted January 25, 2020 You are so good! Thanks newbie! Works perfect and seems cleaner to me. 👍
BlueEye Posted January 30, 2020 Posted January 30, 2020 One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads? If not, is there a way to enable an option to lazy load ads? Thank you! Chad
newbie LAC Posted January 31, 2020 Author Posted January 31, 2020 Hello, 13 hours ago, BlueEye said: One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads? If not, is there a way to enable an option to lazy load ads? Do you mean images? If so they don't support lazy load
BlueEye Posted January 31, 2020 Posted January 31, 2020 Ok, thanks for clarification. I typically use HTML code.
newbie LAC Posted January 31, 2020 Author Posted January 31, 2020 7 minutes ago, BlueEye said: I typically use HTML code. 22 hours ago, BlueEye said: if I enable Lazy Loading Anyway you should to add additional code This code works in adverts <img {{if settings.lazy_load_enabled}}src="{expression="\IPS\Text\Parser::blankImage()"}" data-{{endif}}src='https://dne4i5cb88590.cloudfront.net/invisionpower-com/profile/photo-thumb-293560.gif' alt='newbie-lac'>
newbie LAC Posted February 7, 2020 Author Posted February 7, 2020 Hello, 11 hours ago, sulervo said: Compatibility with PHP 7.4.2? @newbie LAC It should be OK
Marcel Iseli Posted February 14, 2020 Posted February 14, 2020 Dear Newbie LAC I am now using your plugin again. It still works fine there is just one small problem. When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices". So I am not able to only show a certain ad only on desktop devices which is a big problem because some of my affiliate ads are not responsive and so they will be therefore cut badly on phone devices. How can I solve this? Would be amazing if you could help me with that! Best, Marcel
newbie LAC Posted February 14, 2020 Author Posted February 14, 2020 Hello, 3 minutes ago, Marcel Iseli said: When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices". I can not reproduce on the latest version.
Marcel Iseli Posted February 14, 2020 Posted February 14, 2020 1 minute ago, newbie LAC said: Hello, I can not reproduce on the latest version. Maybe I haven't the last version then. Let me check this. Thanks a lot for the quick reply. I think I have 1.0.8. oh I did not yet pay the renewal fee. I just did that. and will now try with the latest version!
Marcel Iseli Posted February 14, 2020 Posted February 14, 2020 you are right, this does now work like a charm! Thanks Newbie LAC!
Jordan Miller Posted March 2, 2020 Posted March 2, 2020 Hi there - a while back I purchased (NB40) Ads After X Posts and (NB40) Ads After X Topics. Are these plugins outdated? Do I need to buy this one instead and disable the others? @newbie LAC
Jordan Miller Posted March 2, 2020 Posted March 2, 2020 3 hours ago, breatheheavy said: Hi there - a while back I purchased (NB40) Ads After X Posts and (NB40) Ads After X Topics. Are these plugins outdated? Do I need to buy this one instead and disable the others? @newbie LAC Also, if it's possible to still use those plugins I mentioned above... can someone please help me understand how to shows ads based on defined locations. Specifically, where in the theme can I display an ad after every 10 posts in a thread or every 10 topics in a forum. It would be greatly appreciated!
newbie LAC Posted March 3, 2020 Author Posted March 3, 2020 Hello, 10 hours ago, breatheheavy said: a while back I purchased (NB40) Ads After X Posts and (NB40) Ads After X Topics. Are these plugins outdated? Those plugins work fine. 10 hours ago, breatheheavy said: Do I need to buy this one instead and disable the others Why? 7 hours ago, breatheheavy said: Also, if it's possible to still use those plugins I mentioned above... can someone please help me understand how to shows ads based on defined locations. Specifically, where in the theme can I display an ad after every 10 posts in a thread or every 10 topics in a forum. It would be greatly appreciated! Please post issues in the proper topics https://invisioncommunity.com/forums/topic/421457-nb40-ads-after-x-posts/ https://invisioncommunity.com/forums/topic/421955-nb40-ads-after-x-topics/ Jordan Miller 1
Jirinex Posted May 9, 2020 Posted May 9, 2020 Hello, Is there any way to place an ad on all threads and sub-categories under a category?
newbie LAC Posted May 10, 2020 Author Posted May 10, 2020 (edited) On 5/9/2020 at 5:22 PM, Jirinex said: Hello, Is there any way to place an ad on all threads and sub-categories under a category? Hello, You can use conditions {{if isset(\IPS\Output::i()->hiddenElements['nbenhadverts_node_class']) and \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and $forum = \IPS\Output::i()->hiddenElements['nbenhadverts_node_node']}} {{ try { $category = \IPS\forums\Forum::load(12345); } catch (\OutOfRangeException $e){} }} {{if $category and $forum->isChildOf($category)}} 1 {{endif}} {{endif}} Change the 12345 on category ID Edited May 12, 2020 by newbie LAC
Jirinex Posted May 11, 2020 Posted May 11, 2020 On 5/10/2020 at 8:44 AM, newbie LAC said: Hello, You can use conditions {{if isset(\IPS\Output::i()->hiddenElements['nbenhadverts_node_class']) and \IPS\Output::i()->hiddenElements['nbenhadverts_node_class'] == 'IPS\forums\Forum' and $forum == \IPS\Output::i()->hiddenElements['nbenhadverts_node_node']}} {{ try { $category = \IPS\forums\Forum::load(12345); } catch (\OutOfRangeException $e){} }} {{if $category and $forum->isChildOf($category))}} 1 {{endif}} {{endif}} Change the 12345 on category ID Hello, Unfortunately it's not working The ad displaying everywhere in the forum, even on the new content feed. We want the ad to display only under all Gaming threads and all the forum gaming sub-categories. For example: Gaming PC Thread 1 Thread 2 PlayStation Thread 1 Thread 2 Xbox Thread 1 Thread 2 Hardware (not here)
newbie LAC Posted May 12, 2020 Author Posted May 12, 2020 Hello, 11 hours ago, Jirinex said: Unfortunately it's not working I fixed the code. Jirinex 1
Recommended Posts