Mike_ Posted July 11, 2016 Posted July 11, 2016 1 minute ago, newbie LAC said: Hello, Yes. Use https://invisionpower.com/4guides/themes-and-customizations/template-syntax/ or tell me where you want add adverts and I'll help Hi! Thanks for quick reply! For instance I need to show my advert code (this is popup java window) with all topics in forums id 110 and id 111. Could you please provide code for such example? Thanks in advance!
newbie LAC Posted July 11, 2016 Author Posted July 11, 2016 13 minutes ago, Mike_ said: For instance I need to show my advert code (this is popup java window) with all topics in forums id 110 and id 111. Could you please provide code for such example? Change {{if !in_array($forumId, array(9))}} to {{if in_array($forumId, array(110, 111))}}
Mike_ Posted July 11, 2016 Posted July 11, 2016 (edited) 5 hours ago, newbie LAC said: Change {{if !in_array($forumId, array(9))}} to {{if in_array($forumId, array(110, 111))}} Thanks, but I think there is a missunderstanding. I need to execute my code when a user opens any topic inside forums 110 and 110. But your example mentioned above is about list of topics inside forums, I guess... Oh, very sorry, I was wrong. Everything is OK now :^) Thanks a lot FY app and support! Regards, Mike Edited July 11, 2016 by Mike_
Mike_ Posted July 11, 2016 Posted July 11, 2016 And please another one question, if possibe: what about same code for pages? I need to show advert code for articles within categories id 2 and 5 for instance. Thanks in advance, Mike
newbie LAC Posted July 11, 2016 Author Posted July 11, 2016 49 minutes ago, Mike_ said: I need to show advert code for articles within categories id 2 and 5 for instance. {{if \IPS\Dispatcher::i()->application->directory == 'cms' and \IPS\cms\Databases\Dispatcher::i()->recordId and in_array(\IPS\cms\Databases\Dispatcher::i()->categoryId, array(2, 5))}} code {{endif}} Mike_ 1
RooMac Posted July 29, 2016 Posted July 29, 2016 @newbie LAC Do you have any screenshots for the file? Nothing comes when I click on screenshots. Please update the file. Thanks
newbie LAC Posted July 30, 2016 Author Posted July 30, 2016 12 hours ago, Peter Sowerby said: @newbie LAC Do you have any screenshots for the file? Nothing comes when I click on screenshots. Please update the file. Thanks Hello, All screenshots are displayed. Maybe you use adblock.
Sergey_SV Posted December 20, 2016 Posted December 20, 2016 Hi, is it compatible with 4.1.17.1? I just installed it and try to execute the example from the 1st post. The add apears, but the whole design exploded, all menus are open
newbie LAC Posted December 20, 2016 Author Posted December 20, 2016 10 minutes ago, Sergey_SV said: Hi, is it compatible with 4.1.17.1? Helo, Yes. 8 minutes ago, Sergey_SV said: The add apears, but the whole design exploded, all menus are open Look like js files is broken. Try rebuild caches. Run "Something isn't working correctly" tool.
newbie LAC Posted December 20, 2016 Author Posted December 20, 2016 2 minutes ago, Sergey_SV said: Found out it conflicts with this plugin Confirmed. I need some time to debug
newbie LAC Posted December 20, 2016 Author Posted December 20, 2016 19 minutes ago, Sergey_SV said: Found out it conflicts with this plugin That plugin has wrong theme hook data 'selector' => 'html > body', 'type' => 'add_before', Simple output is <!DOCTYPE html> <html lang="en-US" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Forums - IPS Community Suite</title> </head> <p>plugin code</p> <body> </body> </html> It's not valid Change 'type' => 'add_before', to 'type' => 'add_inside_start', Sergey_SV 1
Sergey_SV Posted December 20, 2016 Posted December 20, 2016 @newbie LAC Thank you for support!! Great app, works great! @Edward Shephard may be interesting for you to correct in the plugin.
Mike_ Posted December 20, 2016 Posted December 20, 2016 (edited) Hello! I'd like to insert adverts into following places: 1. After categories id=5 and id=6 on index page 2. Before the last post in topics excluding categories id=15 and id=14. Could you please provide a code? Thanks in advace! Edited December 20, 2016 by Mike_
BN_IT_Support Posted December 20, 2016 Posted December 20, 2016 2 hours ago, Sergey_SV said: @newbie LAC Thank you for support!! Great app, works great! @Edward Shephard may be interesting for you to correct in the plugin. Yeh I knew about that but as it hadn't caused a problem I was going to leave it to the next iteration. I'll update it later today. Thanks
newbie LAC Posted December 21, 2016 Author Posted December 21, 2016 Hello, 13 hours ago, Mike_ said: 1. After categories id=5 and id=6 on index page 2. Before the last post in topics excluding categories id=15 and id=14. 1. https://invisionpower.com/forums/topic/429838-nb41-enhanced-advertisements/?do=findComment&comment=2638531 2. HTML {{if (\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) { $forumId = 0; };}} {{if !in_array($forumId, array(14,15))}} Advert before last post {{endif}} {{endif}} Selector article.cPost:last() Position Insert advert before the chosen element(s) motomac and Mike_ 2
Joey_M Posted December 21, 2016 Posted December 21, 2016 I didn't know about this, but may it be possible to add click protection for ad codes like Adsense? It looks quite ideal if there was a way for you to support the above, the issues I've had with my fan site has been a real killer. I'm currently being protected for cyber attacks but I am very cautious about adding my adsense account again. I don't want to lose potential income again for a second time, especially because of vindictive people clickbombing my site in order to set it back. Would certainly purchase this. I'll leave it in your ball court @newbie LAC
newbie LAC Posted December 22, 2016 Author Posted December 22, 2016 Hello, 16 hours ago, Joey_M said: I didn't know about this, but may it be possible to add click protection for ad codes like Adsense? Your post is suggestion. I need more info. Add "click limits" for all ads or set for every separately.
Joey_M Posted December 22, 2016 Posted December 22, 2016 9 hours ago, newbie LAC said: Hello, Your post is suggestion. I need more info. Add "click limits" for all ads or set for every separately. Would be possible to automatically recognise codes like Adsense? Then apply a click limit per each code used (HTML/Adsense). If the ads are clicked to many times, maybe it could display an in-house banner instead? Leaving the space for advertisements but ones which are already safe from malicious activity.
newbie LAC Posted December 23, 2016 Author Posted December 23, 2016 14 hours ago, Joey_M said: Would be possible to automatically recognise codes like Adsense? Then apply a click limit per each code used (HTML/Adsense). If the ads are clicked to many times, maybe it could display an in-house banner instead? Leaving the space for advertisements but ones which are already safe from malicious activity. I think Yes. Joey_M 1
Joey_M Posted December 23, 2016 Posted December 23, 2016 I should have said it would best if the click limit was universal for adsense codes (not per each code) - I meant it would work for each adsense ad placed. Perhaps a setting for what banner to show instead of the html ad (when the protection is activated). Thanks Newbie.
Mike_ Posted January 5, 2017 Posted January 5, 2017 Hello @newbie LAC! Many thanks FY support! Could you please also provide following codes: 1. Advert after 3rd post in activity feed 2. Advert after first subcategory in category? Thanks in advace!
newbie LAC Posted January 5, 2017 Author Posted January 5, 2017 Just now, Mike_ said: Hello @newbie LAC! Could you please also provide following codes: 1. Advert after 3rd post in activity feed 2. Advert after first subcategory in category? Hello, 1. You mean https://invisionpower.com/discover/? 2. On index page or on category page
Mike_ Posted January 5, 2017 Posted January 5, 2017 Just now, newbie LAC said: Hello, 1. You mean https://invisionpower.com/discover/? Yes Quote 2. On index page or on category page On Category page
Recommended Posts