Welcome to Geeklog, Anonymous Thursday, October 03 2024 @ 08:16 pm EDT

Geeklog Forums

Add Topic Name as Header


Status: offline

ckpicker

Forum User
Newbie
Registered: 07/01/03
Posts: 11
I am trying to add the Topic Name as a header on the Topic's main page. I want it to change depending on which Topic is being viewed. Does anyone have any idea how to do this? Question I assume it would be in my theme's layout files somewhere, but I can't seem to find it. Thanks in advance!!
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I believe that a topicname is a story function and cannot be used in a header function.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

ckpicker

Forum User
Newbie
Registered: 07/01/03
Posts: 11
When I say 'header' I just mean a label I could put in the center block within H1 tags. Is that possible?
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Yes, it is: make a Static page with the H1 HTML code and choose the settings: place as centerblock -> on top of the page -> in the desired topic -> ready!
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The topic is not currently available in header.thtml, but it should be easy to add in COM_siteHeader in lib-common.php, since it's already out into the site's title tags there.

bye, Dirk
 Quote

Status: offline

tmarquez

Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
I went ahead and did this for my site thanks to Dirk's suggestion.

in lib-common.php

go to line 899 (aproximately) where you see this code:

Text Formatted Code

 $pagetitle = stripslashes( DB_getItem( $_TABLES['topics'], 'topic',
                                                   "tid = '$topic'" ));
 


And add something like this underneath:

Text Formatted Code

  $topictitle = stripslashes( DB_getItem( $_TABLES['topics'], 'topic',
                                                   "tid = '$topic'" ));
            $topictitle = 'News: ' . $topictitle;
 


Then a few lines down around 926 where you see:


Text Formatted Code

 $header->set_var( 'background_image', $_CONF['layout_url']
                                          . '/images/bg.' . $_IMAGE_TYPE );
 


And I added this above the line:

Text Formatted Code

 $header->set_var ( 'topic_title', $topictitle);
 


Then go to your layout\header.thtml and add {topic_title} where ever you want it displayed.

NOTE: Remember to backup your files before attempting these type of edits.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
 Quote

SAVP

Anonymous
hopeful
I used to have a header with a static page on top on each category. But unfortunately after migration to Geeklog 1.4.1 (with multilingual plugin) it has been a a little bit of trouble trying to figure it out because all our "stories" are in a way already bi-lingual, so the static page or heather for each category is not displayed unless you select a category, but categories only have one language?? In other words... I want the site work with multi-language feature for menus, home page and heathers (static pages with the name of the categories being displayed) , but not the categories. Is this possible??? I will appreciate very much for your help or guidance. Regards to all.
 Quote

Status: offline

SVP

Forum User
Newbie
Registered: 07/24/07
Posts: 2
Sorry, it is header instead of heather.
 Quote

All times are EDT. The time is now 08:16 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