Changeset 1369
- Timestamp:
- 03/24/2008 04:17:36 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bb-includes/statistics-functions.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/statistics-functions.php
r1273 r1369 1 1 <?php 2 2 /** 3 * bbPress Forum Content Statistics Functions 4 * 5 * @package bbPress 6 */ 7 8 /** 9 * get_total_users() - {@internal Missing Short Description}} 10 * 11 * {@internal Missing Long Description}} 12 * 13 * @since {@internal Unknown}} 14 * @global bbdb $bbdb 15 * @global int $bb_total_users 16 * 17 * @return int 18 */ 3 19 function get_total_users() { 4 20 global $bbdb, $bb_total_users; … … 9 25 } 10 26 27 /** 28 * total_users() - {@internal Missing Short Description}} 29 * 30 * {@internal Missing Long Description}} 31 * 32 * @since {@internal Unknown}} 33 */ 11 34 function total_users() { 12 35 echo apply_filters('total_users', get_total_users() ); 13 36 } 14 37 38 /** 39 * get_total_posts() - {@internal Missing Short Description}} 40 * 41 * {@internal Missing Long Description}} 42 * 43 * @since {@internal Unknown}} 44 * @global bbdb $bbdb 45 * @global int $bb_total_posts 46 * 47 * @return int 48 */ 15 49 function get_total_posts() { 16 50 global $bbdb, $bb_total_posts; … … 21 55 } 22 56 57 /** 58 * total_users() - {@internal Missing Short Description}} 59 * 60 * {@internal Missing Long Description}} 61 * 62 * @since {@internal Unknown}} 63 */ 23 64 function total_posts() { 24 65 echo apply_filters('total_posts', get_total_posts() ); 25 66 } 26 67 68 /** 69 * get_total_topics() - {@internal Missing Short Description}} 70 * 71 * {@internal Missing Long Description}} 72 * 73 * @since {@internal Unknown}} 74 * @global bbdb $bbdb 75 * @global int $bb_total_topics 76 * 77 * @return int 78 */ 27 79 function get_total_topics() { 28 80 global $bbdb, $bb_total_topics; … … 33 85 } 34 86 87 /** 88 * total_topics() - {@internal Missing Short Description}} 89 * 90 * {@internal Missing Long Description}} 91 * 92 * @since {@internal Unknown}} 93 */ 35 94 function total_topics() { 36 95 echo apply_filters('total_topics', get_total_topics()); 37 96 } 38 97 98 /** 99 * get_popular_topics() - {@internal Missing Short Description}} 100 * 101 * {@internal Missing Long Description}} 102 * 103 * @since {@internal Unknown}} 104 * 105 * @return bbdb|BB_Cache 106 */ 39 107 function get_popular_topics( $num = 10 ) { 40 108 $query = new BB_Query( 'topic', array('per_page' => $num, 'order_by' => 'topic_posts', 'append_meta' => 0) ); … … 42 110 } 43 111 112 /** 113 * get_recent_registrants() - {@internal Missing Short Description}} 114 * 115 * {@internal Missing Long Description}} 116 * 117 * @since {@internal Unknown}} 118 * @global bbdb $bbdb 119 * 120 * @return array 121 */ 44 122 function get_recent_registrants( $num = 10 ) { 45 123 global $bbdb; … … 50 128 } 51 129 130 /** 131 * bb_inception() - {@internal Missing Short Description}} 132 * 133 * {@internal Missing Long Description}} 134 * 135 * @since {@internal Unknown}} 136 */ 52 137 function bb_inception( $args = '' ) { 53 138 $args = _bb_parse_time_function_args( $args ); … … 56 141 } 57 142 143 /** 144 * bb_get_inception() - {@internal Missing Short Description}} 145 * 146 * {@internal Missing Long Description}} 147 * 148 * @since {@internal Unknown}} 149 * @global bbdb $bbdb 150 * @global int $bb_inception 151 * 152 * @return int 153 */ 58 154 function bb_get_inception( $args = '' ) { 59 155 $args = _bb_parse_time_function_args( $args ); … … 65 161 return apply_filters( 'bb_get_inception', _bb_time_function_return( $bb_inception, $args ) ); 66 162 } 163 164 /** 165 * get_registrations_per_day() - {@internal Missing Short Description}} 166 * 167 * {@internal Missing Long Description}} 168 * 169 * @since {@internal Unknown}} 170 * 171 * @return int|float 172 */ 67 173 function get_registrations_per_day() { 68 174 return get_total_users() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 ); 69 175 } 70 176 177 /** 178 * registrations_per_day() - {@internal Missing Short Description}} 179 * 180 * {@internal Missing Long Description}} 181 * 182 * @since {@internal Unknown}} 183 */ 71 184 function registrations_per_day() { 72 185 echo apply_filters('registrations_per_day', bb_number_format_i18n(get_registrations_per_day(),3)); 73 186 } 74 187 188 /** 189 * get_posts_per_day() - {@internal Missing Short Description}} 190 * 191 * {@internal Missing Long Description}} 192 * 193 * @since {@internal Unknown}} 194 * 195 * @return int|float 196 */ 75 197 function get_posts_per_day() { 76 198 return get_total_posts() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 ); 77 199 } 78 200 201 /** 202 * posts_per_day() - {@internal Missing Short Description}} 203 * 204 * {@internal Missing Long Description}} 205 * 206 * @since {@internal Unknown}} 207 */ 79 208 function posts_per_day() { 80 209 echo apply_filters('posts_per_day', bb_number_format_i18n(get_posts_per_day(),3)); 81 210 } 82 211 212 /** 213 * get_topics_per_day() - {@internal Missing Short Description}} 214 * 215 * {@internal Missing Long Description}} 216 * 217 * @since {@internal Unknown}} 218 * 219 * @return int|float 220 */ 83 221 function get_topics_per_day() { 84 222 return get_total_topics() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 ); 85 223 } 86 224 225 /** 226 * topics_per_day() - {@internal Missing Short Description}} 227 * 228 * {@internal Missing Long Description}} 229 * 230 * @since {@internal Unknown}} 231 */ 87 232 function topics_per_day() { 88 233 echo apply_filters('topics_per_day', bb_number_format_i18n(get_topics_per_day(),3));
Note: See TracChangeset
for help on using the changeset viewer.