root/wp-since-last-visit/trunk/README.txt

Revision 671, 1.7 kB (checked in by aking, 3 years ago)

initial add.

Line 
1 WP Last Visit README
2 version 2.2, 2004-07-05
3
4 This hack will show an image next to post and comments that are new since someone's last visit to your site.
5
6 Step 1.
7
8 Put the wp-last-visit.php file in your wp-content/plugins/ directory.
9
10
11 Step 2.
12
13 Enable the plugin in your options.
14
15 Click on 'Plugins' in the admin area, then 'Activate' next to the WP Grins row.
16
17
18 Step 3.
19
20 Add this line within the <head> tags of your index.php and wp-comments-popup.php pages.
21
22 <?php require(bloginfo('url;').'/wp-content/plugins/wp-last-visit.php?type=js'); ?>
23
24 Step 4.
25
26 Add some code to show the number of new posts and comments since your last visit
27
28 <script type="text/javascript">slvBanner();</script>
29
30 Step 5.
31
32 Add some code to show the new indicator next to each post (index.php)
33
34 <script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($post->post_date)); ?>);</script>
35
36 Step 6.
37
38 Add some code to show the new indicator next to each comment (wp-comments.php and wp-comments-popup.php)
39
40 <script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($comment->comment_date)); ?>);</script>
41
42 Step 7.
43
44 To show if there are new comments on a post from the link to the comments for that post, replace the comments_popup_link() in the posts loop with ak_comments_popup_link()
45
46 Step 8.
47
48 Put the 'ak-img' directory in your blog root, you can set the indicator you want (or use a text indicator) by modifying this code in wp-last-visit.php
49
50 //      var slvIndicator = 'New';
51         var slvIndicator = '<img src="<?php echo $siteurl ?>/ak-img/new.gif" alt="New" title="New since your last visit." />';
52
53 remove the "//" from the first line and put it on the second line to use the text indicator.
54
55
56
57 That should be it! Let me know how it goes...
58
59 --Alex
60
61 http://www.alexking.org/
Note: See TracBrowser for help on using the browser.