News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

WhiteBox

Started by Crip, July 06, 2011, 11:38:56 AM

Previous topic - Next topic

Crip

Quote from: Cblog on October 12, 2011, 07:27:37 AM
how to insert a small banner ad in between logo and userarea

Not sure really , possibly a SMF Portal could make it easier to do..

I use & recommend : http://www.tinyportal.net/
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Dblog

i tried to edit stylesheet and modify logo section but ad/banner either overlaps logo or goes above the header area

Crip

you could put it Below either header or footer..? ..... maybe in the News: Fader-section..?
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

ARG01

Quote from: Cblog on October 12, 2011, 07:27:37 AM
how to insert a small banner ad in between logo and userarea

This can be done very easily without adding an additional image or making major code changes. Since the logo is already a clickable object you can simply take the current logo and expand the canvas size from 254px to 500px and add your small banner to the logo image itself.

Then in index.css find:
#logo a {
position: absolute;
top: 4.5em;
left: 4em;
display: block;
width: 254px;
height: 60px;
cursor: pointer;
background: url(../images/id/logo.png) no-repeat;
}


and change the 254px to 500px.



Live Demo  Choose the Whitebox theme from the theme selector.

You can always add the url to direct the logo to your desired path in index.template.php under the logo setting. Most like to keep the logo click directed to their home page but you do have a Home button for that.

;)


No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Dblog

thats is just replacing 254 width logo with another 500 width logo
because you're defining background: url(../images/id/logo.png) no-repeat;

the logo.png file will become clickable with 500 width

my question was different : how to inset a banner ad(acode or another image) between logo and userarea

AMUA

Hello Crip,

Great job !!!! I really like this theme !!!  :)

Please, is WhiteBox compatible with smf 2.0.1 ?

Thanks  :)
SMF 2.0.14
Langue : Français (French-utf8)
Thème : wta.in.th
Mods : Aeva Media v1.4w, Auto Purge Old Topics, Country Flags (patch français), Colorize Boards, More Spiders v1.2, Wrap Text Around Image, Justify BBCode, SMF Links, Tidy Child Boards, Users Online Today, Moderator and Administrator Comment Tags, SimplePortal 2.3.4, Topic Solved 1.1.1, AntiSpam 1.2, Sitemap, Simple Audio Video Embedder 3.5, view only boards, SMFPacks Shoutbox

ARG01

Quote from: Cblog on October 14, 2011, 01:09:47 AM
thats is just replacing 254 width logo with another 500 width logo
because you're defining background: url(../images/id/logo.png) no-repeat;

the logo.png file will become clickable with 500 width

my question was different : how to inset a banner ad(acode or another image) between logo and userarea

Lol, I know what your questions was. I do believe that I stated that this was an easy way of adding a banner ad without the need to add additional images or code but instead using the logo area itself. It works the same as what you are asking for.
If you want my honest opinion there really is not much room in that section and an advertisement should never be placed directly next to your own logo in the first place. I was merely giving you a shortcut as an option.

;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

ARG01

Quote from: AMUA on October 14, 2011, 10:08:04 AM


Please, is WhiteBox compatible with smf 2.0.1 ?

Thanks  :)

Yes, Whitebox is compatible with 2.0.1.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

AMUA

SMF 2.0.14
Langue : Français (French-utf8)
Thème : wta.in.th
Mods : Aeva Media v1.4w, Auto Purge Old Topics, Country Flags (patch français), Colorize Boards, More Spiders v1.2, Wrap Text Around Image, Justify BBCode, SMF Links, Tidy Child Boards, Users Online Today, Moderator and Administrator Comment Tags, SimplePortal 2.3.4, Topic Solved 1.1.1, AntiSpam 1.2, Sitemap, Simple Audio Video Embedder 3.5, view only boards, SMFPacks Shoutbox

Dblog

Hi ARG,
i've enough room for 468x60 banner code so i wanted to have one there
ppl usually click it

ARG01

Quote from: Cblog on October 16, 2011, 03:07:11 PM
Hi ARG,
i've enough room for 468x60 banner code so i wanted to have one there
ppl usually click it

I don't think that there is enough room for a 468px banner there without widening the wrapper. Smaller resolution screens would have to scroll horizontally and many find that very annoying. Do you use the news area a lot for actual news? If the news area is not a necessity for text news, you could always use it for your banners.

;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Dblog

my logo is very small and i reduced userarea to 300 pixels, so i can insert 468x60 banner in between.
these days everyone is using a min. of 1024x768 resolution screens.
so that wud fit for me

i ignore ppl who still use 800x600 screens

ARG01

Ok, this is the best that I can do but some css adjustments may be needed since it does affect the userarea. I am on a borrowed small screen until my new comp is finished so I cant really do much more from here.

This is what I did.

Go to Admin/Configuration/Current Theme and set the width to 100%

Added the banner image to the images/id folder (I named the image advert_1.png)

Find this in index.template.php:
echo '
  <div id="logo">
  <a href="'.$scripturl.'" title=""></a>
</div>';
  echo '
</div>
</div>
  </div>';


change to:
echo '
  <div id="logo">
  <a href="'.$scripturl.'" title=""></a>
</div>
</h1>
<div id="ad_banner">
<a href="YOUR URL HERE/"target="_blank"><img title="advert banner" src="', $settings['images_url'], '/id/advert_1.png"/></a>
</div>';
  echo '
</div>
</div>
  </div>';


Add this somewhere in index.css
#ad_banner  {
background: url(../images/id/advert_1.png ) no-repeat;
margin: 55px -260px 0 0; float: right;
}


Like I said, some additional css changed may be required to get it to fit right on your site.

;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Dblog

#53
thanks
i managed to adjust css and get that ad in right place

SimpleGost

I installing some mod, and i can't find this in your theme, in index.template.php

// The main content should go here.

Where is it?What is replace for it?I really need that mod...

Crip

... u need to manually install mods on most custom themes
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

SimpleGost

and, i'm doing that!
But i cant find this
in your theme :(

// The main content should go here.

SimpleGost


Crip

Quote from: InternetFazoni on December 01, 2011, 05:48:35 PM
and, i'm doing that!
But i cant find this
in your theme :(

// The main content should go here.
Quote from: InternetFazoni on December 13, 2011, 03:48:28 PM
HELP DAMN!

  // You can't find that line of Text because it's not in this Theme.
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

SimpleGost

yeah it's in default, but to make this mod work, it's need to do the same to index.template in default and in whitebox theme

Advertisement: