Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 07-02-2015 11:57:26

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Banner adverts in header

Hi

I would like to use up some of the wasted space that I have in the header between my logo on the left side and the cart icon on the right-hand side. I would like to include one or two banners in this area, along the lines of what has been used at .

Having a look at the site I see that skin_header_topbanner has been added. Is it now just a case of creating the banners and following the manual to create/run them or is there something more to getting it to function.

Many thanks

Terry

Offline

 

#2 07-03-2015 06:15:02

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Banner adverts in header

Depends on customizations in your skin.  Generally the banners are run at the top of the content section, unless you did something special to move them around.


Nick Hendler

Offline

 

#3 07-03-2015 07:37:20

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Banner adverts in header

I haven't done anything to it. I've just had a look at djangobooks.com and like where they've placed it by their logo. On my site this is currently wasted space, so I thought I would make use of it.

Terry

Offline

 

#4 07-06-2015 05:25:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Banner adverts in header

Under System | Displays | Skin Widgets, assign the banners skin widget to a desktop group named 'TOPBANNER'.  Then in your skin's skin.php call, place:

Code:

<?php $skinfunc->xnamespace('core','skinwidgets','TOPBANNER'); ?>

Where you want it.  Upload your banners as skin widget types, and enter the group for each as 'TOPBANNER' and you'll be good to go.


Nick Hendler

Offline

 

#5 07-06-2015 12:13:20

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Banner adverts in header

Nick, I've added the following to my skin.php

Code:

<div id="skin_header_topbanner">

<?php $skinfunc->xnamespace('core','skinwidgets','TOPBANNER'); ?>

</div>

However, when I look at the page the following DIV is picking up the wrong style information.

Code:

<div id="cms_skinwidget_banners" class="skin_widgetclass_HEADER" style="width: 195px; margin-left: auto; margin-right: auto">

Where do I look to correct this info?

Thanks

Terry

Last edited by tguswell (07-06-2015 12:14:32)

Offline

 

#6 07-07-2015 05:38:38

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Banner adverts in header

You will find that inline CSS in {private}/apps/cms/CMS/includes/skinwidgetbanners.php.  You can change it there, or add:

#cms_skinwidget_banners {width: auto !important; margin: 0 !important;}

To your CSS file.


Nick Hendler

Offline

 

#7 07-07-2015 12:03:41

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Banner adverts in header

Nick

The line:

Code:

$bannerwidth = $this->globals('core_settings.cms.banners_skinwidgetwidth');

in skinwidgetbanners.php keeps picking up the value 195, whereas I've thought I'd set the width for skin_header_topbanner (in all.css)  for it to be 460px. I've hardcoded the 460 value into $bannerwidth and everything now seems okay, but I would like to know where I've gone wrong?

Thanks
Terry
(The full-time shop owner and part-time programmer)

Last edited by tguswell (07-07-2015 12:04:19)

Offline

 

#8 07-08-2015 03:01:30

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: Banner adverts in header

Terry,

you can set the banner width here:

System Dashboard > Website > Component > Settings > Banner Advertisements

Offline

 

#9 07-08-2015 11:21:58

tguswell
Member
From: Plymouth, Devon
Registered: 07-31-2010
Posts: 128
Website

Re: Banner adverts in header

Nigel

Thank you for pointing that out to me. I did take a few seconds out before typing this as I've been cursing myself for being so stupid :-)

Terry

Offline

 

Board footer