code in header?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
groovy
Regular
Posts: 17
Joined: Sun Jan 29, 2006 2:38 pm
Contact:

code in header?

Post 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
groovy
Regular
Posts: 17
Joined: Sun Jan 29, 2006 2:38 pm
Contact:

getting closer...

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: getting closer...

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
groovy
Regular
Posts: 17
Joined: Sun Jan 29, 2006 2:38 pm
Contact:

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

What's the URL where you tried the newsbanner on?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
groovy
Regular
Posts: 17
Joined: Sun Jan 29, 2006 2:38 pm
Contact:

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
Post Reply