• Anyone know why I would get this error when I’m trying to use the last visit plugin? I have activated the plugin.
    Fatal error: Failed opening required ‘/wp-content/plugins/wp-last-visit.php?type=js’ (include_path=’.:/php/includes:/usr/share/php’) in /home/virtual/site29/fst/var/www/html/index.php on line 31

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’m pretty sure it means it cannot find the files it wants “wp-last-visit” where it has been told to look for it.

    Thread Starter lawtai

    (@lawtai)

    any ideas how to fix it?

    Did you upload the file ‘wp-last-visit.php’ to the correct place ?
    In the <head> section of my site, I have the function call to the plugin here:
    <meta name="ICBM" content="52.633005, -1.234245" />
    <meta name="DC.title" content="~T2~" />
    <?php $wplastvisit_output = "javascript"; require('wp-content/plugins/wp-last-visit.php'); ?>
    </head>

    I tried adding the line you have, btu then I get a bunch more errors. Do I need to do all the steps that the readme says? I only really want it to say how many posts and comments are new since last visit and not add the picture next to the post or comment. Would that be causing problems because I don’t have those lines of code added?

    Thread Starter lawtai

    (@lawtai)

    oops mistyped my login name heh

    You need to do every step to use wp-last-visit.
    It’s a complex script, and in my expereince the one you really do need to take most care about installing.
    Don’t skip a single step.

    Thread Starter lawtai

    (@lawtai)

    hmm ok, thanks for the help. I was hoping to only have the new comments new posts part and not any of the small icons added.

    You don’t need to put the calls for the “new” flags into your page but you must make sure you follow all the other instructions. Once it’s set up you can just use the “slvbanner” script if that’s all you want. To check if you have the wp-last-visit.php file in the right place, if you go into admin and then into Plugins you should see wp-last-visit in the plugin list. It’s pretty much at the bottom I think. If it is there and you still get the “can’t find” error then the address in the “require” call may be wrong. This can be the case if your index.php file is not in the normal root of the blog software. Anyway you can try putting the full address in ie start with the “http”.

    Thread Starter lawtai

    (@lawtai)

    These are the steps that are listed, which one is critical to me being able to get this plugin to work without having those new icons show up next to new posts/comments.
    Step 1. Put the wp-last-visit.php file in your wp-content/plugins/ directory.
    Step 2. Enable the plugin in your options.Click on ‘Plugins’ in the admin area, then ‘Activate’ next to the WP Grins row.
    Step 3. Add this line within the <head> tags of your index.php and wp-comments-popup.php pages.
    <?php require(bloginfo(‘url;’).’/wp-content/plugins/wp-last-visit.php?type=js’); ?>
    Step 4. Add some code to show the number of new posts and comments since your last visit
    <script type=”text/javascript”>slvBanner();</script>
    Step 5. Add some code to show the new indicator next to each post (index.php)
    <script type=”text/javascript”>slvShowNewIndicator(<?php print(mysql2timestamp($post->post_date)); ?>);</script>
    Step 6. Add some code to show the new indicator next to each comment (wp-comments.php and wp-comments-popup.php)
    <script type=”text/javascript”>slvShowNewIndicator(<?php print(mysql2timestamp($comment->comment_date)); ?>);</script>
    Step 7.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()
    Step 8.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
    // var slvIndicator = ‘New’;
    var slvIndicator = ‘<img src=”<?php echo $siteurl ?>/ak-img/new.gif” alt=”New” title=”New since your last visit.” />’;
    remove the “//” from the first line and put it on the second line to use the text indicator.
    When I did it, I only did steps 1-4, which other steps are needed?

    Step 3. Add this line within the <head> tags of your index.php and wp-comments-popup.php pages.
    <?php require(bloginfo(‘url;’).’/wp-content/plugins/wp-last-visit.php?type=js’); ?>
    when I add this to index.php inside the header tag – I get no page rendered only the name of the blog. I’m guessing that it is throwing an error somewhere. Can anyone tell me how to debug this ?

    Trying to get this code to work myself…. from step 4 down, it doesn’t tell you where exactly to put this code! I mean if I hade a degree in PHP fine…. but I’m new to PHP and step 4 is especially troublesome.
    “Add some code to show the number of new posts and comments since your last visit” tells me alot…
    HELP….. Where exactly do I put this code? Could some one please give us a better position on this!

    In my menu div, I have this:

      • <script type="text/javascript">slvBanner();</script>
      • In content:
        <div class="post">
        <?php the_date('','<h2>','</h2>'); ?>
        <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:
        <?php ak_comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
        That help ?

      Well helps a bit I guess…. I mean I can see where the second two pieces of code go. Not sure but the first piece, but I have an idea… problem is, right after I put in the first bit of code: ‘<?php require(bloginfo(‘url;’).’/wp-content/plugins/wp-last-visit.php?type=js’); ?>’ my page goes all white (Blank) for some reason. Can’t figure….everything seems to be in place!

    Viewing 13 replies - 1 through 13 (of 13 total)
    • The topic ‘Last-visit plugin help’ is closed to new replies.