Changeset 18
- Timestamp:
- 12/28/2004 08:54:20 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/admin-header.php
r9 r18 3 3 4 4 if ( $current_user->user_type < 1 ) { 5 header('Location: ' . get_option('uri') );5 header('Location: ' . bb_get_option('uri') ); 6 6 exit(); 7 7 } -
trunk/bb-admin/bb-do-counts.php
r13 r18 18 18 endforeach; 19 19 20 echo "$ wpdb->num_queries queries. " .timer_stop() . 'seconds'; ?>20 echo "$bbdb->num_queries queries. " . bb_timer_stop() . 'seconds'; ?> 21 21 ?> -
trunk/bb-admin/upgrade.php
r13 r18 24 24 echo '.'; flush(); 25 25 $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); 27 27 $bbdb->query("UPDATE $bbdb->posts SET post_text = '$post_text' WHERE post_id = '$post->post_id'"); 28 28 } -
trunk/bb-edit.php
r10 r18 13 13 14 14 if ( !$post || !can_edit( $post->poster_id ) ) { 15 header('Location: ' . get_option('uri') );15 header('Location: ' . bb_get_option('uri') ); 16 16 die(); 17 17 } … … 25 25 header('Location: ' . get_post_link($post_id) ); 26 26 else 27 header('Location: ' . get_option('uri') );27 header('Location: ' . bb_get_option('uri') ); 28 28 ?> -
trunk/bb-includes/db.php
r2 r18 128 128 129 129 if (SAVEQUERIES) 130 $this->queries[] = array( $query, $this-> timer_stop() );130 $this->queries[] = array( $query, $this->bb_timer_stop() ); 131 131 132 132 // If there is an error then take note of it.. … … 275 275 } 276 276 277 function timer_stop($precision = 3) {277 function bb_timer_stop($precision = 3) { 278 278 $mtime = microtime(); 279 279 $mtime = explode(' ', $mtime); -
trunk/bb-includes/default-filters.php
r11 r18 1 1 <?php 2 2 3 add_filter('forum_topics', 'number_format');4 add_filter('forum_posts', 'number_format');3 bb_add_filter('forum_topics', 'number_format'); 4 bb_add_filter('forum_posts', 'number_format'); 5 5 6 add_filter('topic_time', 'strtotime');7 add_filter('topic_time', 'since');6 bb_add_filter('topic_time', 'strtotime'); 7 bb_add_filter('topic_time', 'bb_since'); 8 8 9 add_filter('pre_topic_title', 'bb_specialchars');10 add_filter('get_forum_name', 'bb_specialchars');9 bb_add_filter('pre_topic_title', 'bb_specialchars'); 10 bb_add_filter('get_forum_name', 'bb_specialchars'); 11 11 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 atributes15 add_filter('pre_post', 'bb_filter_kses', 50);16 add_filter('pre_post', 'addslashes', 55);17 add_filter('pre_post', 'bb_autop', 60);12 bb_add_filter('pre_post', 'trim'); 13 bb_add_filter('pre_post', 'encode_bad'); 14 bb_add_filter('pre_post', 'stripslashes', 40); // KSES doesn't like escaped atributes 15 bb_add_filter('pre_post', 'bb_filter_kses', 50); 16 bb_add_filter('pre_post', 'addslashes', 55); 17 bb_add_filter('pre_post', 'bb_autop', 60); 18 18 19 add_filter('total_posts', 'number_format');20 add_filter('total_users', 'number_format');19 bb_add_filter('total_posts', 'number_format'); 20 bb_add_filter('total_users', 'number_format'); 21 21 22 add_filter('edit_text', 'code_trick_reverse');23 add_filter('edit_text', 'htmlspecialchars');22 bb_add_filter('edit_text', 'code_trick_reverse'); 23 bb_add_filter('edit_text', 'htmlspecialchars'); 24 24 25 25 ?> -
trunk/bb-includes/functions.php
r16 r18 19 19 } 20 20 21 function get_thread 21 function get_thread( $topic, $page = 0 ) { 22 22 global $bbdb, $bb; 23 23 24 $limit = get_option('page_topics');24 $limit = bb_get_option('page_topics'); 25 25 if ( $page ) 26 26 $limit = ($limit * $page) . ", $limit"; … … 28 28 } 29 29 30 function get_post 30 function get_post( $post_id ) { 31 31 global $bbdb; 32 32 $post_id = (int) $post_id; … … 38 38 if ( $forum ) 39 39 $where = "WHERE forum_id = $forum"; 40 $limit = get_option('page_topics');40 $limit = bb_get_option('page_topics'); 41 41 if ( $page ) 42 42 $limit = ($limit * $page) . ", $limit"; … … 44 44 } 45 45 46 function apply_filters($tag, $string, $filter = true) {46 function bb_apply_filters($tag, $string, $filter = true) { 47 47 global $wp_filter; 48 48 if (isset($wp_filter['all'])) { … … 73 73 } 74 74 75 function add_filter($tag, $function_to_add, $priority = 10) {75 function bb_add_filter($tag, $function_to_add, $priority = 10) { 76 76 global $wp_filter; 77 77 // So the format is wp_filter['tag']['array of priorities']['array of functions'] … … 82 82 } 83 83 84 function remove_filter($tag, $function_to_remove, $priority = 10) {84 function bb_remove_filter($tag, $function_to_remove, $priority = 10) { 85 85 global $wp_filter; 86 86 if (@in_array($function_to_remove, $wp_filter[$tag]["$priority"])) { … … 98 98 // The *_action functions are just aliases for the *_filter functions, they take special strings instead of generic content 99 99 100 function do_action($tag, $string) {101 apply_filters($tag, $string, false);100 function bb_do_action($tag, $string) { 101 bb_apply_filters($tag, $string, false); 102 102 return $string; 103 103 } 104 104 105 105 function 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); 107 107 } 108 108 109 109 function 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 liketimer_stop(1), will echo $timetotal110 bb_remove_filter($tag, $function_to_remove, $priority); 111 } 112 113 function bb_timer_stop($display = 0, $precision = 3) { //if called like bb_timer_stop(1), will echo $timetotal 114 114 global $bb_timestart, $timeend; 115 115 $mtime = explode(' ', microtime()); … … 121 121 } 122 122 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 } 123 function 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 ); 145 133 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 158 function bb_get_option( $option ) { 151 159 global $bb; 152 160 … … 174 182 175 183 function option( $option ) { 176 echo get_option( $option ) ;177 } 178 179 function add_query_arg() {184 echo bb_get_option( $option ) ; 185 } 186 187 function bb_add_query_arg() { 180 188 $ret = ''; 181 189 if( is_array( func_get_arg(0) ) ) { … … 220 228 } 221 229 222 function remove_query_arg($key, $query) {223 add_query_arg($key, '', $query);230 function bb_remove_query_arg($key, $query) { 231 bb_add_query_arg($key, '', $query); 224 232 } 225 233 … … 239 247 } 240 248 241 function current_time($type) {249 function bb_current_time($type) { 242 250 switch ($type) { 243 251 case 'mysql': … … 286 294 function bb_new_topic( $title, $forum ) { 287 295 global $bbdb, $current_user; 288 $title = apply_filters('pre_topic_title', $title);296 $title = bb_apply_filters('pre_topic_title', $title); 289 297 $forum = (int) $forum; 290 $now = current_time('mysql');298 $now = bb_current_time('mysql'); 291 299 292 300 if ( $forum && $title ) { … … 297 305 $topic_id = $bbdb->insert_id; 298 306 $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); 300 308 return $topic_id; 301 309 } else { … … 306 314 function bb_update_topic( $title, $topic_id ) { 307 315 global $bbdb; 308 $title = apply_filters('pre_topic_title', $title);316 $title = bb_apply_filters('pre_topic_title', $title); 309 317 $topic_id = (int) $topic_id; 310 318 $forum_id = (int) $forum_id; … … 312 320 if ( $topic_id && $title ) { 313 321 $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); 315 323 return $topic_id; 316 324 } else { … … 321 329 function bb_new_post( $topic_id, $post ) { 322 330 global $bbdb, $current_user; 323 $post = apply_filters('pre_post', $post);331 $post = bb_apply_filters('pre_post', $post); 324 332 $tid = (int) $topic_id; 325 $now = current_time('mysql');333 $now = bb_current_time('mysql'); 326 334 $uid = $current_user->user_id; 327 335 $uname = $current_user->username; … … 339 347 $bbdb->query("UPDATE $bbdb->topics SET topic_last_poster = $uid, topic_last_poster_name = '$uname', 340 348 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); 342 350 return $post_id; 343 351 } else { … … 348 356 function bb_update_post( $post, $post_id ) { 349 357 global $bbdb, $current_user; 350 $post = apply_filters('pre_post', $post);358 $post = bb_apply_filters('pre_post', $post); 351 359 $post_id = (int) $post_id; 352 360 353 361 if ( $post_id && $post ) { 354 362 $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); 356 364 return $post_id; 357 365 } else { -
trunk/bb-includes/statistics-functions.php
r7 r18 7 7 8 8 function total_users() { 9 echo apply_filters('total_users', get_total_users() );9 echo bb_apply_filters('total_users', get_total_users() ); 10 10 } 11 11 … … 16 16 17 17 function total_posts() { 18 echo apply_filters('total_posts', get_total_posts() );18 echo bb_apply_filters('total_posts', get_total_posts() ); 19 19 } 20 20 -
trunk/bb-includes/template-functions.php
r17 r18 15 15 if ($current_user) { 16 16 echo "Welcome, $current_user->username! <a href='" . user_profile_link( $current_user->user_id) . "'>View your profile »</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>"; 18 18 } else { 19 19 require( BBPATH . '/bb-templates/login-form.php'); … … 76 76 if ( !empty($static_title) ) 77 77 $title = $static_title . ' « '; 78 $title .= get_option('name');78 $title .= bb_get_option('name'); 79 79 echo $title; 80 80 } … … 89 89 $link = $bb->path . "forum.php?id=$forum->forum_id"; 90 90 91 echo apply_filters('forum_link', $link);91 echo bb_apply_filters('forum_link', $link); 92 92 } 93 93 94 94 function forum_name() { 95 echo apply_filters('forum_name', get_forum_name() );95 echo bb_apply_filters('forum_name', get_forum_name() ); 96 96 } 97 97 function get_forum_id() { … … 100 100 } 101 101 function forum_id() { 102 echo apply_filters('forum_id', get_forum_id() );102 echo bb_apply_filters('forum_id', get_forum_id() ); 103 103 } 104 104 function get_forum_name() { 105 105 global $forum; 106 return apply_filters('get_forum_name', $forum->forum_name);106 return bb_apply_filters('get_forum_name', $forum->forum_name); 107 107 } 108 108 109 109 function forum_description() { 110 110 global $forum; 111 echo apply_filters('forum_description', $forum->forum_desc);111 echo bb_apply_filters('forum_description', $forum->forum_desc); 112 112 } 113 113 114 114 function forum_topics() { 115 115 global $forum; 116 echo apply_filters('forum_topics', $forum->topics);116 echo bb_apply_filters('forum_topics', $forum->topics); 117 117 } 118 118 119 119 function forum_posts() { 120 120 global $forum; 121 echo apply_filters('forum_posts', $forum->posts);121 echo bb_apply_filters('forum_posts', $forum->posts); 122 122 } 123 123 … … 127 127 $forum->posts = 1; 128 128 $r = ''; 129 if ( get_option('mod_rewrite') ) {129 if ( bb_get_option('mod_rewrite') ) { 130 130 131 131 } 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) ) . '">« 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 »</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) ) . '">« 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 »</a>'; 136 } 137 echo bb_apply_filters('forum_pages', $r); 138 138 } 139 139 … … 145 145 146 146 function topic_id() { 147 echo apply_filters('topic_id', get_topic_id() );147 echo bb_apply_filters('topic_id', get_topic_id() ); 148 148 } 149 149 150 150 function 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) ); 152 152 } 153 153 … … 158 158 $topic = get_topic( $id ); 159 159 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); 166 166 } 167 167 168 168 function 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 ) ); 170 170 } 171 171 … … 179 179 function topic_posts() { 180 180 global $topic; 181 echo apply_filters('topic_posts', $topic->topic_posts);181 echo bb_apply_filters('topic_posts', $topic->topic_posts); 182 182 } 183 183 184 184 function topic_last_poster() { 185 185 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); 187 187 } 188 188 189 189 function 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) ); 191 191 } 192 192 … … 214 214 $topic->topic_posts = 1; 215 215 $r = ''; 216 if ( get_option('mod_rewrite') ) {216 if ( bb_get_option('mod_rewrite') ) { 217 217 218 218 } 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) ) . '">« 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 »</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) ) . '">« 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 »</a>'; 223 } 224 echo bb_apply_filters('forum_pages', $r); 225 225 } 226 226 … … 238 238 239 239 function post_author() { 240 echo apply_filters('post_author', get_post_author() );240 echo bb_apply_filters('post_author', get_post_author() ); 241 241 } 242 242 … … 266 266 function post_text() { 267 267 global $post; 268 echo apply_filters('post_text', get_post_text() );268 echo bb_apply_filters('post_text', get_post_text() ); 269 269 } 270 270 … … 276 276 function post_time() { 277 277 global $post; 278 echo apply_filters('post_time', $post->post_time);278 echo bb_apply_filters('post_time', $post->post_time); 279 279 } 280 280 … … 295 295 function post_ip() { 296 296 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() ); 298 298 } 299 299 300 300 function post_edit_link() { 301 301 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>"; 303 303 } 304 304 305 305 function 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() ); 307 307 } 308 308 function get_post_author_id() { … … 322 322 // USERS 323 323 function 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; 328 328 } 329 329 return $r; … … 343 343 344 344 function user_link( $id ) { 345 echo apply_filters('user_link', get_user_link($id) );345 echo bb_apply_filters('user_link', get_user_link($id) ); 346 346 } 347 347 … … 375 375 376 376 function user_type( $id ) { 377 echo apply_filters('user_type', get_user_type($id) );377 echo bb_apply_filters('user_type', get_user_type($id) ); 378 378 } 379 379 -
trunk/bb-login.php
r5 r18 5 5 $re = $_SERVER['HTTP_REFERER']; 6 6 else 7 $re = get_option('uri');7 $re = bb_get_option('uri'); 8 8 9 9 // Never cache … … 14 14 15 15 if ( 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') ); 17 17 header('Location: ' . $re); 18 do_action('bb_user_logout', '');18 bb_do_action('bb_user_logout', ''); 19 19 return; 20 20 } 21 21 22 22 if ( $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 week25 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', ''); 26 26 } 27 27 -
trunk/bb-post.php
r5 r18 26 26 header('Location: ' . get_post_link($post_id) ); 27 27 else 28 header('Location: ' . get_option('uri') );28 header('Location: ' . bb_get_option('uri') ); 29 29 ?> -
trunk/bb-settings.php
r17 r18 37 37 38 38 function bb_shutdown_action_hook() { 39 do_action('bb_shutdown', '');39 bb_do_action('bb_shutdown', ''); 40 40 } 41 41 register_shutdown_function('bb_shutdown_action_hook'); -
trunk/bb-templates/edit-form.php
r11 r18 9 9 <?php endif; ?> 10 10 <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> 12 12 </label> 13 13 </p> -
trunk/bb-templates/footer.php
r16 r18 1 1 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> 3 3 </div> 4 4 5 <?php do_action('bb_foot', ''); ?>5 <?php bb_do_action('bb_foot', ''); ?> 6 6 7 7 </body> -
trunk/bb-templates/profile.php
r15 r18 5 5 <dl id="userinfo"> 6 6 <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> 8 8 <?php 9 9 if ($user->user_website) : -
trunk/edit.php
r10 r18 7 7 8 8 if ( !$post || !can_edit( $post->poster_id ) ) { 9 header('Location: ' . get_option('uri') );9 header('Location: ' . bb_get_option('uri') ); 10 10 die(); 11 11 } -
trunk/profile.php
r15 r18 33 33 endforeach; 34 34 35 add_filter('post_time', 'strtotime');36 add_filter('post_time', 'since');35 bb_add_filter('post_time', 'strtotime'); 36 bb_add_filter('post_time', 'bb_since'); 37 37 38 38 require('bb-templates/profile.php'); -
trunk/search.php
r16 r18 17 17 WHERE MATCH(post_text) AGAINST ('$q') LIMIT 5"); 18 18 19 do_action('do_search', $q);19 bb_do_action('do_search', $q); 20 20 21 21 // Cache topics -
trunk/topic.php
r2 r18 15 15 $forum = get_forum ( $topic->forum_id ); 16 16 17 $list_start = $page * get_option('page_topics');17 $list_start = $page * bb_get_option('page_topics'); 18 18 if ( !$list_start ) $list_start = 1; 19 19
Note: See TracChangeset
for help on using the changeset viewer.