Skip to:
Content

bbPress.org

Changeset 3


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

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

Location:
trunk
Files:
1 added
4 edited

Legend:

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

    r2 r3  
    6262    $text = preg_replace('|&lt;(/?li.*?)&gt;|', '<$1>', $text);
    6363    $text = preg_replace('|&lt;(/?blockquote.*?)&gt;|', '<$1>', $text);
     64    $text = preg_replace('|&lt;(/?code.*?)&gt;|', '<$1>', $text);
    6465    return $text;
    6566}
  • 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(). ' &laquo; ';
     50    if ( is_forum() )
     51        $title = get_forum_name() . ' &laquo; ';
     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
  • trunk/bb-templates/header.php

    r2 r3  
    22<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    33<head>
    4     <title><?php echo $bb->name; ?> <?php $more_title; ?></title>
     4    <title><?php bb_title() ?></title>
    55    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    66</head>
  • trunk/bb-templates/topic.php

    r2 r3  
    2121        <div class="threadpost">
    2222            <div class="post"><?php post_text(); ?></div>
    23             <div class="poststuff">Posted: <?php post_time(); ?> {$viewIP} {$allowed} <a href="#post-<?php post_id(); ?>">#</a></div>
     23            <div class="poststuff">Posted: <?php post_time(); ?> <a href="#post-<?php post_id(); ?>">#</a></div>
    2424        </div>
    2525    </li>
Note: See TracChangeset for help on using the changeset viewer.