Welcome to Geeklog, Anonymous Wednesday, September 18 2024 @ 09:46 pm EDT

Geeklog Forums

Different Header, or different theme per topic


Status: offline

Remdotc

Forum User
Chatty
Registered: 06/12/02
Posts: 55
Anyone have any idea how to define a different theme , header, or page per topic?
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 07/11/02
Posts: 181
Location:Austin, TX
You *could* take .thtml elements from one theme and put it in another. No guarantees that it would work, though.
L. Whitworth
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany

There already exists a feature request for this, but in the meantime, here is an idea (untested!) for a hack to accomplish this:

In lib-common.php in function COM_siteHeader, the URL for the stylesheet to use is set like this:

$header->set_var('css_url', $_CONF['layout_url'] . '/style.css');

You could change this to switch stylesheets based on the current topic like this:

if (!empty ($topic)) {
$header->set_var('css_url', $_CONF['layout_url'] . '/' . $topic . '.css'); } else {
$header->set_var('css_url', $_CONF['layout_url'] . '/style.css');
}

You would then need one stylesheet per topic that has the same name as the topic ID you gave your topics in the Admin topic editor.

Hope that helps (and works ...)

bye, Dirk

 Quote

Status: offline

ironfeather

Forum User
Junior
Registered: 01/27/03
Posts: 16
Heyza! I just did this to acheive what you want, making different headers & footers for each topic. I just added $topic variable in front of where it loads header.thtml (in lib-common.php) so that if the topic is called food, it will look for foodheader.thtml when in the food story topic area, etc. complete code & discussion at: http://ironfeather.com/cgi-bin/bbs/ikonboard.cgi?act=ST;f=20;t=12 Cheers! Stevyn/IronFeather--------- my geeklog discussion is at: http://ironfeather.com/cgi-bin/bbs/ikonboard.cgi?act=SF;f=20
------
my geeklog discussion is at:

http://ironfeather.com/cgi-bin/bbs/ik...ct=SF;f=20
 Quote

All times are EDT. The time is now 09:46 pm.

  • 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