Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/26/2004 10:14:22 AM (19 years ago)
Author:
matt
Message:

Titles, what a novel concept. Need to do login at some point.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/template-functions.php

    r2 r3  
    2020    ++$bb_alt[$key];
    2121    if ( $bb_alt[$key] % 2 ) echo ' class="alt"';
     22}
     23
     24function is_front() {
     25    if ( '/index.php' == $_SERVER['PHP_SELF'] )
     26        return true;
     27    else
     28        return false;
     29}
     30
     31function is_forum() {
     32    if ( '/forum.php' == $_SERVER['PHP_SELF'] )
     33        return true;
     34    else
     35        return false;
     36}
     37
     38function is_topic() {
     39    if ( '/topic.php' == $_SERVER['PHP_SELF'] )
     40        return true;
     41    else
     42        return false;
     43}
     44
     45function bb_title() {
     46    global $topic, $forum;
     47    $title = '';
     48    if ( is_topic() )
     49        $title = get_topic_title(). ' « ';
     50    if ( is_forum() )
     51        $title = get_forum_name() . ' « ';
     52    $title .= get_option('name');
     53    echo $title;
    2254}
    2355
     
    87119function topic_title() {
    88120    global $topic;
    89     echo apply_filters('topic_title', $topic->topic_title);
     121    echo apply_filters('topic_title', get_topic_title() );
     122}
     123
     124function get_topic_title() {
     125    global $topic;
     126    return $topic->topic_title;
    90127}
    91128
Note: See TracChangeset for help on using the changeset viewer.