This forum is for assistance with theme development.

Desperately need help with simple PHP snippet

What I'm trying to do is display a different header image on the front page from the rest of the site.

Here is what I have so far (it works, but obviously there's no 'else' statement:

   if (drupal_is_front_page()) {
     print '<img src="/files/sunset.jpg" alt="header" />';
  }

Here is what has been recommended to me (does not work, gives Parse error: syntax error, unexpected T_STRING in...:

flatforum--first post?

So I'm using flatforum to mod the built-in forums and by and large it's great. It looks nice, and I appreciate how simple it all was (more or less, I mean).

However, I was wondering if there was any way of displaying the FIRST forum post in a way that's visibly different than the following posts. I know that that post is actually a node and that what follows are comments, and so I would think I could do it all simply with CSS. But when I view the page, the CSS looks identical from first node to second and beyond.

Thoughts? Help?

how to display classified ad teaser on just homepage

I'd like to create a content section that gets displayed only on my homepage, where I'd like to feature classified ad teasers. This would be in the main content area, so I don't think it can be done as a block. Is there a module that is good for this sort of thing?

Ideally, I would have classified ads rotating banner style, but again, I don't know if there is a module that would do this.

f@#cking footer freakout!

I'm trying to declare some simple block regions in my theme.

In template.php I have:

function mytheme_regions() {
  return array(
    'sidebar_left' => t('left sidebar'), 
    'sidebar_right' => t('right sidebar'), 
    'content' => t('content'), 
    'header' => t('header'), 
    'footer' => t('footer')
  );
}

Toward the bottom of page.tpl.php I have...
<?php print $footer ?>

how do i make Node previews like this?

ok the mtv uk site http://www.mtv.co.uk/channel/mtvuk/news
they have node previews that are in red and when u click on the preview it displays nodes in thier actual template.
i know i have to edit node.tpl.php for the node template
but how to i get my previews to look differently then the actual nodes

Menu expanded as I request taxonomy or node but not at term level

Hi,

I use drupal 4.7.3 and an adptation of friendstric theme.

My issue is that :
- when I look at a vocabulary level, my menu is well expanded
- when I look at a node level, my menu is well expanded
- when I look at term level, my menu is closed.

I look

I only have this in page.tpl.php :

Pages

Subscribe with RSS Subscribe to RSS - Theme development