Jump to content

Advertisement


jp

Recommended Posts

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 

 

Link to comment
Share on other sites

  • 2 weeks later...

@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/

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...