Page 1 of 1

code in header?

Posted: Sat Mar 18, 2006 2:45 pm
by groovy
hi,

a friend of mine, also running s9y (0.9.1), wants a (vertical scrolling) newsticker in her header. for this, she has to insert a piece of code into the header, which looks like this:

Code: Select all

<script type="text/javascript">
var tickerwidth = 450;
var tickercolor = "#DDDDDD";
var fontcolor = "#000000";
var splitcolor = "#043971";
var fontsize = 11;
var visitedlink = "#ffffff";
var rollovercolor = "#990000";
var font = "Arial";
var speed = 2;
var sparte = 4;
var rubrik = 13;
var rollover_underline = 1;
var font_underline = 0;
var transparent = 0;
var fontbold = 0;
var tickertyp = 1;
var u_id = 320908;
</script>
<script type="text/javascript" src="http://newsticker.shortnews.de/de/js/free/3/a.js"></script>
where can this be inserted? can i simply paste it somewhere into the template?

thanks

getting closer...

Posted: Sat Mar 18, 2006 3:23 pm
by groovy
ok, i think i found the place where to put the code. it even works :-) only one small problem remains. the place to put this is this section in the index.tpl:

Code: Select all

<div id="serendipity_banner">
    <h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle}</a></h1>
    <h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>
</div>
i want the ticker to appear after the blog title, but when i insert it after the </h1>-tag, it appears on a new line between blog title and blog description...is there any way to put it behind the title?

thanks

Re: getting closer...

Posted: Sun Mar 19, 2006 12:47 pm
by garvinhicking
Hi!

You are right about hte place in index.tpl. As for the alignment, you'll need to use CSS positioning to achieve that!

<h1> elements ar eusually display: block, so no other elements on the same line are allowed. So you'll need to make the element with your ticker either left/right floating, or you need to make the h1 element display:inline.

You might want to search google for some CSS tutorials. *g*

Best regards,
Garvin

Posted: Sun Mar 19, 2006 4:37 pm
by groovy
hmmm...i had a look at the css and the <h1> in the banner section _is_ display:inline. is this the right place, and why doesn't it work?
here's the section:

Code: Select all

#serendipity_banner h1 {
  color: #8B0000;
  font-size: x-large;
  margin-top: 5px;
  margin-bottom: 1px;
  border-bottom: 1px solid;
  display: inline;
  padding-right: 15px;
  padding-left: 5px;
  text-decoration: none;
}
did i miss something?

Posted: Mon Mar 20, 2006 10:15 am
by garvinhicking
What's the URL where you tried the newsbanner on?

Regards,
Garvin

Posted: Mon Mar 20, 2006 7:00 pm
by groovy
garvinhicking wrote:What's the URL where you tried the newsbanner on?

Regards,
Garvin
it's there
the theme is a modified mozilla modern, if that matters...

daniel

Posted: Tue Mar 21, 2006 2:43 am
by judebert
I visited the link, but I don't see the newsticker at all. It looks like the <H1> is display:inline, according to my Firefox plugin. Of course, anything you want to follow it on the same line would also have to be display:inline.