• 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 - 31 through 45 (of 55 total)
  • now we have the last part
    Warning: Cannot modify header information – headers already sent by (output started at /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php:257) in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 54

    Line 54 starts right after the last fix
    somewhere here
    include(“https://somethin-tropical.epaulv.com/wp-blog-header.php&#8221;);
    header(“Content-type: text/javascript”);
    ?>
    // var slvIndicator = ‘New’;

    Excellent !

    I think the headers error is not whitespace.
    I think there is a commenting error in the code, just before the first line you can see, and that is killing the rest of the plugin.
    Stare a lot at the plugin just before “// var slvIndicator = ‘New’; var slvIndicator = ‘New’; function slvB”

    ok here is what comes after. I dont know what // before the text does… eg // will output ……
    if (isset($wplastvisit_output)) { // will output stuff for the HTML source
    switch ($wplastvisit_output) {
    case “javascript”:
    include(“https://somethin-tropical.epaulv.com/wp-blog-header.php&#8221;);
    header(“Content-type:text/javascript”);
    ?>
    // var slvIndicator = ‘New’;
    var slvIndicator = ‘<img src=”https://somethin-tropical.epaulv.com/ak-img/new.gif&#8221; alt=”New” title=”New since your last visit.” />’;
    function slvBanner() {
    var posts = slvGetCookie(‘wplastvisit_posts’);
    var comments = slvGetCookie(‘wplastvisit_comments’);
    if (posts == null || comments == null) {
    return false;
    }
    var banner = ”;

    I have:

    if (isset($wplastvisit_output)) { // will output stuff for the HTML source
    switch ($wplastvisit_output) {
    case "javascript":
    ?>
    <script type="text/javascript">
    <!--

    // var slvIndicator = 'New';

    The code that you posted to put in the head is in mine now

    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>

    <?php $wplastvisit_output = “javascript”; require(‘wp-content/plugins/wp-last-visit.php’); ?>
    </head>

    And the code that Alex has in his txt file is

    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’); ?>

    Perhaps the plugin is calling for the ?type=js and can not find it or is your code saying the same thing just in a different way?

    It’s saying the same thing diferently.

    Can you paste your code here:
    https://paste.uni.cc/

    mmmm it seems that this line is the prob

    header(“Content-type:text/javascript”);

    could it be

    Content-type=”text/javascript”

    or something lol

    Which part?

    the plugin – sorry !

    Pasted the entire plugin…

    Done…

    Now we have this

    Parse error: parse error, unexpected T_STRING in /home/vanderwe/public_html/somethin-tropical/wp-content/plugins/wp-last-visit.php on line 254

    I am not using comment_popup if that helps

    And I have not pasted any code for this plugin in comments_popup.php at all

    Damn….. I have no clue why that has happened…. all I added was two lines to your plugin so it knew that the text was a script.

    Kill the plugin……any chance of irc ?

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