jp Posted November 29, 2015 Posted November 29, 2015 Hi, Can i please request IPS to create a widget to more easily place advertisements. So in the front end Block Manager, we can have the choice of Advertisements that we can just drag to the position we want it to show! Currently the system is not user friendly at all, as it is far too difficult to work out what file you need to open and edit to create a custom location when adding that in the advertisements. I haven't managed to get it to work
jp Posted November 29, 2015 Author Posted November 29, 2015 where do i add the {advertisement="KEY"} if i want something to display under the main content area (i.e. directly under end of topic where the 'Similar Content' widget is located)?
Gabriel Torres Posted December 12, 2015 Posted December 12, 2015 @jp I also would like to see advertisements integrated with the block editor. I am trying to do that manually and it is very hard, because I want to use the functionality of displaying ads for only certain usergoups. For adding the advertisement tag you mention, you need to edit your Theme and add it to the exact place you want your advertisement to be displayed. It is explained here: https://community.invisionpower.com/4docs/advanced-usage/custom-advertisement-locations-r88/
Gabriel Torres Posted December 13, 2015 Posted December 13, 2015 BTW. You can add advertisements on the sidebar by checking the "sidebar" location when configuring an advertisement. The issue is that we can't control its exact position, so if you want more than one banner on the sidebar, you will face issues. What we need is more control over the positioning of advertisements on the sidebar.
Bluto Posted December 13, 2015 Posted December 13, 2015 Can't you just use this: and dump your {advertisement="KEY"} in the widget?
Gabriel Torres Posted December 13, 2015 Posted December 13, 2015 @Bluto I've tried, but it doesn't work. See the technical explanation here: http://invisionfocus.com/topic/7334-txt-php-widget/ Meanwhile, I digged deeper into this, and found: The "sidebar" ad location is fixed at the top of the side bar. You can only place one advertisement. If you add more than one, I am not sure if the system divides pageviews evenly among them. You can easily create an ad location at the bottom of the sidebar, by editing the template Core > Global > sidebar and adding the {advertisement="your_ad_location"} as I show below. Of course you must use the name you used in the Advertisement section of the ACP. {{if \IPS\Output::i()->sidebar['enabled'] && ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) || ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) || ( \IPS\Dispatcher::i()->application instanceof \IPS\Application AND \IPS\Dispatcher::i()->application->canManageWidgets() ) )}} <div id='ipsLayout_sidebar' class='ipsLayout_sidebar{$position} {{if !( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) && ( !isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) || !count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) && \IPS\Dispatcher::i()->application->canManageWidgets()}}ipsLayout_sidebarUnused{{endif}}' data-controller='core.front.widgets.sidebar'> {{if isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== ''}} <aside id="elContextualTools" class='ipsClearfix' {{if isset( \IPS\Output::i()->sidebar['sticky'] )}}data-ipsSticky{{endif}}> {expression="\IPS\Output::i()->sidebar['contextual']" raw="true"} </aside> {{endif}} {{if isset(\IPS\Output::i()->sidebar['widgets']['sidebar']) and count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) and ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) ) }} {advertisement="ad_sidebar"} {{endif}} {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} {advertisement="your_ad_location_name"} </div> {{endif}} I will hire a programmer to create advertisement blocks for me, so I can place them wherever I want on the sidebar... Cheers!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.