Welcome to Geeklog, Anonymous Friday, July 12 2024 @ 10:01 am EDT

Geeklog Forums

Changing a header image per one topic

Status: offline


Forum User
Regular Poster
Registered: 08/02/05
Posts: 70
I want to change the header image for one of my topics (note, not the topic image but the big header of my site image) but for that topic only. I found a hack called Chameleon from squatty, which changes the theme of the site per topic, but I don't need to change the whole theme and the version is pretty old.

My question to you is:

is it possible to do a php statement in the header.thtml file that would be something like

IF this page comes from topic "DVD"

print "image = dvd.jpg"


print "image = normal"

you can tell I come from the BASIC days. Anyone know how to code this or if its possible?

Status: offline


Site Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Wouldn't this help?

bye, Dirk

Status: offline


Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Actually I did this with 2 different CSS and Dirk's help like this in the header.thtml:

Text Formatted Code
<link rel="stylesheet" type="text/css" href=
global $_CONF, $topic;
if ($topic == 'topicB') {print $_CONF['layout_url'] . '/topicB.css';}
 else {print $_CONF['layout_url'] . '/style.css';}?>


It says mainly if the chosen topic is "topicB" then chose the css topicB.css

Obviously topicB.css contains a background pic which is different from style.css. I deleted the usual logo.gif in the header.thtml.

Text Formatted Code
.header-logobg-container-inner {
  /*background:url(images/header-bg.png) #5A94D6;*/
  border-bottom:1px solid #CCCCCC;


If you also want to change the site slogan in the header.thtml:

Text Formatted Code
<?php global $_CONF, $topic;
if ($topic == 'topicB') {print 'site slogan topicB';} else {print '{site_slogan}';}?>


All times are EDT. The time is now 10:01 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content