Skip to:
Content

bbPress.org

Changeset 18


Ignore:
Timestamp:
12/28/2004 08:54:20 AM (20 years ago)
Author:
matt
Message:

Let's rename everything just in case.

Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-admin/admin-header.php

    r9 r18  
    33
    44if ( $current_user->user_type < 1 ) {
    5     header('Location: ' . get_option('uri') );
     5    header('Location: ' . bb_get_option('uri') );
    66    exit();
    77}
  • trunk/bb-admin/bb-do-counts.php

    r13 r18  
    1818endforeach;
    1919
    20 echo "$wpdb->num_queries queries. " . timer_stop() . 'seconds'; ?>
     20echo "$bbdb->num_queries queries. " . bb_timer_stop() . 'seconds'; ?>
    2121?>
  • trunk/bb-admin/upgrade.php

    r13 r18  
    2424        echo '.'; flush();
    2525        $post_text = addslashes(deslash($post->post_text));
    26         $post_text = apply_filters('pre_post', $post_text);
     26        $post_text = bb_apply_filters('pre_post', $post_text);
    2727        $bbdb->query("UPDATE $bbdb->posts SET post_text = '$post_text' WHERE post_id = '$post->post_id'");
    2828    }
  • trunk/bb-edit.php

    r10 r18  
    1313
    1414if ( !$post || !can_edit( $post->poster_id ) ) {
    15     header('Location: ' . get_option('uri') );
     15    header('Location: ' . bb_get_option('uri') );
    1616    die();
    1717}
     
    2525    header('Location: ' . get_post_link($post_id) );
    2626else
    27     header('Location: ' . get_option('uri') );
     27    header('Location: ' . bb_get_option('uri') );
    2828?>
  • trunk/bb-includes/db.php

    r2 r18  
    128128
    129129        if (SAVEQUERIES)
    130             $this->queries[] = array( $query, $this->timer_stop() );
     130            $this->queries[] = array( $query, $this->bb_timer_stop() );
    131131
    132132        // If there is an error then take note of it..
     
    275275    }
    276276   
    277     function timer_stop($precision = 3) {
     277    function bb_timer_stop($precision = 3) {
    278278        $mtime = microtime();
    279279        $mtime = explode(' ', $mtime);
  • trunk/bb-includes/default-filters.php

    r11 r18  
    11<?php
    22
    3 add_filter('forum_topics', 'number_format');
    4 add_filter('forum_posts', 'number_format');
     3bb_add_filter('forum_topics', 'number_format');
     4bb_add_filter('forum_posts', 'number_format');
    55
    6 add_filter('topic_time', 'strtotime');
    7 add_filter('topic_time', 'since');
     6bb_add_filter('topic_time', 'strtotime');
     7bb_add_filter('topic_time', 'bb_since');
    88
    9 add_filter('pre_topic_title', 'bb_specialchars');
    10 add_filter('get_forum_name', 'bb_specialchars');
     9bb_add_filter('pre_topic_title', 'bb_specialchars');
     10bb_add_filter('get_forum_name', 'bb_specialchars');
    1111
    12 add_filter('pre_post', 'trim');
    13 add_filter('pre_post', 'encode_bad');
    14 add_filter('pre_post', 'stripslashes', 40); // KSES doesn't like escaped atributes
    15 add_filter('pre_post', 'bb_filter_kses', 50);
    16 add_filter('pre_post', 'addslashes', 55);
    17 add_filter('pre_post', 'bb_autop', 60);
     12bb_add_filter('pre_post', 'trim');
     13bb_add_filter('pre_post', 'encode_bad');
     14bb_add_filter('pre_post', 'stripslashes', 40); // KSES doesn't like escaped atributes
     15bb_add_filter('pre_post', 'bb_filter_kses', 50);
     16bb_add_filter('pre_post', 'addslashes', 55);
     17bb_add_filter('pre_post', 'bb_autop', 60);
    1818
    19 add_filter('total_posts', 'number_format');
    20 add_filter('total_users', 'number_format');
     19bb_add_filter('total_posts', 'number_format');
     20bb_add_filter('total_users', 'number_format');
    2121
    22 add_filter('edit_text', 'code_trick_reverse');
    23 add_filter('edit_text', 'htmlspecialchars');
     22bb_add_filter('edit_text', 'code_trick_reverse');
     23bb_add_filter('edit_text', 'htmlspecialchars');
    2424
    2525?>
  • trunk/bb-includes/functions.php

    r16 r18  
    1919}
    2020
    21 function get_thread ( $topic, $page = 0 ) {
     21function get_thread( $topic, $page = 0 ) {
    2222    global $bbdb, $bb;
    2323
    24     $limit = get_option('page_topics');
     24    $limit = bb_get_option('page_topics');
    2525    if ( $page )
    2626        $limit = ($limit * $page) . ", $limit";
     
    2828}
    2929
    30 function get_post ( $post_id ) {
     30function get_post( $post_id ) {
    3131    global $bbdb;
    3232    $post_id = (int) $post_id;
     
    3838    if ( $forum )
    3939        $where = "WHERE forum_id = $forum";
    40     $limit = get_option('page_topics');
     40    $limit = bb_get_option('page_topics');
    4141    if ( $page )
    4242        $limit = ($limit * $page) . ", $limit";
     
    4444}
    4545
    46 function apply_filters($tag, $string, $filter = true) {
     46function bb_apply_filters($tag, $string, $filter = true) {
    4747    global $wp_filter;
    4848    if (isset($wp_filter['all'])) {
     
    7373}
    7474
    75 function add_filter($tag, $function_to_add, $priority = 10) {
     75function bb_add_filter($tag, $function_to_add, $priority = 10) {
    7676    global $wp_filter;
    7777    // So the format is wp_filter['tag']['array of priorities']['array of functions']
     
    8282}
    8383
    84 function remove_filter($tag, $function_to_remove, $priority = 10) {
     84function bb_remove_filter($tag, $function_to_remove, $priority = 10) {
    8585    global $wp_filter;
    8686    if (@in_array($function_to_remove, $wp_filter[$tag]["$priority"])) {
     
    9898// The *_action functions are just aliases for the *_filter functions, they take special strings instead of generic content
    9999
    100 function do_action($tag, $string) {
    101     apply_filters($tag, $string, false);
     100function bb_do_action($tag, $string) {
     101    bb_apply_filters($tag, $string, false);
    102102    return $string;
    103103}
    104104
    105105function add_action($tag, $function_to_add, $priority = 10) {
    106     add_filter($tag, $function_to_add, $priority);
     106    bb_add_filter($tag, $function_to_add, $priority);
    107107}
    108108
    109109function remove_action($tag, $function_to_remove, $priority = 10) {
    110     remove_filter($tag, $function_to_remove, $priority);
    111 }
    112 
    113 function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal
     110    bb_remove_filter($tag, $function_to_remove, $priority);
     111}
     112
     113function bb_timer_stop($display = 0, $precision = 3) { //if called like bb_timer_stop(1), will echo $timetotal
    114114    global $bb_timestart, $timeend;
    115115    $mtime = explode(' ', microtime());
     
    121121}
    122122
    123 function since($stamp) {
    124     $post = $stamp;                                                                         /* get a timestamp */
    125     $now = time();                                                                  /* get the current timestamp */
    126     $diff = ($now - $post);
    127     if ($diff <= 3600) {                                                                    /* is it less than an hour? */
    128     $mins = round($diff / 60);
    129     $since = "$mins mins";
    130     } else if (($diff <= 86400) && ($diff > 3600)) {                /* is it less than a day? */
    131     $hours = round($diff / 3600);
    132     if ($hours <= 1) {                                                              /* is it under two hours? */
    133     $since = "1 hour";
    134     } else {
    135     $since = "$hours hours";
    136     }
    137     } else if ($diff >= 86400) {                                                    /* is it more than a day? */
    138     $days = round($diff / 86400);
    139     if ($days <= 1) {
    140     $since = "1 day";
    141     } else {
    142     $since = "$days days";
    143     }
    144     }
     123function bb_since( $original, $do_more = 0 ) {
     124    // array of time period chunks
     125    $chunks = array(
     126        array(60 * 60 * 24 * 365 , 'year'),
     127        array(60 * 60 * 24 * 30 , 'month'),
     128        array(60 * 60 * 24 * 7, 'week'),
     129        array(60 * 60 * 24 , 'day'),
     130        array(60 * 60 , 'hour'),
     131        array(60 , 'minute'),
     132    );
    145133   
    146     // $since = "Posted ".$since." ago";
    147     return $since;
    148 }
    149 
    150 function get_option( $option ) {
     134    $today = time();
     135    $since = $today - $original;
     136   
     137    for ($i = 0, $j = count($chunks); $i < $j; $i++) {
     138        $seconds = $chunks[$i][0];
     139        $name = $chunks[$i][1];
     140       
     141        if (($count = floor($since / $seconds)) != 0)
     142            break;
     143    }
     144   
     145    $print = ($count == 1) ? '1 '.$name : "$count {$name}s";
     146   
     147    if ($i + 1 < $j) {
     148        $seconds2 = $chunks[$i + 1][0];
     149        $name2 = $chunks[$i + 1][1];
     150       
     151        // add second item if it's greater than 0
     152        if ( (($count2 = floor(($since - ($seconds * $count)) / $seconds2)) != 0) && $do_more )
     153            $print .= ($count2 == 1) ? ', 1 '.$name2 : ", $count2 {$name2}s";
     154    }
     155    return $print;
     156}
     157
     158function bb_get_option( $option ) {
    151159    global $bb;
    152160
     
    174182
    175183function option( $option ) {
    176     echo get_option( $option ) ;
    177 }
    178 
    179 function add_query_arg() {
     184    echo bb_get_option( $option ) ;
     185}
     186
     187function bb_add_query_arg() {
    180188    $ret = '';
    181189    if( is_array( func_get_arg(0) ) ) {
     
    220228}
    221229
    222 function remove_query_arg($key, $query) {
    223     add_query_arg($key, '', $query);
     230function bb_remove_query_arg($key, $query) {
     231    bb_add_query_arg($key, '', $query);
    224232}
    225233
     
    239247}
    240248
    241 function current_time($type) {
     249function bb_current_time($type) {
    242250    switch ($type) {
    243251        case 'mysql':
     
    286294function bb_new_topic( $title, $forum ) {
    287295    global $bbdb, $current_user;
    288     $title = apply_filters('pre_topic_title', $title);
     296    $title = bb_apply_filters('pre_topic_title', $title);
    289297    $forum = (int) $forum;
    290     $now   = current_time('mysql');
     298    $now   = bb_current_time('mysql');
    291299
    292300    if ( $forum && $title ) {
     
    297305        $topic_id = $bbdb->insert_id;
    298306        $bbdb->query("UPDATE $bbdb->forums SET topics = topics + 1 WHERE forum_id = $forum");
    299         do_action('bb_new_topic', $topic_id);
     307        bb_do_action('bb_new_topic', $topic_id);
    300308        return $topic_id;
    301309    } else {
     
    306314function bb_update_topic( $title, $topic_id ) {
    307315    global $bbdb;
    308     $title = apply_filters('pre_topic_title', $title);
     316    $title = bb_apply_filters('pre_topic_title', $title);
    309317    $topic_id = (int) $topic_id;
    310318    $forum_id = (int) $forum_id;
     
    312320    if ( $topic_id && $title ) {
    313321        $bbdb->query("UPDATE $bbdb->topics SET topic_title = '$title' WHERE topic_id = $topic_id");
    314         do_action('bb_update_topic', $topic_id);
     322        bb_do_action('bb_update_topic', $topic_id);
    315323        return $topic_id;
    316324    } else {
     
    321329function bb_new_post( $topic_id, $post ) {
    322330    global $bbdb, $current_user;
    323     $post  = apply_filters('pre_post', $post);
     331    $post  = bb_apply_filters('pre_post', $post);
    324332    $tid   = (int) $topic_id;
    325     $now   = current_time('mysql');
     333    $now   = bb_current_time('mysql');
    326334    $uid   = $current_user->user_id;
    327335    $uname = $current_user->username;
     
    339347        $bbdb->query("UPDATE $bbdb->topics SET topic_last_poster = $uid, topic_last_poster_name = '$uname',
    340348        topic_last_post_id = $post_id, topic_posts = topic_posts + 1 WHERE topic_id = $tid");
    341         do_action('bb_new_post', $post_id);
     349        bb_do_action('bb_new_post', $post_id);
    342350        return $post_id;
    343351    } else {
     
    348356function bb_update_post( $post, $post_id ) {
    349357    global $bbdb, $current_user;
    350     $post  = apply_filters('pre_post', $post);
     358    $post  = bb_apply_filters('pre_post', $post);
    351359    $post_id   = (int) $post_id;
    352360
    353361    if ( $post_id && $post ) {
    354362        $bbdb->query("UPDATE $bbdb->posts SET post_text = '$post' WHERE post_id = $post_id");
    355         do_action('bb_update_post', $post_id);
     363        bb_do_action('bb_update_post', $post_id);
    356364        return $post_id;
    357365    } else {
  • trunk/bb-includes/statistics-functions.php

    r7 r18  
    77
    88function total_users() {
    9     echo apply_filters('total_users', get_total_users() );
     9    echo bb_apply_filters('total_users', get_total_users() );
    1010}
    1111
     
    1616
    1717function total_posts() {
    18     echo apply_filters('total_posts', get_total_posts() );
     18    echo bb_apply_filters('total_posts', get_total_posts() );
    1919}
    2020
  • trunk/bb-includes/template-functions.php

    r17 r18  
    1515    if ($current_user) {
    1616        echo "Welcome, $current_user->username! <a href='" . user_profile_link( $current_user->user_id) . "'>View your profile &raquo;</a>
    17         <small>(<a href='" . get_option('uri') . "bb-login.php?logout'>Logout</a>)</small>";
     17        <small>(<a href='" . bb_get_option('uri') . "bb-login.php?logout'>Logout</a>)</small>";
    1818    } else {
    1919        require( BBPATH . '/bb-templates/login-form.php');
     
    7676    if ( !empty($static_title) )
    7777        $title = $static_title . ' &laquo; ';
    78     $title .= get_option('name');
     78    $title .= bb_get_option('name');
    7979    echo $title;
    8080}
     
    8989        $link = $bb->path . "forum.php?id=$forum->forum_id";
    9090
    91     echo apply_filters('forum_link', $link);
     91    echo bb_apply_filters('forum_link', $link);
    9292}
    9393
    9494function forum_name() {
    95     echo apply_filters('forum_name', get_forum_name() );
     95    echo bb_apply_filters('forum_name', get_forum_name() );
    9696}
    9797function get_forum_id() {
     
    100100}
    101101function forum_id() {
    102     echo apply_filters('forum_id', get_forum_id() );
     102    echo bb_apply_filters('forum_id', get_forum_id() );
    103103}
    104104function get_forum_name() {
    105105    global $forum;
    106     return apply_filters('get_forum_name', $forum->forum_name);
     106    return bb_apply_filters('get_forum_name', $forum->forum_name);
    107107}
    108108
    109109function forum_description() {
    110110    global $forum;
    111     echo apply_filters('forum_description', $forum->forum_desc);
     111    echo bb_apply_filters('forum_description', $forum->forum_desc);
    112112}
    113113
    114114function forum_topics() {
    115115    global $forum;
    116     echo apply_filters('forum_topics', $forum->topics);
     116    echo bb_apply_filters('forum_topics', $forum->topics);
    117117}
    118118
    119119function forum_posts() {
    120120    global $forum;
    121     echo apply_filters('forum_posts', $forum->posts);
     121    echo bb_apply_filters('forum_posts', $forum->posts);
    122122}
    123123
     
    127127        $forum->posts = 1;
    128128    $r = '';
    129     if ( get_option('mod_rewrite') ) {
     129    if ( bb_get_option('mod_rewrite') ) {
    130130       
    131131    } else {
    132         if ( $page && ($page * get_option('page_topics')) < $forum->posts )
    133             $r .=  '<a class="prev" href="' . bb_specialchars( add_query_arg('page', $page - 1) ) . '">&laquo; Previous Page</a>';
    134         if ( get_option('page_topics') < $forum->posts )
    135             $r .=  ' <a class="next" href="' . bb_specialchars( add_query_arg('page', $page + 1) ) . '">Next Page &raquo;</a>';
    136     }
    137     echo apply_filters('forum_pages', $r);
     132        if ( $page && ($page * bb_get_option('page_topics')) < $forum->posts )
     133            $r .=  '<a class="prev" href="' . bb_specialchars( bb_add_query_arg('page', $page - 1) ) . '">&laquo; Previous Page</a>';
     134        if ( bb_get_option('page_topics') < $forum->posts )
     135            $r .=  ' <a class="next" href="' . bb_specialchars( bb_add_query_arg('page', $page + 1) ) . '">Next Page &raquo;</a>';
     136    }
     137    echo bb_apply_filters('forum_pages', $r);
    138138}
    139139
     
    145145
    146146function topic_id() {
    147     echo apply_filters('topic_id', get_topic_id() );
     147    echo bb_apply_filters('topic_id', get_topic_id() );
    148148}
    149149
    150150function topic_link( $id = 0 ) {
    151     echo apply_filters('topic_link', get_topic_link($id) );
     151    echo bb_apply_filters('topic_link', get_topic_link($id) );
    152152}
    153153
     
    158158        $topic = get_topic( $id );
    159159
    160     if ( get_option('mod_rewrite') )
    161         $link = get_option('path') . $topic->topic_id;
    162     else
    163         $link = get_option('path') . "topic.php?id=$topic->topic_id";
    164 
    165     return apply_filters('get_topic_link', $link);
     160    if ( bb_get_option('mod_rewrite') )
     161        $link = bb_get_option('path') . $topic->topic_id;
     162    else
     163        $link = bb_get_option('path') . "topic.php?id=$topic->topic_id";
     164
     165    return bb_apply_filters('get_topic_link', $link);
    166166}
    167167
    168168function topic_title( $id = 0 ) {
    169     echo apply_filters('topic_title', get_topic_title( $id ) );
     169    echo bb_apply_filters('topic_title', get_topic_title( $id ) );
    170170}
    171171
     
    179179function topic_posts() {
    180180    global $topic;
    181     echo apply_filters('topic_posts', $topic->topic_posts);
     181    echo bb_apply_filters('topic_posts', $topic->topic_posts);
    182182}
    183183
    184184function topic_last_poster() {
    185185    global $topic;
    186     echo apply_filters('topic_last_poster', $topic->topic_last_poster_name);
     186    echo bb_apply_filters('topic_last_poster', $topic->topic_last_poster_name);
    187187}
    188188
    189189function topic_time( $id = 0 ) {
    190     echo apply_filters('topic_time', get_topic_time($id) );
     190    echo bb_apply_filters('topic_time', get_topic_time($id) );
    191191}
    192192
     
    214214        $topic->topic_posts = 1;
    215215    $r = '';
    216     if ( get_option('mod_rewrite') ) {
     216    if ( bb_get_option('mod_rewrite') ) {
    217217       
    218218    } else {
    219         if ( $page && ($page * get_option('page_topics')) < $topic->topic_posts )
    220             $r .=  '<a class="prev" href="' . bb_specialchars( add_query_arg('page', $page - 1) ) . '">&laquo; Previous Page</a>';
    221         if ( get_option('page_topics') < $topic->topic_posts )
    222             $r .=  ' <a class="next" href="' . bb_specialchars( add_query_arg('page', $page + 1) ) . '">Next Page &raquo;</a>';
    223     }
    224     echo apply_filters('forum_pages', $r);
     219        if ( $page && ($page * bb_get_option('page_topics')) < $topic->topic_posts )
     220            $r .=  '<a class="prev" href="' . bb_specialchars( bb_add_query_arg('page', $page - 1) ) . '">&laquo; Previous Page</a>';
     221        if ( bb_get_option('page_topics') < $topic->topic_posts )
     222            $r .=  ' <a class="next" href="' . bb_specialchars( bb_add_query_arg('page', $page + 1) ) . '">Next Page &raquo;</a>';
     223    }
     224    echo bb_apply_filters('forum_pages', $r);
    225225}
    226226
     
    238238
    239239function post_author() {
    240     echo apply_filters('post_author', get_post_author() );
     240    echo bb_apply_filters('post_author', get_post_author() );
    241241}
    242242
     
    266266function post_text() {
    267267    global $post;
    268     echo apply_filters('post_text', get_post_text() );
     268    echo bb_apply_filters('post_text', get_post_text() );
    269269}
    270270
     
    276276function post_time() {
    277277    global $post;
    278     echo apply_filters('post_time', $post->post_time);
     278    echo bb_apply_filters('post_time', $post->post_time);
    279279}
    280280
     
    295295function post_ip() {
    296296    if ( can_edit( get_post_author_id() ) )
    297         echo apply_filters('post_ip', get_post_ip() );
     297        echo bb_apply_filters('post_ip', get_post_ip() );
    298298}
    299299
    300300function post_edit_link() {
    301301    if ( can_edit( get_post_author_id() ) )
    302         echo "<a href='" . get_option('uri') . 'edit.php?id=' . get_post_id() . "'>Edit</a>";
     302        echo "<a href='" . bb_get_option('uri') . 'edit.php?id=' . get_post_id() . "'>Edit</a>";
    303303}
    304304
    305305function post_author_id() {
    306     echo apply_filters('post_author_id', get_post_author_id() );
     306    echo bb_apply_filters('post_author_id', get_post_author_id() );
    307307}
    308308function get_post_author_id() {
     
    322322// USERS
    323323function user_profile_link( $id ) {
    324     if ( get_option('mod_rewrite') ) {
    325         $r = get_option('domain') . get_option('path') . 'user/' . $id;
    326     } else {
    327         $r =  get_option('domain') . get_option('path') . 'profile.php?id=' . $id;
     324    if ( bb_get_option('mod_rewrite') ) {
     325        $r = bb_get_option('domain') . bb_get_option('path') . 'user/' . $id;
     326    } else {
     327        $r =  bb_get_option('domain') . bb_get_option('path') . 'profile.php?id=' . $id;
    328328    }
    329329    return $r;
     
    343343
    344344function user_link( $id ) {
    345     echo apply_filters('user_link', get_user_link($id) );
     345    echo bb_apply_filters('user_link', get_user_link($id) );
    346346}
    347347
     
    375375
    376376function user_type( $id ) {
    377     echo apply_filters('user_type', get_user_type($id) );
     377    echo bb_apply_filters('user_type', get_user_type($id) );
    378378}
    379379
  • trunk/bb-login.php

    r5 r18  
    55    $re = $_SERVER['HTTP_REFERER'];
    66else
    7     $re = get_option('uri');
     7    $re = bb_get_option('uri');
    88
    99// Never cache
     
    1414
    1515if ( isset( $_REQUEST['logout'] ) ) {
    16     setcookie('bb_pass_'. BBHASH, $user->user_password, time() - 31536000, get_option('path') );
     16    setcookie('bb_pass_'. BBHASH, $user->user_password, time() - 31536000, bb_get_option('path') );
    1717    header('Location: ' . $re);
    18     do_action('bb_user_logout', '');
     18    bb_do_action('bb_user_logout', '');
    1919    return;
    2020}
    2121
    2222if ( $user = bb_check_login( $_POST['username'], $_POST['password'] ) ) {
    23     setcookie('bb_user_'. BBHASH, $user->username, time() + 6048000, get_option('path') );
    24     setcookie('bb_pass_'. BBHASH, $user->user_password, time() + 604800, get_option('path') ); // One week
    25     do_action('bb_user_login', '');
     23    setcookie('bb_user_'. BBHASH, $user->username, time() + 6048000, bb_get_option('path') );
     24    setcookie('bb_pass_'. BBHASH, $user->user_password, time() + 604800, bb_get_option('path') ); // One week
     25    bb_do_action('bb_user_login', '');
    2626}
    2727
  • trunk/bb-post.php

    r5 r18  
    2626    header('Location: ' . get_post_link($post_id) );
    2727else
    28     header('Location: ' . get_option('uri') );
     28    header('Location: ' . bb_get_option('uri') );
    2929?>
  • trunk/bb-settings.php

    r17 r18  
    3737
    3838function bb_shutdown_action_hook() {
    39     do_action('bb_shutdown', '');
     39    bb_do_action('bb_shutdown', '');
    4040}
    4141register_shutdown_function('bb_shutdown_action_hook');
  • trunk/bb-templates/edit-form.php

    r11 r18  
    99<?php endif; ?>
    1010<p><label>Post:<br />
    11   <textarea name="post_content" cols="50" rows="8" id="post_content"><?php echo apply_filters('edit_text', get_post_text() ); ?></textarea>
     11  <textarea name="post_content" cols="50" rows="8" id="post_content"><?php echo bb_apply_filters('edit_text', get_post_text() ); ?></textarea>
    1212  </label>
    1313</p>
  • trunk/bb-templates/footer.php

    r16 r18  
    11
    2 <h3><?php timer_stop(1); ?> - <?php echo $bbdb->num_queries; ?> queries</h3>
     2<h3><?php bb_timer_stop(1); ?> - <?php echo $bbdb->num_queries; ?> queries</h3>
    33</div>
    44
    5 <?php do_action('bb_foot', ''); ?>
     5<?php bb_do_action('bb_foot', ''); ?>
    66
    77</body>
  • trunk/bb-templates/profile.php

    r15 r18  
    55<dl id="userinfo">
    66<dt>Member Since</dt>
    7 <dd><?php echo date('F j, Y', $ts); ?> (<?php echo since($ts); ?>)</dd>
     7<dd><?php echo date('F j, Y', $ts); ?> (<?php echo bb_since($ts); ?>)</dd>
    88<?php
    99if ($user->user_website) :
  • trunk/edit.php

    r10 r18  
    77
    88if ( !$post || !can_edit( $post->poster_id ) ) {
    9     header('Location: ' . get_option('uri') );
     9    header('Location: ' . bb_get_option('uri') );
    1010    die();
    1111}
  • trunk/profile.php

    r15 r18  
    3333endforeach;
    3434
    35 add_filter('post_time', 'strtotime');
    36 add_filter('post_time', 'since');
     35bb_add_filter('post_time', 'strtotime');
     36bb_add_filter('post_time', 'bb_since');
    3737
    3838require('bb-templates/profile.php');
  • trunk/search.php

    r16 r18  
    1717WHERE MATCH(post_text) AGAINST ('$q') LIMIT 5");
    1818
    19 do_action('do_search', $q);
     19bb_do_action('do_search', $q);
    2020
    2121// Cache topics
  • trunk/topic.php

    r2 r18  
    1515$forum = get_forum ( $topic->forum_id );
    1616
    17 $list_start = $page * get_option('page_topics');
     17$list_start = $page * bb_get_option('page_topics');
    1818if ( !$list_start ) $list_start = 1;
    1919
Note: See TracChangeset for help on using the changeset viewer.