Support » Plugins » Struggling with Since Last Visit

  • I’ve been struggling the past couple of days with Alex King’s plugin, Since Last Visit (v2.2). Step 3 of the README calls for the following line in the HEAD section:
    <?php require(bloginfo('url;').'/wp-content/plugins/wp-last-visit.php?type=js'); ?>
    I simply could not get this to work. I ended up with a bunch of errors, and I would post them except they are not on my screen now. Something about not being able to find the wp-last-visit.php file. I downloaded the WP package Alex offers (with all the plugins preinstalled) and found he was using the following line in the index.php file:
    <script type="text/javascript" src="<?php bloginfo('url'); ?>/wp-content/plugins/wp-last-visit.php?type=js"></script>
    I used this line for step 3 of the install and now I’m not getting any errors, but nothing from SLV shows up on the page. Not the “so many posts/comments since your last visit” banner, nor do any of the “new” graphics display after new posts and comments are put on. (Remaining steps in REAME followed meticulously, and compared with Alex’s WP package)
    I do notice a lot of cookies, though. I cleared all the cookies for my site, and then visited just my main page and counted 8 cookies from wplastvist on my site. Is this normal? Before I cleared the cookies there were 22 of them.
    So obviously the plugin is active, its just not displaying anything on the page. Can anyone help me out here? I’ve done a lot of searching and reading but haven’t found anything helpful … yet. Thanks.

Viewing 15 replies - 1 through 15 (of 55 total)
  • Mark (podz)


    Support Maven

    Here is where I have all the codes:
    <?php $wplastvisit_output = "javascript"; require('wp-content/plugins/wp-last-visit.php'); ?>

    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?>&nbsp;&nbsp;<script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($post->post_date)); ?>);</script></h3>

    And in ‘wp-comments.php’
    <li id="comment-<?php comment_ID() ?>">
    <?php comment_text() ?>
    <script type="text/javascript">slvShowNewIndicator(<?php print(mysql2timestamp($comment->comment_date)); ?>);</script>

    Does this help at all ?

    Mark (podz)


    Support Maven

    And in index.php again;
    <div id="menu">

    • <script type="text/javascript">slvBanner();</script>

    Don’t know if this will help, but here’s my server config:
    FreeBSD 4.8 / PHP 4.3.4 / Apache 1.3.29 / MySQL 4.0.18 / WP 1.2

    Just an update. I installed a fresh WordPress 1.2 with a fresh SLV plugin on my Mac OS X server here at home (w/o any tweeks or mod_rewrite) and got the same results. I hope I am wrong, but the plugin simply seems to be broken.

    I am having the same problem to the tee. I am using rewrite also, though I am unsure of the importance of that common trait.
    I did notice that one of the people helping has a different line added to their index file that doesn’t include the js argument. but that argument is in the readme file.
    I would like to get last visit working, but I am unsure how to at this point, perhaps something needs to be changed in the code.

    Yup, same problem here. As I posted in the Entry to Alex’s WP 1.2 plugins ( Nothing I did worked, and the server host people don’t know or say what to do either.
    Podz tried to help me too, but unfortunatley it still didn’t work.



    It’s not working here neither. 🙁

    Well here goes…

    I have attempted the install of this plugin to no avail. I first tried to make sense of the instructions in the txt file that comes with the latest download. That did not work. Then after reading pages and pages of try this and do that, I found this page and follow exactly what “podz” has done with the code.

    However, it still seems to be “bugy”

    My guess is that the template that I am using is causing conflict or could be that WP is installed on a sub domain or I have completely messed it up. lol I am an Aquaculurist with limited knowlege of web design so even my logical thinking does not apply here.

    I must say to the WordPress Team – well done! The best and most user friendly blog application I have used. Thank you for thinking of us non techie peeps.

    Any assistance in resolving this issue is greatly appreciated and I am sure that our members will be grateful to Alex for the plugin when it works so they can tell where is what and when lol, as will I.

    I have bookmarked this page in the hopes of a reply, alternatively you may contact me via email or msn @ vanderwerf11 AT

    I look forward to hearing from you.

    Paul V

    Mark (podz)


    Support Maven

    What is line 62 ?

    Mark (podz)


    Support Maven

    // var slvIndicator = 'New';
    var slvIndicator = '<img src="" alt="New" title="New since your last visit." />';

    Close to something like that ?

    That is some fast response!

    Not sure how to find the line numbers as I am editing through the cpannel.

    My best guess it is the following

    if (!empty($_GET[“type”]) && $_GET[“type”] == “js”) {
    $wplastvisit_output = “javascript”;

    if (isset($wplastvisit_output)) { // will output stuff for the HTML source
    switch ($wplastvisit_output) {
    case “javascript”:
    header(“Content-type: text/javascript”);
    // var slvIndicator = ‘New’;
    var slvIndicator = ‘<img src=”<?php bloginfo(‘siteurl’); ?>/ak-img/new.gif” alt=”New” title=”New since your last visit.” />’;

    Mark (podz)


    Support Maven

    ‘<img src=”<?php bloginfo(‘siteurl’); ?>/ak-img/new.gif” alt=”New” title=”New since y

    that bit.......make it like this:

    <img src=””` and the rest .. that bloginfo stuff could be causing the error

    Well in there somewhere – it is calling for the ../../wp-blog-header.php where it seems to get lost in the loop. The header.php is in the main directory

    Ah so it is having trouble locating the subdomain?

    Mark (podz)


    Support Maven

    It could be …. the above might be wrong, but giving a full url will not stop it working and does cut out one potential error area.

Viewing 15 replies - 1 through 15 (of 55 total)
  • The topic ‘Struggling with Since Last Visit’ is closed to new replies.