Ticket #3767: unsetpreviousday.diff

File unsetpreviousday.diff, 5.7 KB (added by sunburntkamel, 6 years ago)

patch including unset previous day

Line 
1Index: archive.php
2===================================================================
3--- archive.php (revision 5630)
4+++ archive.php (working copy)
5@@ -30,7 +30,7 @@
6                <?php while (have_posts()) : the_post(); ?>
7                <div class="post">
8                                <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
9-                               <small><?php the_time('l, F jS, Y') ?></small>
10+                               <small><?php unset($previousday); the_date('') ?></small>
11 
12                                <div class="entry">
13                                        <?php the_content() ?>
14Index: attachment.php
15===================================================================
16--- attachment.php      (revision 5630)
17+++ attachment.php      (working copy)
18@@ -26,7 +26,7 @@
19                                                        You'll need to download this plugin, and follow the instructions:
20                                                        http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
21                                                        /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
22-                                               on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
23+                                               on <?php the_date() ?> at <?php the_time() ?>
24                                                and is filed under <?php the_category(', ') ?>.
25                                                You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
26 
27Index: comments.php
28===================================================================
29--- comments.php        (revision 5630)
30+++ comments.php        (working copy)
31@@ -6,7 +6,7 @@
32                if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
33                        ?>
34 
35-                       <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
36+                       <p class="nocomments">This post is password protected. Enter the password to view comments.<p>
37 
38                        <?php
39                        return;
40@@ -14,7 +14,7 @@
41        }
42 
43        /* This variable is for alternating comment background */
44-       $oddcomment = 'class="alt" ';
45+       $oddcomment = 'alt';
46 ?>
47 
48 <!-- You can start editing here. -->
49@@ -26,22 +26,22 @@
50 
51        <?php foreach ($comments as $comment) : ?>
52 
53-               <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
54+               <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
55                        <cite><?php comment_author_link() ?></cite> Says:
56                        <?php if ($comment->comment_approved == '0') : ?>
57                        <em>Your comment is awaiting moderation.</em>
58                        <?php endif; ?>
59                        <br />
60 
61-                       <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></small>
62+                       <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
63 
64                        <?php comment_text() ?>
65 
66                </li>
67 
68-       <?php
69-               /* Changes every other comment to a different class */
70-               $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
71+       <?php /* Changes every other comment to a different class */
72+               if ('alt' == $oddcomment) $oddcomment = '';
73+               else $oddcomment = 'alt';
74        ?>
75 
76        <?php endforeach; /* end for each comment */ ?>
77@@ -88,7 +88,7 @@
78 
79 <?php endif; ?>
80 
81-<!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
82+<!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
83 
84 <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
85 
86Index: index.php
87===================================================================
88--- index.php   (revision 5630)
89+++ index.php   (working copy)
90@@ -8,7 +8,7 @@
91 
92                        <div class="post" id="post-<?php the_ID(); ?>">
93                                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
94-                               <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
95+                               <small><?php unset($previousday); the_date() ?> <!-- by <?php the_author() ?> --></small>
96 
97                                <div class="entry">
98                                        <?php the_content('Read the rest of this entry &raquo;'); ?>
99Index: search.php
100===================================================================
101--- search.php  (revision 5630)
102+++ search.php  (working copy)
103@@ -16,7 +16,7 @@
104 
105                        <div class="post">
106                                <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
107-                               <small><?php the_time('l, F jS, Y') ?></small>
108+                               <small><?php unset($previousday); the_date() ?></small>
109 
110                                <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
111                        </div>
112@@ -39,4 +39,4 @@
113 
114 <?php get_sidebar(); ?>
115 
116-<?php get_footer(); ?>
117\ No newline at end of file
118+<?php get_footer(); ?>
119Index: single.php
120===================================================================
121--- single.php  (revision 5630)
122+++ single.php  (working copy)
123@@ -25,7 +25,7 @@
124                                                        You'll need to download this plugin, and follow the instructions:
125                                                        http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
126                                                        /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
127-                                               on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
128+                                               on <?php the_date() ?> at <?php the_time() ?>
129                                                and is filed under <?php the_category(', ') ?>.
130                                                You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
131