Changeset 191
- Timestamp:
- 06/08/2003 12:15:39 AM (23 years ago)
- File:
-
- 1 edited
-
trunk/b2-include/b2template.functions.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/b2-include/b2template.functions.php
r190 r191 111 111 } 112 112 113 function get_archives($type , $limit='') {113 function get_archives($type='', $limit='') { 114 114 global $tableposts, $dateformat, $time_difference, $siteurl, $blogfilename, $querystring_start, $querystring_equal, $month, $wpdb, $start_of_week; 115 116 if ('' == $type) { 117 $type = get_settings('archive_mode'); 118 } 115 119 116 120 if ('' != $limit) { … … 125 129 $archive_link_w = $siteurl.'/'.$blogfilename.$querystring_start.'w'.$querystring_equal; # weekly archive; 126 130 $archive_link_p = $siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal; # post-by-post archive; 127 131 128 132 // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride 129 133 $archive_date_format_over_ride = 0; … … 145 149 $archive_week_end_date_format = $dateformat; 146 150 } 147 151 148 152 $now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600))); 149 153 150 154 if ('monthly' == $type) { 151 155 ++$querycount; … … 599 603 600 604 if(($p) || ($posts_per_page==1)) { 601 605 602 606 $current_post_date = $post->post_date; 603 607 $current_category = $post->post_category; … … 635 639 global $querystring_start, $querystring_equal, $querystring_separator; 636 640 if(($p) || ($posts==1)) { 637 641 638 642 $current_post_date = $post->post_date; 639 643 $current_category = $post->post_category; … … 684 688 $qstr = preg_replace("/paged=\d{0,}/","",$qstr); 685 689 } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) { 686 if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '', 690 if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '', 687 691 $HTTP_SERVER_VARS['REQUEST_URI']) ) { 688 692 $qstr = preg_replace("/^\//", "", $qstr); 689 $qstr = preg_replace("/paged\/\d{0,}\//", "", $qstr); 693 $qstr = preg_replace("/paged\/\d{0,}\//", "", $qstr); 690 694 $qstr = preg_replace("/paged\/\d{0,}/", "", $qstr); 691 695 $qstr = preg_replace("/\/$/", "", $qstr); … … 734 738 $qstr = preg_replace("/paged=\d{0,}/","",$qstr); 735 739 } elseif (stristr($HTTP_SERVER_VARS['REQUEST_URI'], $HTTP_SERVER_VARS['SCRIPT_NAME'] )) { 736 if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '', 740 if ('' != $qstr = str_replace($HTTP_SERVER_VARS['SCRIPT_NAME'], '', 737 741 $HTTP_SERVER_VARS['REQUEST_URI']) ) { 738 742 $qstr = preg_replace("/^\//", "", $qstr); 739 $qstr = preg_replace("/paged\/\d{0,}\//", "", $qstr); 743 $qstr = preg_replace("/paged\/\d{0,}\//", "", $qstr); 740 744 $qstr = preg_replace("/paged\/\d{0,}/", "", $qstr); 741 745 $qstr = preg_replace("/\/$/", "", $qstr); … … 748 752 'paged'.$querystring_equal.$nextpage; 749 753 } 750 } 754 } 751 755 752 756 function previous_posts_link($label='<< Previous Page') { … … 979 983 980 984 $url = str_replace('http://url', '', $url); 981 985 982 986 if (empty($url) && empty($email)) return $author; 983 987 echo '<a href="'; … … 1194 1198 $id = 0; 1195 1199 $postdata = array ( 1196 'ID' => 0, 1200 'ID' => 0, 1197 1201 'Author_ID' => $HTTP_GET_VARS['preview_userid'], 1198 1202 'Date' => $HTTP_GET_VARS['preview_date'],
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)