WordPress.org

Ready to get started?Download WordPress

Forums

Looking for WP-Since Last Visit plugin users (55 posts)

  1. davincim
    Member
    Posted 9 years ago #

    Once I get it functioning, I'm sure this plugin will be invaluable. I just need some help getting rid of an error message. So I'm giving it one last try before hanging it up.

    The error is:

    Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/galen5/familywebwatch.com/blog/wp-content/themes/Blix/contact.php:7) in /hsphere/local/home/galen5/familywebwatch.com/blog/wp-last_visit.php on line 55

    I'm not blaming the plugin, but I'm certain it's related somehow because when I remove the code from my pages, the error no longer appears.

    Please note that I have already scanned the files for extra spaces for the php stuff, which I know is a common reason for this type of message. Still got the same result.

    Can anyone please offer some advice? :)

  2. vkaryl
    Member
    Posted 9 years ago #

    I would think at this point that it's a conflict between this plugin and another one you have installed. Maybe deactivate all of them, activate this one and get it working, then start adding the rest back one at a time?

  3. davincim
    Member
    Posted 9 years ago #

    Hmm, good point, vkaryl. Thanks for that bit of advice. I'll post back my findings. :)

  4. vkaryl
    Member
    Posted 9 years ago #

    Yes, please do - I'd be willing to bet you won't be the only one with the problem!

  5. davincim
    Member
    Posted 9 years ago #

    Well, I don't think it's a plugin conflict. Even with all of them turned off, I'm still getting that stubborn error message.

    I'm no php expert, but I still can't help but wonder if it has to do with the bit of code I was supposed to add to the header.php file. The code I'm talking about is:

    <?php require_once("wp-last_visit.php");
    // set lastvisit cookie
    ak_set_last_visit_cookie();
    ?>

    Since it was supposed to go to the very top of the file, even before the doctype information. You php experts out there may think I'm totally off my rocker, and that's all right.

    Has anyone else experienced this problem and/or know what to do about it?

  6. Heatsink
    Member
    Posted 9 years ago #

    I messed with this pluging for a bout 4 hours today. I had the same problems as you, and I finally gave up.

    I chalked it up to it only being compatible with 1.2 and not 1.5, but I don't know that for sure.

  7. davincim
    Member
    Posted 9 years ago #

    Well, at least I feel a little better knowing it's not just me. ;)

    I was able to get the images to show up (except for one), but with that error message popping up, I think we're destined to waiting for an update.

    Thanks for weighing in on this, heatsink. :)

  8. Heatsink
    Member
    Posted 9 years ago #

    No problem - I also wish someone who had this working would speak up (assuming there is someone).

    I thought I had the non-javascript one working for a while, but it quickly became apparent that it wasn't behaving predictably. The number of new posts and comments never jived correctly with real-life.

    Hoping for a working (1.5?) version though, I love the idea.

  9. mcmike
    Member
    Posted 9 years ago #

    What you could do actually is simply record the info in a DB ??
    What I did with the You Call It / Roept U Maar script is hack-out the cookie to useable names, post that in a DB

    Filter that with the current time-stamp and repost it everytime that person visits. If the person is not in the DB it has not been there before.

    How about that for an idea ??

  10. mcmike
    Member
    Posted 9 years ago #

    Uhmz it also could be who is online script :)

    In the who is online script it uses the WP-Cookie to read out information (nickname, URI and email) and posts that in the DB with a time-stamp/

    You could easaly use that timestamp to post the last date the person was on the blog OR post the time that has past since the person was there (or both)

    This would offcourse ONLY work with people who have been there before *grin*

  11. davincim
    Member
    Posted 9 years ago #

    @mcmike - thanks! It sounds like you're way more experienced than I am, because I don't know how to incorporate what you suggested. ;)

    If I posted my code back up with the plugin installed, would you be willing to take a look at it and give me your assessment? Someone with your experience may be able to detect that which has eluded me for a few days now. If not, that's okay. Just let me know. ;)

  12. ColdForged
    Member
    Posted 9 years ago #

    The version of wp-last-visit.php that I run -- which I got from here though it appears the same at the repository -- doesn't even have the function you're trying to call. Perhaps try one of these versions and follow those directions?

  13. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I'm running 1.5.1 and last_visit works fine (I've used it since the plugin was first published).
    Do you want the code I use and for me to post where I put the calls ?

  14. davincim
    Member
    Posted 9 years ago #

    @podz - that would be awesome! Yes, please. ;) Do I need to be running 1.5.1 then? I didn't know it was available (I guess I've been too busy working on my blog to notice.)

    @ColdForged - I could be wrong, but I think I got the code from Alex's site, but now I'm not sure. If I recall correctly, the link I got was from another post here, so it may be different. The details in the plugin show it to be Alex's and version 1.3 dated January of 2004. However, it's not placed in the plugins folder, but in the blog root.

    Thank you both for your help!

  15. ColdForged
    Member
    Posted 9 years ago #

    This version is from 07/2004, so it's newer.

  16. m8rk
    Member
    Posted 9 years ago #

    I'd appreciate that too Podz

  17. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Hang on .. I'll phps the files and upload them.

  18. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Plugin:
    http://www.tamba2.org.uk/T2/files/wp-last-visit.phps

    The following 3 files demonstrate where I put the code
    http://www.tamba2.org.uk/T2/files/header.phps
    http://www.tamba2.org.uk/T2/files/index.phps
    http://www.tamba2.org.uk/T2/files/comments.phps

    I separated out the code lines for clarity, but that should not affect how it works.

  19. m8rk
    Member
    Posted 9 years ago #

    cool! you the man podz :0)

  20. davincim
    Member
    Posted 9 years ago #

    Yes, thank you podz!!

    I'll spend some time this evening integrating it and post back my results.

  21. Heatsink
    Member
    Posted 9 years ago #

    So, I tried this and had no luck.

    As soon as I put the line you have in your index.phps file (which I'm putting in my main template..right?) then my page stops loading when it hits it.

    Viewing the page source reveals this error:
    <script type="text/javascript">slvShowNewIndicator(
    <b>Fatal error</b>: Call to undefined function: mysql2timestamp() in <b>/var/www/html/blog/wp-content/themes/McStars/index.php</b> on line <b>27</b>

    Does this have something to do with my MySQL implemention???

    Thanks!

  22. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Don't forget that if you get a "Headers already sent" error, it means you have some whitespace after the last
    ?>
    in the plugin.
    Eliminate that and all should be good.

  23. Mark (podz)
    Support Maven
    Posted 9 years ago #

    The plugin is activated ?

  24. Heatsink
    Member
    Posted 9 years ago #

    Um..heh.....

    Lemme try again.

  25. Heatsink
    Member
    Posted 9 years ago #

    It works much better when the plugin in activated :)

    Thanks podz. This is the first time I've had the javascript version running. Hopefully it works better ('new' status goes away as intended) than the non-java one.

    Thanks!

  26. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Excellent !
    I'm not sure on the cookie time, but the new tags do go away.

  27. Heatsink
    Member
    Posted 9 years ago #

    Is there any documentation anywhere on the wp-last-visit.php file? For example, what is this setting for:

    if (!isset($time_difference)) {
    $time_difference = 0;

    Should I put '-5' in there since I'm 5 hours behind UTC or does this mean something else?

    And what is this for:

    function ak_last_visit($use_session = 1, $hours = 1)

    There's not much in the readme.

    Thanks!

  28. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Oh ... I've never looked in there.
    I'd say you are right with the time and the second is the cookie - and therefore the tag - info. At least if you know the tags display then it does actually work.

  29. Heatsink
    Member
    Posted 9 years ago #

    See...it's still weird, or perhaps I just don't understand how it's supposed to work.

    Check it out: http://www.theheatsinkbbs.ca/

    What *I* see is 0 new posts and 0 new comments, yet the first entry on my page still has the 'new' image.

    Does that makes sense?

  30. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I too see 0 new for both, but as it's my first time there, I would.
    I see the New tag though.

    Maybe experiment with those settings until you are happy ?

    If you check my blog, you'll also see I edited the plugin to modify the display - I noticed you have the list across the top.

    In my sidebar, I have this:
    <ul><li>
    <script type="text/javascript">slvBanner();</script>
    </li></ul>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.